PageList and PDF
I tried the PageList with the PDF Device with the following code:
The PDF contains all pages.
Where is my mistake?
I have to go the way over: "SendEachPageAsNewPDFFile"?
Thanks, Olaf
procedure TMainF.ppArchiveReader1BeforePrint(Sender: TObject);
begin
if (ppArchiveReader1.PrinterDevice <> nil) then
begin
ppArchiveReader1.PrinterDevice.PageSetting := psPageList;
ppTextToPageList('1,2', ppArchiveReader1.PrinterDevice.PageList, True);
end;
end;
procedure TMainF.bRafToPDFClick(Sender: TObject);
begin
ppArchiveReader1.PDFSettings.OpenPDFFile := True;
ppArchiveReader1.ShowPrintDialog := False;
ppArchiveReader1.ArchiveFileName := 'C:\tmp\Archiv\test.raf';
ppArchiveReader1.TextFileName := 'C:\tmp\Archiv\test.pdf';
ppArchiveReader1.DeviceType := dtPDF;
ppArchiveReader1.Print;
ppArchiveReader1.Reset;
end;
The PDF contains all pages.
Where is my mistake?
I have to go the way over: "SendEachPageAsNewPDFFile"?
Thanks, Olaf
procedure TMainF.ppArchiveReader1BeforePrint(Sender: TObject);
begin
if (ppArchiveReader1.PrinterDevice <> nil) then
begin
ppArchiveReader1.PrinterDevice.PageSetting := psPageList;
ppTextToPageList('1,2', ppArchiveReader1.PrinterDevice.PageList, True);
end;
end;
procedure TMainF.bRafToPDFClick(Sender: TObject);
begin
ppArchiveReader1.PDFSettings.OpenPDFFile := True;
ppArchiveReader1.ShowPrintDialog := False;
ppArchiveReader1.ArchiveFileName := 'C:\tmp\Archiv\test.raf';
ppArchiveReader1.TextFileName := 'C:\tmp\Archiv\test.pdf';
ppArchiveReader1.DeviceType := dtPDF;
ppArchiveReader1.Print;
ppArchiveReader1.Reset;
end;
This discussion has been closed.
Comments
It looks as though you are setting the page list of the PrinterDevice rather
than the PDF device. Try using the FileDevice property rather than the
PrinterDevice property.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com