PdfiumViewer
Public Member Functions | Properties | List of all members
PdfiumViewer.IPdfDocument Interface Reference

Represents a PDF document. More...

Inheritance diagram for PdfiumViewer.IPdfDocument:
PdfiumViewer.PdfDocument

Public Member Functions

void Render (int page, Graphics graphics, float dpiX, float dpiY, Rectangle bounds, bool forPrinting)
 Renders a page of the PDF document to the provided graphics instance. More...
 
void Render (int page, Graphics graphics, float dpiX, float dpiY, Rectangle bounds, PdfRenderFlags flags)
 Renders a page of the PDF document to the provided graphics instance. More...
 
Image Render (int page, float dpiX, float dpiY, bool forPrinting)
 Renders a page of the PDF document to an image. More...
 
Image Render (int page, float dpiX, float dpiY, PdfRenderFlags flags)
 Renders a page of the PDF document to an image. More...
 
Image Render (int page, int width, int height, float dpiX, float dpiY, bool forPrinting)
 Renders a page of the PDF document to an image. More...
 
Image Render (int page, int width, int height, float dpiX, float dpiY, PdfRenderFlags flags)
 Renders a page of the PDF document to an image. More...
 
Image Render (int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, PdfRenderFlags flags)
 Renders a page of the PDF document to an image. More...
 
void Save (string path)
 Save the PDF document to the specified location. More...
 
void Save (Stream stream)
 Save the PDF document to the specified location. More...
 
PdfMatches Search (string text, bool matchCase, bool wholeWord)
 Finds all occurences of text. More...
 
PdfMatches Search (string text, bool matchCase, bool wholeWord, int page)
 Finds all occurences of text. More...
 
PdfMatches Search (string text, bool matchCase, bool wholeWord, int startPage, int endPage)
 Finds all occurences of text. More...
 
PrintDocument CreatePrintDocument ()
 Creates a PrintDocument for the PDF document. More...
 
PrintDocument CreatePrintDocument (PdfPrintMode printMode)
 Creates a PrintDocument for the PDF document. More...
 
PrintDocument CreatePrintDocument (PdfPrintSettings settings)
 Creates a PrintDocument for the PDF document. More...
 
PdfPageLinks GetPageLinks (int page, Size size)
 Returns all links on the PDF page. More...
 
void DeletePage (int page)
 Delete the page from the PDF document. More...
 
void RotatePage (int page, PdfRotation rotation)
 Rotate the page. More...
 
PdfInformation GetInformation ()
 Get metadata information from the PDF document. More...
 
string GetPdfText (int page)
 Get all text on the page. More...
 
string GetPdfText (PdfTextSpan textSpan)
 Get all text matching the text span. More...
 
IList< PdfRectangleGetTextBounds (PdfTextSpan textSpan)
 Get all bounding rectangles for the text span. More...
 
PointF PointToPdf (int page, Point point)
 Convert a point from device coordinates to page coordinates. More...
 
Point PointFromPdf (int page, PointF point)
 Convert a point from page coordinates to device coordinates. More...
 
RectangleF RectangleToPdf (int page, Rectangle rect)
 Convert a rectangle from device coordinates to page coordinates. More...
 
Rectangle RectangleFromPdf (int page, RectangleF rect)
 Convert a rectangle from page coordinates to device coordinates. More...
 

Properties

int PageCount [get]
 Number of pages in the PDF document. More...
 
PdfBookmarkCollection Bookmarks [get]
 Bookmarks stored in this PdfFile More...
 
IList< SizeF > PageSizes [get]
 Size of each page in the PDF document. More...
 

Detailed Description

Represents a PDF document.

Member Function Documentation

◆ CreatePrintDocument() [1/3]

PrintDocument PdfiumViewer.IPdfDocument.CreatePrintDocument ( )

Creates a PrintDocument for the PDF document.

Returns

Implemented in PdfiumViewer.PdfDocument.

◆ CreatePrintDocument() [2/3]

PrintDocument PdfiumViewer.IPdfDocument.CreatePrintDocument ( PdfPrintMode  printMode)

Creates a PrintDocument for the PDF document.

Parameters
printModeSpecifies the mode for printing. The default value for this parameter is CutMargin.
Returns

Implemented in PdfiumViewer.PdfDocument.

◆ CreatePrintDocument() [3/3]

PrintDocument PdfiumViewer.IPdfDocument.CreatePrintDocument ( PdfPrintSettings  settings)

Creates a PrintDocument for the PDF document.

Parameters
settingsThe settings used to configure the print document.
Returns

Implemented in PdfiumViewer.PdfDocument.

◆ DeletePage()

void PdfiumViewer.IPdfDocument.DeletePage ( int  page)

Delete the page from the PDF document.

Parameters
pageThe page to delete.

Implemented in PdfiumViewer.PdfDocument.

◆ GetInformation()

PdfInformation PdfiumViewer.IPdfDocument.GetInformation ( )

Get metadata information from the PDF document.

Returns
The PDF metadata.

Implemented in PdfiumViewer.PdfDocument.

◆ GetPageLinks()

PdfPageLinks PdfiumViewer.IPdfDocument.GetPageLinks ( int  page,
Size  size 
)

Returns all links on the PDF page.

Parameters
pageThe page to get the links for.
sizeThe size of the page.
Returns
A collection with the links on the page.

Implemented in PdfiumViewer.PdfDocument.

◆ GetPdfText() [1/2]

string PdfiumViewer.IPdfDocument.GetPdfText ( int  page)

Get all text on the page.

Parameters
pageThe page to get the text for.
Returns
The text on the page.

Implemented in PdfiumViewer.PdfDocument.

◆ GetPdfText() [2/2]

string PdfiumViewer.IPdfDocument.GetPdfText ( PdfTextSpan  textSpan)

Get all text matching the text span.

Parameters
textSpanThe span to get the text for.
Returns
The text matching the span.

Implemented in PdfiumViewer.PdfDocument.

◆ GetTextBounds()

IList<PdfRectangle> PdfiumViewer.IPdfDocument.GetTextBounds ( PdfTextSpan  textSpan)

Get all bounding rectangles for the text span.

The algorithm used to get the bounding rectangles tries to join adjacent character bounds into larger rectangles.

Parameters
textSpanThe span to get the bounding rectangles for.
Returns
The bounding rectangles.

Implemented in PdfiumViewer.PdfDocument.

◆ PointFromPdf()

Point PdfiumViewer.IPdfDocument.PointFromPdf ( int  page,
PointF  point 
)

Convert a point from page coordinates to device coordinates.

Parameters
pageThe page number where the point is from.
pointThe point to convert.
Returns
The converted point.

Implemented in PdfiumViewer.PdfDocument.

◆ PointToPdf()

PointF PdfiumViewer.IPdfDocument.PointToPdf ( int  page,
Point  point 
)

Convert a point from device coordinates to page coordinates.

Parameters
pageThe page number where the point is from.
pointThe point to convert.
Returns
The converted point.

Implemented in PdfiumViewer.PdfDocument.

◆ RectangleFromPdf()

Rectangle PdfiumViewer.IPdfDocument.RectangleFromPdf ( int  page,
RectangleF  rect 
)

Convert a rectangle from page coordinates to device coordinates.

Parameters
pageThe page where the rectangle is from.
rectThe rectangle to convert.
Returns
The converted rectangle.

Implemented in PdfiumViewer.PdfDocument.

◆ RectangleToPdf()

RectangleF PdfiumViewer.IPdfDocument.RectangleToPdf ( int  page,
Rectangle  rect 
)

Convert a rectangle from device coordinates to page coordinates.

Parameters
pageThe page where the rectangle is from.
rectThe rectangle to convert.
Returns
The converted rectangle.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [1/7]

Image PdfiumViewer.IPdfDocument.Render ( int  page,
float  dpiX,
float  dpiY,
bool  forPrinting 
)

Renders a page of the PDF document to an image.

Parameters
pageNumber of the page to render.
dpiXHorizontal DPI.
dpiYVertical DPI.
forPrintingRender the page for printing.
Returns
The rendered image.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [2/7]

Image PdfiumViewer.IPdfDocument.Render ( int  page,
float  dpiX,
float  dpiY,
PdfRenderFlags  flags 
)

Renders a page of the PDF document to an image.

Parameters
pageNumber of the page to render.
dpiXHorizontal DPI.
dpiYVertical DPI.
flagsFlags used to influence the rendering.
Returns
The rendered image.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [3/7]

void PdfiumViewer.IPdfDocument.Render ( int  page,
Graphics  graphics,
float  dpiX,
float  dpiY,
Rectangle  bounds,
bool  forPrinting 
)

Renders a page of the PDF document to the provided graphics instance.

Parameters
pageNumber of the page to render.
graphicsGraphics instance to render the page on.
dpiXHorizontal DPI.
dpiYVertical DPI.
boundsBounds to render the page in.
forPrintingRender the page for printing.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [4/7]

void PdfiumViewer.IPdfDocument.Render ( int  page,
Graphics  graphics,
float  dpiX,
float  dpiY,
Rectangle  bounds,
PdfRenderFlags  flags 
)

Renders a page of the PDF document to the provided graphics instance.

Parameters
pageNumber of the page to render.
graphicsGraphics instance to render the page on.
dpiXHorizontal DPI.
dpiYVertical DPI.
boundsBounds to render the page in.
flagsFlags used to influence the rendering.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [5/7]

Image PdfiumViewer.IPdfDocument.Render ( int  page,
int  width,
int  height,
float  dpiX,
float  dpiY,
bool  forPrinting 
)

Renders a page of the PDF document to an image.

Parameters
pageNumber of the page to render.
widthWidth of the rendered image.
heightHeight of the rendered image.
dpiXHorizontal DPI.
dpiYVertical DPI.
forPrintingRender the page for printing.
Returns
The rendered image.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [6/7]

Image PdfiumViewer.IPdfDocument.Render ( int  page,
int  width,
int  height,
float  dpiX,
float  dpiY,
PdfRenderFlags  flags 
)

Renders a page of the PDF document to an image.

Parameters
pageNumber of the page to render.
widthWidth of the rendered image.
heightHeight of the rendered image.
dpiXHorizontal DPI.
dpiYVertical DPI.
flagsFlags used to influence the rendering.
Returns
The rendered image.

Implemented in PdfiumViewer.PdfDocument.

◆ Render() [7/7]

Image PdfiumViewer.IPdfDocument.Render ( int  page,
int  width,
int  height,
float  dpiX,
float  dpiY,
PdfRotation  rotate,
PdfRenderFlags  flags 
)

Renders a page of the PDF document to an image.

Parameters
pageNumber of the page to render.
widthWidth of the rendered image.
heightHeight of the rendered image.
dpiXHorizontal DPI.
dpiYVertical DPI.
rotateRotation.
flagsFlags used to influence the rendering.
Returns
The rendered image.

Implemented in PdfiumViewer.PdfDocument.

◆ RotatePage()

void PdfiumViewer.IPdfDocument.RotatePage ( int  page,
PdfRotation  rotation 
)

Rotate the page.

Parameters
pageThe page to rotate.
rotationHow to rotate the page.

Implemented in PdfiumViewer.PdfDocument.

◆ Save() [1/2]

void PdfiumViewer.IPdfDocument.Save ( Stream  stream)

Save the PDF document to the specified location.

Parameters
streamStream to save the PDF document to.

Implemented in PdfiumViewer.PdfDocument.

◆ Save() [2/2]

void PdfiumViewer.IPdfDocument.Save ( string  path)

Save the PDF document to the specified location.

Parameters
pathPath to save the PDF document to.

Implemented in PdfiumViewer.PdfDocument.

◆ Search() [1/3]

PdfMatches PdfiumViewer.IPdfDocument.Search ( string  text,
bool  matchCase,
bool  wholeWord 
)

Finds all occurences of text.

Parameters
textThe text to search for.
matchCaseWhether to match case.
wholeWordWhether to match whole words only.
Returns
All matches.

Implemented in PdfiumViewer.PdfDocument.

◆ Search() [2/3]

PdfMatches PdfiumViewer.IPdfDocument.Search ( string  text,
bool  matchCase,
bool  wholeWord,
int  page 
)

Finds all occurences of text.

Parameters
textThe text to search for.
matchCaseWhether to match case.
wholeWordWhether to match whole words only.
pageThe page to search on.
Returns
All matches.

Implemented in PdfiumViewer.PdfDocument.

◆ Search() [3/3]

PdfMatches PdfiumViewer.IPdfDocument.Search ( string  text,
bool  matchCase,
bool  wholeWord,
int  startPage,
int  endPage 
)

Finds all occurences of text.

Parameters
textThe text to search for.
matchCaseWhether to match case.
wholeWordWhether to match whole words only.
startPageThe page to start searching.
endPageThe page to end searching.
Returns
All matches.

Implemented in PdfiumViewer.PdfDocument.

Property Documentation

◆ Bookmarks

PdfBookmarkCollection PdfiumViewer.IPdfDocument.Bookmarks
get

Bookmarks stored in this PdfFile

◆ PageCount

int PdfiumViewer.IPdfDocument.PageCount
get

Number of pages in the PDF document.

◆ PageSizes

IList<SizeF> PdfiumViewer.IPdfDocument.PageSizes
get

Size of each page in the PDF document.


The documentation for this interface was generated from the following file: