Printing with Adobe's TAcroPDF



A few questions:

I have several tabsheets, each with it's own TAcroPDF component on it. When
pressing a button, I want all documents printed without a print dialog.

My code:

for i := 1 to PageControl1.PageCount do begin
ts := PageControl1.FindComponent('Tab***' + IntToStr(i)) as TTab***;
(ts.FindComponent('AcroPDF' + IntToStr(i)) as
TAcroPDF).printAllFit(true);
(ts.FindComponent('AcroPDF' + IntToStr(i)) as TAcroPDF).print;
end;

There is a method printWithDialog, so I assumed the print method would print
without a dialog. Not so. A dialog is shown. Can I print without a dialog ?

Even with a print dialog shown, this is not blocking. So while the print
dialog for the first document is shown, the code keeps running. You would
expect to see three dialogs. But I only see one. I see the example as shown
in the dialog change for each document. Needless to say, when I finally
press print, I only get the last document out the printer.

Is there any way to make this blocking ? And why am I only getting one print
dialog and not three ?

Thanks,
Mark


.


Quantcast