Lock problem during the "exporting" of a PDF file list

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan

Post Reply
Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Lock problem during the "exporting" of a PDF file list

Post by Stemonte » Wed Jan 26, 2011 11:04 am

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

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14154
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Lock problem during the "exporting" of a PDF file list

Post by Tracker Supp-Stefan » Wed Jan 26, 2011 11:55 am

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

Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: Lock problem during the "exporting" of a PDF file list

Post by Stemonte » Wed Jan 26, 2011 12:02 pm

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;

[...]

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14154
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Lock problem during the "exporting" of a PDF file list

Post by Tracker Supp-Stefan » Wed Jan 26, 2011 4:22 pm

Hi Stefano,

I asked for help some the guys that are more into it in Delphi programming and they should reply shortly.

Best,
Stefan

Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: Lock problem during the "exporting" of a PDF file list

Post by Stemonte » Wed Jan 26, 2011 4:51 pm

thanks, I look forward to good news...

Best,
Stefano Monterisi

Corwin - Tracker Sup
User
Posts: 670
Joined: Tue Nov 14, 2006 12:23 pm

Re: Lock problem during the "exporting" of a PDF file list

Post by Corwin - Tracker Sup » Wed Jan 26, 2011 5:22 pm

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?

Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: Lock problem during the "exporting" of a PDF file list

Post by Stemonte » Thu Jan 27, 2011 9:54 am

As asked me, I've just sent You a pm containing my DriverAPI example modified.

Best,

Stefano Monterisi

Corwin - Tracker Sup
User
Posts: 670
Joined: Tue Nov 14, 2006 12:23 pm

Re: Lock problem during the "exporting" of a PDF file list

Post by Corwin - Tracker Sup » Thu Jan 27, 2011 12:43 pm

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.

Stemonte
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: Lock problem during the "exporting" of a PDF file list

Post by Stemonte » Thu Jan 27, 2011 2:59 pm

meaning? ...using same DriverApi example...

John - Tracker Supp
Site Admin
Posts: 8205
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Lock problem during the "exporting" of a PDF file list

Post by John - Tracker Supp » Thu Jan 27, 2011 3:16 pm

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

Corwin - Tracker Sup
User
Posts: 670
Joined: Tue Nov 14, 2006 12:23 pm

Re: Lock problem during the "exporting" of a PDF file list

Post by Corwin - Tracker Sup » Thu Jan 27, 2011 3:29 pm

Stemonte wrote:meaning? ...using same DriverApi example...
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
User
Posts: 41
Joined: Mon Nov 26, 2007 9:17 am

Re: Lock problem during the "exporting" of a PDF file list

Post by Stemonte » Thu Jan 27, 2011 3:53 pm

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.
Sorry, this is ok. ;-)

but I was referring to
...you may use our PDF-XChange Viewer for printing PDF files
using DriverApi example. :-)

Corwin - Tracker Sup
User
Posts: 670
Joined: Tue Nov 14, 2006 12:23 pm

Re: Lock problem during the "exporting" of a PDF file list

Post by Corwin - Tracker Sup » Thu Jan 27, 2011 4:05 pm

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>]

Post Reply