/ViewerPreferences /PrintScaling hint를 디코딩한 값입니다. PDF 작성자가 viewer의 print dialog 기본값을 application-defined fit-to-page scaling으로 둘지, 아니면 page를 작성된 크기로 인쇄할지 알려 줍니다property PrintScaling: Boolean; // read only
/ViewerPreferences의 /PrintScaling 항목은 PDF 32000-1 § 12.2 Table 150에 따라 두 개의 named value 중 하나를 받습니다
/AppDefault — viewer가 평소의 scaling behaviour를 적용하게 합니다 (보통 "Fit to printable area"). PDFiumPas는 이를 True로 매핑합니다/None — document가 의도한 physical size로 배치되었으며 축소나 맞춤 없이 printer로 1:1 전송해야 합니다. PDFiumPas는 이를 False로 매핑합니다PDF print pipeline을 연결할 때 이 property를 사용하면 사용자가 document가 무엇을 기대하는지 다시 추측할 필요가 없습니다. Form, 고정 형식 invoice, bar code가 있는 label, pre-press proof는 보통 /None을 설정하고, brochure와 bound document는 종종 기본값을 그대로 두어 어떤 paper size에도 맞게 합니다
이것은 단지 hint일 뿐입니다. PDFium은 rasterisation 동안 이를 강제하지 않습니다. 실제로 rendered bitmap이나 PostScript stream을 scaling하거나 scaling하지 않는 것은 VCL Printer, GDI StartDoc 또는 다른 printing layer입니다. print dialog를 채울 때는 PrintPaperHandling, PrintCopies, PrintPageRanges와 함께 사용합니다
/ViewerPreferences에 없으면 PDFium은 규격 기본값 True (AppDefault)를 돌려줍니다ViewerPreference['PrintScaling']를 읽습니다. 이 값은 문자 그대로의 token을 돌려줍니다/None이면 Print dialog에서 자동으로 "Actual size"를 선택해 이 설정을 따릅니다PrintScaling = False일 때는 Fit-to-Page를 끄고, True일 때는 기본 radio button을 그대로 둡니다
// 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;