OnFileSaved event not fired for first file printed

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

guy.marom
User
Posts: 98
Joined: Tue Feb 17, 2009 12:08 pm

OnFileSaved event not fired for first file printed

Post by guy.marom »

I am using a windows service that uses the printer driver's API.
The behavior in my service is that the OnFileSaved event does not get fired for the first print job, and then I do a "Reset" for the printer driver which includes:
1) Dispose of the current virtual printer instance
2) Killing manually all pdfSaver4 processes (This is a workaround for another bug I submitted here)
After this first reset, the event fires just fine.

In the attached sample, the event doesn't fire at all. Maybe if you can help me with this problem it will help with my other one.
Thanks,
Guy Marom
You do not have the required permissions to view the files attached to this post.
guy.marom
User
Posts: 98
Joined: Tue Feb 17, 2009 12:08 pm

Re: OnFileSaved event not fired for first file printed

Post by guy.marom »

This issue is still not resolved in build 159
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: OnFileSaved event not fired for first file printed

Post by Ivan - Tracker Software »

hm, will check.
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.
jabaran
User
Posts: 18
Joined: Wed Sep 09, 2009 4:01 pm

Re: OnFileSaved event not fired for first file printed

Post by jabaran »

I'm experiencing the same problem was there any resolution to this or a work around I can code to?
guy.marom
User
Posts: 98
Joined: Tue Feb 17, 2009 12:08 pm

Re: OnFileSaved event not fired for first file printed

Post by guy.marom »

I wrote my own workaround, the printer has a property telling it what to execute after printing. I wrote a little listener and a client. The printer opens the client after printing and the listener waits for it. That's how I know when printing's finished.
jabaran
User
Posts: 18
Joined: Wed Sep 09, 2009 4:01 pm

Re: OnFileSaved event not fired for first file printed

Post by jabaran »

Happen to know the name of the property? Is it another means of firing a function basically? Did you stop using the saved event entirely?
guy.marom
User
Posts: 98
Joined: Tue Feb 17, 2009 12:08 pm

Re: OnFileSaved event not fired for first file printed

Post by guy.marom »

Here's a piece from my code:
mPrinter.Option("Save.SaveType") = 2
mPrinter.Option("Save.ShowSaveDialog") = 0 'Do not show save dialog
mPrinter.Option("Save.Path") = Common.PrinterOutputDir 'The save path
mPrinter.Option("Save.WhenExists") = 3 'When filename already exists, append to it. This is done because excel creates multi jobs when it has more than one sheet.
mPrinter.Option("Save.RunApp") = 1 'Run an application after saving the file
mPrinter.Option("Save.RunCustom") = 1 'Run a custom application and not the default app (Which opens the PDF for viewing)
mPrinter.Option("Save.AppName") = Common.SendFilenameExe 'The application to run after saving
mPrinter.Option("Save.AppParams") = "%f" 'The command line parameters when running the application = %f is the full path of the saved file
mPrinter.Option("Save.File") = FileName


You should really consult the documentation file, it's really helpful.
Hope this helps...
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom

Re: OnFileSaved event not fired for first file printed

Post by John - Tracker Supp »

Thnaks Guy - much appreciated - particuarly your final comment :-)

cheers
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