Hi,
We have valid PDFXchange developer licence and use it for printing trough Navision. However some files are still generated with DEMO signs.
It is like 97% of them is OK (no demo sign). Rest of them has demo sign in generated PDF file (by random).
NAV initiate PDFXchange with developer licence. Then the function prints several files every hour. Let`s say 10. Most of the time the files are OK, but sometime few of them contains demo signs (3 with demo, 7 without demo sign).
Can we check the licenece before printing ? To make sure that PDFXchange has been initiated properly ?
Pedro
Dynamics NAV - developer licence printing with demo sign
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Dynamics NAV - developer licence printing with demo sign
Hi Pedro,
You have posted in the PDF Tools SDK subforum, but are you using the PDF Tools to generate those PDFs or e.g. the Drivers API? (I see AutoCont has a PDF XChange Pro SDK license which is valid for both components).
Also if you are going to post any snippets in the forums please make sure that ANY license info is removed!
Best,
Stefan
You have posted in the PDF Tools SDK subforum, but are you using the PDF Tools to generate those PDFs or e.g. the Drivers API? (I see AutoCont has a PDF XChange Pro SDK license which is valid for both components).
Also if you are going to post any snippets in the forums please make sure that ANY license info is removed!
Best,
Stefan
Re: Dynamics NAV - developer licence printing with demo sign
To be honest I do not know if API or PDF tools are used ( I am not a profesional programmer).
The function which initiates the PDFXchange printer look like this (see the code with comments bellow - all the sensitive parts are removed ).
What has helped for a while was to set long sleep statement. But the function must work so make it sleep (for infinity) longer is not useful now
BR
Pedro
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
PROCEDURE Init_PDF_Printer(ltePrefix: Text[30];lcoDocNo: Code[20]);
BEGIN
CREATE(gauPDF); // it creates NAV automation. Some kind of variable.
SLEEP(10000); // originaly sleep statement has been set for 1000 "units". More delay leads to less DEMO signed files.
gauPrinter := gauPDF.Printer('', 'NavToPDF', 'here is licence number',
'developer code');
// is it possible to check licence number here ?
gauPrinter.Option('Save.SaveType', 2);
gauPrinter.Option('Save.ShowSaveDialog', FALSE);
gauPrinter.Option('Save.Path', 'c:\');
GetPdfFileName(ltePrefix, lcoDocNo);
gauPrinter.Option('Save.File', gteFileName);
gauPrinter.Option('Save.WhenExists', 1);
gauPrinter.Option('Save.RunApp', FALSE);
gauPrinter.SetAsDefaultPrinter;
SLEEP(10000); // originaly sleep statement has been set for 1000 "units". More delay leads to less DEMO signed files.
END;
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
The function which initiates the PDFXchange printer look like this (see the code with comments bellow - all the sensitive parts are removed ).
What has helped for a while was to set long sleep statement. But the function must work so make it sleep (for infinity) longer is not useful now
BR
Pedro
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
PROCEDURE Init_PDF_Printer(ltePrefix: Text[30];lcoDocNo: Code[20]);
BEGIN
CREATE(gauPDF); // it creates NAV automation. Some kind of variable.
SLEEP(10000); // originaly sleep statement has been set for 1000 "units". More delay leads to less DEMO signed files.
gauPrinter := gauPDF.Printer('', 'NavToPDF', 'here is licence number',
'developer code');
// is it possible to check licence number here ?
gauPrinter.Option('Save.SaveType', 2);
gauPrinter.Option('Save.ShowSaveDialog', FALSE);
gauPrinter.Option('Save.Path', 'c:\');
GetPdfFileName(ltePrefix, lcoDocNo);
gauPrinter.Option('Save.File', gteFileName);
gauPrinter.Option('Save.WhenExists', 1);
gauPrinter.Option('Save.RunApp', FALSE);
gauPrinter.SetAsDefaultPrinter;
SLEEP(10000); // originaly sleep statement has been set for 1000 "units". More delay leads to less DEMO signed files.
END;
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Dynamics NAV - developer licence printing with demo sign
Can you handle events from COM objects in the NAV?
Demo watermarks will appear when you start printing and then release the printer object before spooling has finished.
The best way to prevent that is 'listening to' the events OnDocSpooled or OnFileSaved and OnError from printer object, and release it after.
hth
Demo watermarks will appear when you start printing and then release the printer object before spooling has finished.
The best way to prevent that is 'listening to' the events OnDocSpooled or OnFileSaved and OnError from printer object, and release it after.
hth
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.
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.
Re: Dynamics NAV - developer licence printing with demo sign
NAV should be able to handle those events. So we will try it.
Pedro
Pedro
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Dynamics NAV - developer licence printing with demo sign
Happy we could help Pedro,
Do let us know how it goes!
Best,
Stefan
Do let us know how it goes!
Best,
Stefan