Printer Dialog
RB10Pro, D7.
I'm wanting to produce PDF files from the printer dialog.
When I check 'Print to File' on the Printer Dialog is there any way I
can force 'Type' to be PDF only or at least default 'Type' to PDF.
In addition, are there any events I can hook into to change the file
extension in the 'Where' box in reaction to changes in 'Type'.
I'm wanting to produce PDF files from the printer dialog.
When I check 'Print to File' on the Printer Dialog is there any way I
can force 'Type' to be PDF only or at least default 'Type' to PDF.
In addition, are there any events I can hook into to change the file
extension in the 'Where' box in reaction to changes in 'Type'.
This discussion has been closed.
Comments
conventional preview, ie devicetype = 'screen'.
You can override the OnClick event of the print button in the preview window
to assign the device type and print the report to the device you need. For
instance...
uses
ppPrvDlg;
...
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).PrintButton.OnClick :=
PrintButtonClick;
end;
procedure TForm1.PrintButtonClick(Sender: TObject);
begin
ppReport1.DeviceType := 'PDF';
ppReport1.Print;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com