GraffitiHTMLtoPDF

Images #

About #

GraffitiHTMLtoPDF can take your arbitrary HTML and output a rasterized PDF.

Supported Features:

  • Google Font Loading
  • Arbitrary CSS
  • Orientation
  • Page Sizes
  • Header and Footer Templates
  • Watermark
  • Compression
  • Metadata
  • Password Protection

Enumerations #

Name Values
Formats A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
B10
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10
CreditCard
DL
GovernmentLetter
JuniorLegal
Ledger
Legal
Letter
Tabloid
Orientations Portrait
Landscape
Units Centimeters
Inches
Millimeters
Points

Constants #

Name Type Value
PageBreak String <div class=’page-break’></div>

Events #

Definition Parameters Return Type Description
BuildFailed None None Raised when the PDF has failed to build within the FailureTimeout specified. Indicates an error, likely missing font or unreachable remote image resource.
DocumentReady file as FolderItem None Raised when the HTML has been converted to a PDF document.
ImageFailed ByRef url as String Boolean Raised when an image has failed to load. Modify URL with a BASE64 string representation of an image and return False to continue or Return True to cancel the build.
StructureReady document as JSONItem Boolean Raised when the JSON structure of the document is ready. This JSON is passed to the document renderer. Return True to cancel building.

Methods #

Definition Parameters Return Type Description
Build document as GraffitiPDFDocument None Builds the specified document.

Properties #

Name Type Default Value Description
FailureTimeout Integer 1500 Time in milliseconds that a build operation should be allowed before failing.
OutputQuality Double 1.0 Quality of rasterized pages. Values between 0 and 1.
Scale Double 0 Scale of rasterized pages. If value = 0 then the current display value is used.

Examples #

This class currently has no examples.

Notes #

This class currently has no notes.