Lock problem during the "exporting" of a PDF file list
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
Lock problem during the "exporting" of a PDF file list
Hi,
I have used and modified your API Demo to export a pdf file list into PDF/A files, but the first iteration stops because Adobe start itself but not close itself. The iteration continues to the next step only when I close manually Adobe, with the same problem of the prior step.
How solve it?
Thanks.
Stefano Monterisi
I have used and modified your API Demo to export a pdf file list into PDF/A files, but the first iteration stops because Adobe start itself but not close itself. The iteration continues to the next step only when I close manually Adobe, with the same problem of the prior step.
How solve it?
Thanks.
Stefano Monterisi
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Lock problem during the "exporting" of a PDF file list
Hello Stefano,
Try setting RunApp to False, as the default Value of True, will launch your default application for Viewing PDF files after the printing of the current document is complete, and Adobe's Acrobat on your machine is most probably locking the file.
Best,
Stefan
Try setting RunApp to False, as the default Value of True, will launch your default application for Viewing PDF files after the printing of the current document is complete, and Adobe's Acrobat on your machine is most probably locking the file.
Best,
Stefan
Re: Lock problem during the "exporting" of a PDF file list
Hi,
RunApp is already set to False.
this the Delphi code from ApiDemo App:
[...]
PDFPrinter.Option['Save.RunApp']:=False;//cb_RunViewer.checked;
//
PDFPrinter.Option['Save.File'] := ed_Dest.Text;
PDFPrinter.Option['Save.SaveType'] := 'Save';
PDFPrinter.Option['Save.ShowSaveDialog'] := 'No';
PDFPrinter.Option['Save.WhenExists'] := 'Overwrite';
//
if cb_Compression.Checked then
begin
PDFPrinter.Option['Compression.Graphics'] := 'Yes';
PDFPrinter.Option['Compression.Text'] := 'Yes';
PDFPrinter.Option['Compression.ASCII'] := 'No';
PDFPrinter.Option['Compression.Color.Enabled'] := 'Yes';
PDFPrinter.Option['Compression.Color.Method'] := 'Auto';
PDFPrinter.Option['Compression.Indexed.Enabled'] := 'Yes';
PDFPrinter.Option['Compression.Indexed.Method'] := 'Auto';
PDFPrinter.Option['Compression.Mono.Enabled'] := 'Yes';
PDFPrinter.Option['Compression.Mono.Method'] := 'Auto';
end
else //cb_Compression.Checked
begin
PDFPrinter.Option['Compression.Graphics'] := 'No';
PDFPrinter.Option['Compression.Text'] := 'No';
end; //not cb_Compression.Checked
//
PDFPrinter.Option['Fonts.EmbedAll'] := cb_embFonts.Checked;
[...]
RunApp is already set to False.
this the Delphi code from ApiDemo App:
[...]
PDFPrinter.Option['Save.RunApp']:=False;//cb_RunViewer.checked;
//
PDFPrinter.Option['Save.File'] := ed_Dest.Text;
PDFPrinter.Option['Save.SaveType'] := 'Save';
PDFPrinter.Option['Save.ShowSaveDialog'] := 'No';
PDFPrinter.Option['Save.WhenExists'] := 'Overwrite';
//
if cb_Compression.Checked then
begin
PDFPrinter.Option['Compression.Graphics'] := 'Yes';
PDFPrinter.Option['Compression.Text'] := 'Yes';
PDFPrinter.Option['Compression.ASCII'] := 'No';
PDFPrinter.Option['Compression.Color.Enabled'] := 'Yes';
PDFPrinter.Option['Compression.Color.Method'] := 'Auto';
PDFPrinter.Option['Compression.Indexed.Enabled'] := 'Yes';
PDFPrinter.Option['Compression.Indexed.Method'] := 'Auto';
PDFPrinter.Option['Compression.Mono.Enabled'] := 'Yes';
PDFPrinter.Option['Compression.Mono.Method'] := 'Auto';
end
else //cb_Compression.Checked
begin
PDFPrinter.Option['Compression.Graphics'] := 'No';
PDFPrinter.Option['Compression.Text'] := 'No';
end; //not cb_Compression.Checked
//
PDFPrinter.Option['Fonts.EmbedAll'] := cb_embFonts.Checked;
[...]
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Lock problem during the "exporting" of a PDF file list
Hi Stefano,
I asked for help some the guys that are more into it in Delphi programming and they should reply shortly.
Best,
Stefan
I asked for help some the guys that are more into it in Delphi programming and they should reply shortly.
Best,
Stefan
Re: Lock problem during the "exporting" of a PDF file list
thanks, I look forward to good news...
Best,
Stefano Monterisi
Best,
Stefano Monterisi
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Lock problem during the "exporting" of a PDF file list
Hi Stefano,
Actually when you set "Save.RunApp" to false any of PDF viewers should not be opened. Can you send us your sample project so we can check it here?
Actually when you set "Save.RunApp" to false any of PDF viewers should not be opened. Can you send us your sample project so we can check it here?
Re: Lock problem during the "exporting" of a PDF file list
As asked me, I've just sent You a pm containing my DriverAPI example modified.
Best,
Stefano Monterisi
Best,
Stefano Monterisi
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Lock problem during the "exporting" of a PDF file list
Hi Stefano,
As I can see, you are trying to print PDF file using Acrobat Reader. But the problem is that after executing "printto" command Adobe Acrobat Reader remains opened and there is nothing we can do with it. You may try to close it automatically by sending WM_CLOSE command. Also you may use our PDF-XChange Viewer for printing PDF files which doesn't have such problem.
As I can see, you are trying to print PDF file using Acrobat Reader. But the problem is that after executing "printto" command Adobe Acrobat Reader remains opened and there is nothing we can do with it. You may try to close it automatically by sending WM_CLOSE command. Also you may use our PDF-XChange Viewer for printing PDF files which doesn't have such problem.
Re: Lock problem during the "exporting" of a PDF file list
meaning? ...using same DriverApi example...
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Lock problem during the "exporting" of a PDF file list
Meaning the file is locked and unavailable to other applications as it is still open in another and not fully released.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Lock problem during the "exporting" of a PDF file list
If you will try to print MS Word document using ShellExecute with "printto" command, you will see that Word will close itself right after printing and this is normal behavior for most programs. Anyway we cannot change this fact, that Acrobat still stays opened after printing.Stemonte wrote:meaning? ...using same DriverApi example...
Re: Lock problem during the "exporting" of a PDF file list
Sorry, this is ok.If you will try to print MS Word document using ShellExecute with "printto" command, you will see that Word will close itself right after printing and this is normal behavior for most programs. Anyway we cannot change this fact, that Acrobat still stays opened after printing.
but I was referring to
using DriverApi example....you may use our PDF-XChange Viewer for printing PDF files
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Lock problem during the "exporting" of a PDF file list
Well, you may set PDF-XChange Viewer as default viewer for PDF files and use ShellExecute method, or you may use Viewer command line arguments, which has this arguments:
"...\PDFXCview.exe" /printto[:[default=yes|no][&showui=yes|no][&pages=<pagesrange>]] <printername> <filename1> [<filename2> ... <filenameN>]
"...\PDFXCview.exe" /printto[:[default=yes|no][&showui=yes|no][&pages=<pagesrange>]] <printername> <filename1> [<filename2> ... <filenameN>]