FilePdf

References
public abstract class FilePdf
Support for PDF file format

Properties

LayersAsOptionalContentGroups

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

Methods

AddPage

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

AddPage

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

Create

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

DrawBitmap

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

DrawLine

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

DrawPolyline

#Since v6.5
public abstract void DrawPolyline(int pageNumber, PointF[] polyline, Color fillColor, Color strokeColor, float strokeWidth)
Draw a polyline path
pageNumber (int)
polyline (PointF[])
fillColor (Color)
strokeColor (Color)
strokeWidth (float)

DrawText

#Since v6.5
public abstract void DrawText(int pageNumber, string text, double x, double y, float heightPoints, Font onfont, Color fillColor, Color strokeColor, float strokeWidth, float angleDegrees, TextHorizontalAlignment horizontalAlignment, TextVerticalAlignment verticalAlignment)
Draw text on a page
pageNumber (int)
text (string)
x (double)
y (double)
heightPoints (float)
onfont (Font)
fillColor (Color)
strokeColor (Color)
strokeWidth (float)
angleDegrees (float)
horizontalAlignment (TextHorizontalAlignment)
verticalAlignment (TextVerticalAlignment)

FirePreWriteEvent

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

GetCustomPages

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

PdfDocumentImplementation

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

Read

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

SetCustomPages

#Since v9.0
public static void SetCustomPages(IEnumerable<PrintedPageDefinition> pages)
Set the list of custom PDF page definitions

Write

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

Write

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

Events

PreWrite

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