PDFiumVCL Docs

PrintScaling property

Bu API girdisi tanımlayıcıları, imzaları, kod bloklarını ve PDF terimlerini özgün biçiminde korur.
Component: TPdf  ·  Unit: PDFium
Decoded value of the document's /ViewerPreferences /PrintScaling hint — whether the PDF author wants the viewer's print dialog to default to application-defined fit-to-page scaling or to print pages at their authored size.

Syntax

property PrintScaling: Boolean; // read only

Description

The /PrintScaling entry of /ViewerPreferences takes one of two named values per PDF 32000-1 § 12.2 Table 150:

Use the property when wiring a PDF print pipeline so the user does not have to second guess what the document expects. Forms, fixed-format invoices, labels with bar codes, and pre-press proofs typically set /None so the bar codes / measurements come out exactly the right size; brochures and bound documents typically leave the default so they fit any paper size.

This is a hint only — PDFium does not enforce it during rasterisation. Your printing layer (VCL Printer, GDI StartDoc, or any other) is what actually scales (or refuses to scale) the rendered bitmap or PostScript stream. Pair it with PrintPaperHandling, PrintCopies and PrintPageRanges when populating a print dialog.

Remarks

Example

// Apply the document's preferred scaling mode to the printer setup.
begin
  if Pdf1.PrintScaling then
  begin
    radioFit.Checked := True;
    Memo1.Lines.Add('PDF prefers app-default (fit to page) scaling');
  end
  else
  begin
    radioActualSize.Checked := True;
    Memo1.Lines.Add('PDF requests actual-size print (no scaling)');
  end;
end;

See Also

PrintCopies, PrintPageRanges, PrintPaperHandling, ViewerPreference