# GraffitiPDF
Module
## About
GraffitiPDF is a powerful PDF generation library with support for annotations, HTML embedding, tables, forms, paths, images, and more. PDFs are generated client-side to reduce resource load on the server.
## Members
- [Builder](/builder.md)
- [Image](/image.md)
- [SVG](/svg.md)
- [SingleLineText](/singlelinetext.md)
- [MultiLineText](/multilinetext.md)
- [Annotation](/annotation.md)
- [Path](/path.md)
- [Forms](/forms)
- [Tables](/tables)
- [TextContent](/textcontent.md)
- [HTML](/html.md)
- [Internal](/internal)
- [Document](/document.md)
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| DefaultPageDimensions | format as GraffitiPDF.Document.Formats <br> orientation as GraffitiPDF.Document.Orientations | Size | Returns a size object with the default width and height of pages in the Points unit. |
| PageScalingFactor | unit as GraffitiPDF.Document.Units | Double | (None) |
## Notes
### Format Sizes
GraffitiPDF's format sizes, by name, in Points:
```
Constant Width Height
FormatA0 2383.94 3370.39
FormatA1 1683.78 2383.94
FormatA2 1190.55 1683.78
FormatA3 841.89 1190.55
FormatA4 595.28 841.89
FormatA5 419.53 595.28
FormatA6 297.64 419.53
FormatA7 209.76 297.64
FormatA8 147.40 209.76
FormatA9 104.88 147.40
FormatA10 73.70 104.88
FormatB0 2834.65 4008.19
FormatB1 2004.09 2834.65
FormatB2 1417.32 2004.09
FormatB3 1000.63 1417.32
FormatB4 708.66 1000.63
FormatB5 498.90 708.66
FormatB6 354.33 498.90
FormatB7 249.45 354.33
FormatB8 175.75 249.45
FormatB9 124.72 175.75
FormatB10 87.87 124.72
FormatC0 2599.37 3676.54
FormatC1 1836.85 2599.37
FormatC2 1298.27 1836.85
FormatC3 918.43 1298.27
FormatC4 649.13 918.43
FormatC5 459.21 649.13
FormatC6 323.15 459.21
FormatC7 229.61 323.15
FormatC8 161.57 229.61
FormatC9 113.39 161.57
FormatC10 79.37 113.39
Formatdl 311.81 623.62
Formatletter 612 792
Formatgovernment-letter 576 756
Formatlegal 612 1008
Formatjunior-legal 576 360
Formatledger 1224 792
Formattabloid 792 1224
Formatcredit-card 153 243
```
### LoadInViewer
In order for LoadInViewer to function, your WebHTMLViewer must have the following code in its Shown event:
## Examples
### Page Numbering
For page numbering, the variables %x and %y are parsed when the PDF is rendered. %x corresponds to the current page while %y corresponds to page count.
The following example will show the current page’s number and total page count in the center position of both the header and footer.
```
doc.Template.HeaderLeft = "Page %x of %y"
```
### Saving PDFs on the Server
Defining the UploadPath property will cause generated PDFs to be automatically saved on your server in the path you provide with the following structure:
`
/UploadPath/Session.Identifier/Year/Month/Day/Filename.PDF
`
Data is not retained in the GraffitiWebFile object to reduce memory usage, and is written directly to the file as it is received.
If UploadPath is Nil then file data will not be transferred back to the server and DocumentReady is only an indicator that you may then safely call the Download, LoadInViewer, and Print methods for client-side functionality.