FilePdf

References
public abstract class FilePdf
Support for PDF file format

Properties

LayersAsOptionalContentGroups

#Since v7.0
Add layers as "optional content groups" to the PDF. This is the visible layer tree available in PDF viewers
public bool LayersAsOptionalContentGroups { get; set; }

Methods

AddPage

#Since v6.5
Add a blank page to this document
public abstract int AddPage(
widthInDots,
heightInDots,
dotsPerInch
)
page number on success

AddPage

#Since v6.0
Add a new page to this document and draw a viewport into it based on provided ViewCaptureSettings
public abstract int AddPage()
page number on success

Create

#Since v6.0
Create a new instance of a FilePdf class
public static FilePdf Create()

DrawBitmap

#Since v6.5
Draw a bitmap
public abstract void DrawBitmap(
pageNumber,
bitmap,
left,
top,
width,
height,
rotationInDegrees
)

DrawLine

#Since v6.5
Draw a line
public void DrawLine(
pageNumber,
from,
to,
strokeColor,
strokeWidth
)

DrawPolyline

#Since v6.5
Draw a polyline path
public abstract void DrawPolyline(
pageNumber,
polyline,
fillColor,
strokeColor,
strokeWidth
)

DrawText

#Since v6.5
Draw text on a page
public abstract void DrawText(
pageNumber,
text,
x,
y,
heightPoints,
onfont,
fillColor,
strokeColor,
strokeWidth,
angleDegrees,
horizontalAlignment,
verticalAlignment
)

FirePreWriteEvent

#
Called by the framework to fire a PreWrite event
protected void FirePreWriteEvent()

GetCustomPages

#Since v9.0
Get a list of custom PDF page definitions defined by the user
public static PrintedPageDefinition[] GetCustomPages()

PdfDocumentImplementation

#Since v6.0
Get actual implementation of PdfDocument class
public abstract object PdfDocumentImplementation()

Read

#Since v8.0
Read a PDF file into a RhinoDoc
public static bool Read(
path,
path to read a file from
doc,
document to import geometry into
options
options used for importing the PDF file
)
true on success

SetCustomPages

#Since v9.0
Set the list of custom PDF page definitions
public static void SetCustomPages()

Write

#Since v6.0
Write PDF to a stream
public abstract void Write(
stream
)

Write

#Since v6.0
Write PDF to a file
public abstract void Write(
filename
)

Events

PreWrite

#Since v6.0
Fired immediately before a PDF is written
public static event EventHandler<FilePdfEventArgs> PreWrite