PeachPDF
PeachPDF
PdfGenerateConfig Class
The settings for generating PDF using PdfGenerator
public sealed class PdfGenerateConfig
Inheritance System.Object → PdfGenerateConfig
| Properties | |
|---|---|
| CompressContentStreams | Gets or sets whether PDF content streams are compressed with FlateDecode. Defaults to true. Set to false to produce human-readable PDF streams, which is useful for testing or debugging. |
| DefaultLanguage | A fallback language (e.g. "en-US") used for language-dependent rendering — currently hyphens: auto automatic hyphenation — only when the document itself declares none via <html lang="...">. A document’s own lang attribute always takes priority over this setting when present. Per the CSS Text spec, automatic hyphenation requires knowing the text’s language; PeachPDF never guesses one on its own, so a document with no lang and no DefaultLanguage set will not be automatically hyphenated. Set this when you know your content’s language out-of-band and want automatic hyphenation to apply anyway. |
| EnableTaggedPdf | When set to true, PeachPDF emits a PDF/UA-style tagged structure tree (StructTreeRoot, MarkInfo, per-element structure elements and marked content) alongside the visual content, mapping the HTML element tree to standard PDF structure types (see the -peachpdf-pdf-tag-type CSS property for how the mapping is controlled). Defaults to false — tagging adds a real amount of extra object-model bookkeeping per page, so it is an explicit, informed opt-in. |
| ManualPageHeight | if the page size is undefined this allows you to set manually the page height in points |
| ManualPageWidth | if the page size is undefined this allows you to set manually the page width in points |
| MarginBottom | the bottom margin between the page end and the text |
| MarginLeft | the left margin between the page start and the text |
| MarginRight | the right margin between the page end and the text |
| MarginTop | the top margin between the page start and the text |
| MinContentWidth | When set to a positive number, sets the PixelsPerInch to fit the minimum content width |
| NetworkLoader | The resources to load network content for the renderer. If null is provided, then an implementation that loads only the default document and any resources with data: URIs is provided We ship with MimeKit (MHTML) and HttpClient based implementations that can be used instead. |
| PageOrientation | the orientation of each page of the generated pdf |
| PageSize | the page size to use for each page in the generated pdf |
| PixelsPerInch | the amount of pixels per inch. We always render at 72 points per inch, so this is used to determine how many pixels a point is |
| ScaleToPageSize | When set to true, this renders the page and automatically scales PixelsPerInch to fit the page contents |
| ShrinkToFit | When set to true, sets the PixelsPerInch to fit the page contents only if the page contents is larger than the window |
| Methods | |
|---|---|
| SetMargins(int) | Set all 4 margins to the given value. |