# FilePdf class

Namespace: [Rhino.FileIO](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.fileio.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public abstract class FilePdf
```

Support for PDF file format

## Properties

- [LayersAsOptionalContentGroups](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/layersasoptionalcontentgroups.md): Add layers as "optional content groups" to the PDF. This is the visible layer tree available in PDF viewers

## Methods

- [AddPage](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/addpage.md): (2 overloads) Add a blank page to this document
- [Create](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/create.md): (static) Create a new instance of a FilePdf class
- [DrawBitmap](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/drawbitmap.md): Draw a bitmap
- [DrawLine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/drawline.md): Draw a line
- [DrawPolyline](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/drawpolyline.md): Draw a polyline path
- [DrawText](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/drawtext.md): Draw text on a page
- [FirePreWriteEvent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/fireprewriteevent.md): Called by the framework to fire a PreWrite event
- [GetCustomPages](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/getcustompages.md): (static) Get a list of custom PDF page definitions defined by the user
- [PdfDocumentImplementation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/pdfdocumentimplementation.md): Get actual implementation of PdfDocument class
- [Read](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/read.md): (static) Read a PDF file into a RhinoDoc
- [SetCustomPages](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/setcustompages.md): (static) Set the list of custom PDF page definitions
- [Write](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/write.md): (2 overloads) Write PDF to a stream

## Events

- [PreWrite](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.filepdf/prewrite.md): (static) Fired immediately before a PDF is written
