ConvertToPDFR
Compliance, raster exchange
Description
Replaces the selected document with a PDF/R (ISO 23504-1) copy in which every page is one JPEG raster
Syntax
Delphi
Function TPDFlib.ConvertToPDFR(DPI: Double): Integer;Parameters
| DPI | Raster resolution, 72 to 600 |
|---|
Return values
The number of pages converted, or 0 when the resolution is out of range, a page could not be rendered or the copy failed the PDF/R checks
Remarks
Each page is rendered as it appears, rotation included, at the given resolution and JPEG quality (SetJPEGQuality), and becomes an RGB raster page of a new PDF/R document. On success that document replaces the original, which is released, and stays selected; on failure the original is left selected and unchanged
PDF/R keeps the look of the pages only: text, links, form fields, bookmarks and other interactive content are not carried over
Example
PDF.LoadFromFile('scan-ready.pdf', '');
PDF.SetJPEGQuality(85);
if PDF.ConvertToPDFR(300) > 0 then
PDF.SaveToFile('archive-pdfr.pdf');See also
SetPDFRMode, AddPDFRRasterPageFromString, GetPDFRDiagnostics