如何检测用户是否正在打印到PDF?

时间:2014-07-21 19:00:39

标签: delphi pdf

我使用Delphi 7并想知道该文件是否正在打印到PDF设备,因此我可以进行一些特殊处理。这就是我必须要让它发挥作用。

// If the printer is a PDF type it will ask for the file name here.
Printer.BeginDoc;
// The next line returns the file extension of the original file name and 
// not the extension of the file being printed to.
Extension := AnsiUpperCase(ExtractFileExt(Printer.Title));
// I've added this line to get it to work but want to be able 
// just check if the current child is being printed to a pdf device.
if CustomPrintDialog.ActivePrinter.Caption = 'Adobe PDF' then

0 个答案:

没有答案