Class PdfDocument
Inheritance
System.Object
PdfDocument
Implements
System.IDisposable
Assembly: IronPdf.dll
Syntax
public class PdfDocument : Object, IPdfDocument
Properties
Bookmarks
Declaration
public PdfBookmarkCollection Bookmarks { get; }
Property Value
PageCount
Declaration
public int PageCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
PageSizes
Declaration
public IList<SizeF> PageSizes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IList<System.Drawing.SizeF> |
|
Methods
CreatePrintDocument()
Declaration
public PrintDocument CreatePrintDocument()
Returns
Type |
Description |
System.Drawing.Printing.PrintDocument |
|
CreatePrintDocument(PdfPrintMode)
Declaration
public PrintDocument CreatePrintDocument(PdfPrintMode printMode)
Parameters
Returns
Type |
Description |
System.Drawing.Printing.PrintDocument |
|
CreatePrintDocument(PdfPrintSettings)
Declaration
public PrintDocument CreatePrintDocument(PdfPrintSettings settings)
Parameters
Returns
Type |
Description |
System.Drawing.Printing.PrintDocument |
|
DeletePage(Int32)
Declaration
public void DeletePage(int page)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
Dispose()
Declaration
Dispose(Boolean)
Declaration
protected void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Finalize()
Declaration
protected override void Finalize()
Declaration
public PdfInformation GetInformation()
Returns
GetPageLinks(Int32, Size)
Declaration
public PdfPageLinks GetPageLinks(int page, Size size)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Drawing.Size |
size |
|
Returns
GetPdfText(PdfTextSpan)
Declaration
public string GetPdfText(PdfTextSpan textSpan)
Parameters
Returns
Type |
Description |
System.String |
|
GetPdfText(Int32)
Declaration
public string GetPdfText(int page)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
Returns
Type |
Description |
System.String |
|
GetTextBounds(PdfTextSpan)
Declaration
public IList<PdfRectangle> GetTextBounds(PdfTextSpan textSpan)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IList<PdfRectangle> |
|
Load(Stream)
Declaration
public static PdfDocument Load(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
Returns
Load(Stream, String)
Declaration
public static PdfDocument Load(Stream stream, string password)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
System.String |
password |
|
Returns
Load(String)
Declaration
public static PdfDocument Load(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
Load(String, String)
Declaration
public static PdfDocument Load(string path, string password)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.String |
password |
|
Returns
PointFromPdf(Int32, PointF)
Declaration
public Point PointFromPdf(int page, PointF point)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Drawing.PointF |
point |
|
Returns
Type |
Description |
System.Drawing.Point |
|
PointToPdf(Int32, Point)
Declaration
public PointF PointToPdf(int page, Point point)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Drawing.Point |
point |
|
Returns
Type |
Description |
System.Drawing.PointF |
|
RectangleFromPdf(Int32, RectangleF)
Declaration
public Rectangle RectangleFromPdf(int page, RectangleF rect)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Drawing.RectangleF |
rect |
|
Returns
Type |
Description |
System.Drawing.Rectangle |
|
RectangleToPdf(Int32, Rectangle)
Declaration
public RectangleF RectangleToPdf(int page, Rectangle rect)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Drawing.Rectangle |
rect |
|
Returns
Type |
Description |
System.Drawing.RectangleF |
|
Render(Int32, Int32, Int32, Single, Single, PdfRenderFlags)
Declaration
public Image Render(int page, int width, int height, float dpiX, float dpiY, PdfRenderFlags flags)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Single |
dpiX |
|
System.Single |
dpiY |
|
PdfRenderFlags |
flags |
|
Returns
Type |
Description |
System.Drawing.Image |
|
Render(Int32, Int32, Int32, Single, Single, PdfRotation, PdfRenderFlags)
Declaration
public Image Render(int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, PdfRenderFlags flags)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Single |
dpiX |
|
System.Single |
dpiY |
|
PdfRotation |
rotate |
|
PdfRenderFlags |
flags |
|
Returns
Type |
Description |
System.Drawing.Image |
|
Render(Int32, Int32, Int32, Single, Single, Boolean)
Declaration
public Image Render(int page, int width, int height, float dpiX, float dpiY, bool forPrinting)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Single |
dpiX |
|
System.Single |
dpiY |
|
System.Boolean |
forPrinting |
|
Returns
Type |
Description |
System.Drawing.Image |
|
Render(Int32, Single, Single, PdfRenderFlags)
Declaration
public Image Render(int page, float dpiX, float dpiY, PdfRenderFlags flags)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Single |
dpiX |
|
System.Single |
dpiY |
|
PdfRenderFlags |
flags |
|
Returns
Type |
Description |
System.Drawing.Image |
|
Render(Int32, Single, Single, Boolean)
Declaration
public Image Render(int page, float dpiX, float dpiY, bool forPrinting)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Single |
dpiX |
|
System.Single |
dpiY |
|
System.Boolean |
forPrinting |
|
Returns
Type |
Description |
System.Drawing.Image |
|
RenderBytes(Int32, Int32, Int32, Single, Single, PdfRotation, PdfRenderFlags)
Declaration
public byte[] RenderBytes(int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, PdfRenderFlags flags)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Single |
dpiX |
|
System.Single |
dpiY |
|
PdfRotation |
rotate |
|
PdfRenderFlags |
flags |
|
Returns
Type |
Description |
System.Byte[] |
|
RotatePage(Int32, PdfRotation)
Declaration
public void RotatePage(int page, PdfRotation rotation)
Parameters
Type |
Name |
Description |
System.Int32 |
page |
|
PdfRotation |
rotation |
|
Save(Stream)
Declaration
public void Save(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
Save(String)
Declaration
public void Save(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Search(String, Boolean, Boolean)
Declaration
public PdfMatches Search(string text, bool matchCase, bool wholeWord)
Parameters
Type |
Name |
Description |
System.String |
text |
|
System.Boolean |
matchCase |
|
System.Boolean |
wholeWord |
|
Returns
Search(String, Boolean, Boolean, Int32)
Declaration
public PdfMatches Search(string text, bool matchCase, bool wholeWord, int page)
Parameters
Type |
Name |
Description |
System.String |
text |
|
System.Boolean |
matchCase |
|
System.Boolean |
wholeWord |
|
System.Int32 |
page |
|
Returns
Search(String, Boolean, Boolean, Int32, Int32)
Declaration
public PdfMatches Search(string text, bool matchCase, bool wholeWord, int startPage, int endPage)
Parameters
Type |
Name |
Description |
System.String |
text |
|
System.Boolean |
matchCase |
|
System.Boolean |
wholeWord |
|
System.Int32 |
startPage |
|
System.Int32 |
endPage |
|
Returns
Implements
System.IDisposable