PeachPDF

PeachPDF.PdfGenerateConfig

PdfGenerateConfig.RasterizationDpi Property

The resolution, in pixels per inch of <em>paper</em>, at which PeachPDF renders the effects a PDF cannot express as vector content (for example filter: blur()) into bitmaps before embedding them. Defaults to 300, the print-quality convention: it stays sharp when a viewer is zoomed to several hundred percent or the file is printed. Valid values are 72 to 1200; anything else throws an System.ArgumentOutOfRangeException when generation starts.

public double RasterizationDpi { get; set; }

Property Value

System.Double

Remarks

The value is a physical resolution and is independent of PixelsPerInch: a bitmap is always placed at exactly the size of the content it replaces, so an inch of the page stays an inch, and only the number of pixels backing it changes. For example with PixelsPerInch of 96 and a value of 288, each CSS pixel is backed by 3 x 3 = 9 bitmap pixels. Higher values give sharper output and larger files; content that would exceed MaxRasterPixels is rendered at a lower resolution instead (its placed size never changes). Bitmaps are exempt from DownscaleImages.