PDFium Component Docs

PrintScaling-ominaisuus

Component: TPdf  ·  Unit: PDFium
Asiakirjan /ViewerPreferences /PrintScaling-vihjeen purettu arvo — haluaako PDF:n tekijä, että katselimen tulostusikkunan oletuksena on sovelluksen määrittämä sovitus sivulle -skaalaus vai tulostetaanko sivut niiden alkuperäisessä koossa

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