PDFium Component Docs

PrintPaperHandling プロパティ

この API エントリでは識別子、シグネチャ、コードブロック、PDF 用語を元の表記のまま保持します。
コンポーネント: TPdf  ·  ユニット: PDFium
Decoded value of the document's /ViewerPreferences /Duplex hint — the simplex / duplex paper-handling mode the PDF author would like the print dialog to default to.

構文

property PrintPaperHandling: TPrintPaperHandling; // read only

説明

The /Duplex entry of /ViewerPreferencesは、プリンターが文書の用紙をどのように扱うべきかを推奨します (PDF 32000-1 § 12.2 Table 150)。PDFium は名前付きトークンをデコードし、TPrintPaperHandling enum value:

他の印刷関連プロパティと同様、これは作成者がファイルに埋め込んだヒントであり、PDFium は強制しません。この設定に従うには、印刷レイヤーが値をプリンタードライバーへ渡す必要があります。Windows GDI ではSetPdfPrintPaperHandlingDevMode to set DEVMODE.dmFields and DEVMODE.dmDuplex to DMDUP_SIMPLEX, DMDUP_VERTICAL (long edge), or DMDUP_HORIZONTAL (short edge) before StartDoc.

Pair this property with PrintScaling, PrintCopies and PrintPageRanges so all of the document's print preferences populate your print dialog as one consistent default set.

備考

// Pre-select the duplex radio buttons and prepare the printer DevMode.
begin
  case Pdf1.PrintPaperHandling of
    phSimplex: radioSimplex.Checked := True;
    phDuplexFlipLongEdge: radioDuplexLong.Checked := True;
    phDuplexFlipShortEdge: radioDuplexShort.Checked := True;
  else
    radioPrinterDefault.Checked := True; // phUndefined
  end;

  if SetPdfPrintPaperHandlingDevMode(DevMode, Pdf1.PrintPaperHandling) then
    ApplyPrinterDevMode(DevMode);
end;

関連項目

PrintCopies, PrintScaling, PrintPageRanges, SetPdfPrintPaperHandlingDevMode, ViewerPreference