Drivers API V5 Events & Filename Issues

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, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
CipiV
User
Posts: 12
Joined: Mon May 09, 2011 10:56 am

Drivers API V5 Events & Filename Issues

Post by CipiV »

Greetings,

We've been using the V4 Drivers API for about a year in a .NET C# App to convert a variety of formats (Office, HTML etc.) with great success. Yesterday we tried to upgrade to V5 but ran into a couple of issues:

1. OnFileSaved and OnError events are not triggering, even though we can see that a pdf file has been written to disk
2. %[DocName] Macro truncates filenames, we use GUID(36 alphanumeric chars) as file names due to some unique naming constraints
3. PdfSaver5.exe does not unload after closing our application - probably related to the events as no unregistering is taking place if the events have not fired.

This behavior seems to occur on all our development machines (Window 7 Enterprise x64/x86)

We set the default printer to PDF-Xchange and use automation to print (sample code below). Are we doing something wrong? Has the API changed from V4 and our initial code is not valid anymore? Any feedback on this matter is greatly appreciated.

Thanks & regards,
Ciprian.

Sample code for printer initialization:

Code: Select all

var prnFactory = new PXCComLib5.CPXCControlEx();
_pdfPrinter = (PXCComLib5.CPXCPrinter)prnFactory.get_Printer( .. .. .. );
_pdfPrinter.OnFileSaved += prn_OnFileSaved;
_pdfPrinter.OnError += prn_OnError;
_pdfPrinter.set_Option("Save.SaveType", 2);  // Save
_pdfPrinter.set_Option("Save.ShowSaveDialog", false);
_pdfPrinter.set_Option("Save.WhenExists", 1); // Overwrite
_pdfPrinter.set_Option("Save.RunApp", false);
_pdfPrinter.set_Option("Save.StripPath", true);
_pdfPrinter.set_Option("Saver.ShowProgress", false);
_pdfPrinter.set_Option("Save.Path", destinationFolder);
_pdfPrinter.set_Option("Save.File", ConvertedFilesPrefix + "%[DocName]");
_pdfPrinter.SetAsDefaultPrinter();
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17893
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Drivers API V5 Events & Filename Issues

Post by Tracker Supp-Stefan »

Hello Ciprian,

Thanks for your report - we will discuss it now in the team and check if this is a known issue or if a ticket/fix is needed and report back here.
In the mean time could you please confirm that you are using the latest build of the v5 SDK (264)?

Thanks,
Stefan
CipiV
User
Posts: 12
Joined: Mon May 09, 2011 10:56 am

Re: Drivers API V5 Events & Filename Issues

Post by CipiV »

Yes we are using the latest build (264), and using Interop.PXCComLib5.dll in out project.

EDIT: Example project seems to work correctly, so i'm assuming it might have something to do with the fact that we're running the init & conversion on a background thread (using .NET BackgroundWorker) ?
Nico - Tracker Supp
User
Posts: 205
Joined: Fri May 18, 2012 8:41 pm

Re: Drivers API V5 Events & Filename Issues

Post by Nico - Tracker Supp »

Hi CipiV,

Thank you for your post.

We were able to reproduce this issue and created a bug fix request with ticket number RT#1633.
As soon as possible a solution becomes available we will notify you to upgrade your SDK version to include the fix.
In the meantime, you can use version 4 of the SDK as a workaround.

If you have any questions please let us know.

Thanks.
Sincerely,
CipiV
User
Posts: 12
Joined: Mon May 09, 2011 10:56 am

Re: Drivers API V5 Events & Filename Issues

Post by CipiV »

Hello again,

Any updates on these issues or an approximate ETA for the fix/new version?

Thanks & regards,
Ciprian.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17893
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Drivers API V5 Events & Filename Issues

Post by Tracker Supp-Stefan »

Hi Ciprian,

I am afraid that this ticket is still not resolved. When I have any further news I will publish it here in this topic.

Best,
Stefan
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Drivers API V5 Events & Filename Issues

Post by Ivan - Tracker Software »

Can you try the latest build of the driver and confirm that the issue still exists?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
CipiV
User
Posts: 12
Joined: Mon May 09, 2011 10:56 am

Re: Drivers API V5 Events & Filename Issues

Post by CipiV »

Hello Ivan,

Sorry for replying so late, we took a lot of time to test the newest build. Unfortunately the issue still exists, but we've managed to narrow down the cause.
The sample project from the API seemed to work properly, while our own implementation didn't. The main difference between the projects was the target framework. We then proceeded to change the target framework for the sample project from .NET 2.0 to .NET 4.0 (and updating the references) and managed to replicate the issues in the sample project as well.

We also tried other versions of the .NET framework and every one up to 3.5 including seems to work, 4.0 & 4.5 do not work.

Hope this helps you,

Regards,
Ciprian.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Drivers API V5 Events & Filename Issues

Post by Corwin - Tracker Sup »

Hello Ciprian,

Try to turn off "Embed Interop Types" in PXCComLib5 properties (this can be done in your project references -> right click on PXCComLib5 -> "Properties") and then rebuild solution.

HTH.
CipiV
User
Posts: 12
Joined: Mon May 09, 2011 10:56 am

Re: Drivers API V5 Events & Filename Issues

Post by CipiV »

Oh blast,

Don't know why we assumed that it defaulted to false (we had this issue with another SDK already).

Thanks a lot for your help & patience.

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

Re: Drivers API V5 Events & Filename Issues

Post by Tracker Supp-Stefan »

:)
Post Reply