Automation with MS Dynamics NAV
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
Automation with MS Dynamics NAV
Dear Team,
As i am evaluate PDF-Xchange Ver 4 with MS Dynamics NAV, can you tell me how do i find pdf function/methods like:
"pdf.SetParamStr (0, 'Security.Level', '40')".
Said statement working fine with "PDF-Xchange Ver 3.0", where pdf is a Automation variable and its pointing to
"PDF-XChange V3.0 Type Library" and method "CPXControl". We can declare that variable with that Automation value
of "PDF-Xchange V3.0 Type Library".
Please let me know.
Regards
NIL
As i am evaluate PDF-Xchange Ver 4 with MS Dynamics NAV, can you tell me how do i find pdf function/methods like:
"pdf.SetParamStr (0, 'Security.Level', '40')".
Said statement working fine with "PDF-Xchange Ver 3.0", where pdf is a Automation variable and its pointing to
"PDF-XChange V3.0 Type Library" and method "CPXControl". We can declare that variable with that Automation value
of "PDF-Xchange V3.0 Type Library".
Please let me know.
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hello NIL,
There's been some changes tothe method names when we moved from v3 to v4 of the Tools SDK, so the methods are now e.g.
PXC_SetPermissions
PXC_SetPermissions128
PXC_SetPermissions256
PXC_SetPermissions40
Please make sure to check the PDF Tools SDK Manual file provided with v4 of the SDK.
Best,
Stefan
There's been some changes tothe method names when we moved from v3 to v4 of the Tools SDK, so the methods are now e.g.
PXC_SetPermissions
PXC_SetPermissions128
PXC_SetPermissions256
PXC_SetPermissions40
Please make sure to check the PDF Tools SDK Manual file provided with v4 of the SDK.
Best,
Stefan
Re: Automation with MS Dynamics NAV
Dear Stefan,
Thanks for your reply. How do i get your mentioned method? I mean to say by which class CPXCPrinter or CPXControlEx?
Regards
NIL
Thanks for your reply. How do i get your mentioned method? I mean to say by which class CPXCPrinter or CPXControlEx?
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hi Nil,
In v4 of our PDF Tools SDK there are two sets of functions
The PXCLIB40 LIB Functions (names beginning with PXC_) are aimed at creating new PDF documents, while methods from the XCPRO40 LIB are primarily aimed at manipulating existing PDF files rather than creating new PDF files from NON PDF content.
I would recommend you to download and install the v4 of the SDK:
https://www.pdf-xchange.com/product/pdf-tools-sdk
And check the sample projects provided.
Best,
Stefan
In v4 of our PDF Tools SDK there are two sets of functions
The PXCLIB40 LIB Functions (names beginning with PXC_) are aimed at creating new PDF documents, while methods from the XCPRO40 LIB are primarily aimed at manipulating existing PDF files rather than creating new PDF files from NON PDF content.
I would recommend you to download and install the v4 of the SDK:
https://www.pdf-xchange.com/product/pdf-tools-sdk
And check the sample projects provided.
Best,
Stefan
Re: Automation with MS Dynamics NAV
Dear Stefan,
We cannot access LIB file directly from MS Dynamics NAV (Navision). What is the other way to access this lib file?
Regards
NIL
We cannot access LIB file directly from MS Dynamics NAV (Navision). What is the other way to access this lib file?
Regards
NIL
Re: Automation with MS Dynamics NAV
Dear Stefan,
We can only access .DLL or .OCX from MS Dynamics NAV (Navision).
Regards
NIL
We can only access .DLL or .OCX from MS Dynamics NAV (Navision).
Regards
NIL
Re: Automation with MS Dynamics NAV
Hi Stefan,
Is there any update?
Regards
NIL
Is there any update?
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hi Nil,
I am discussing this with my colleagues and as soon as we have an update I will post it here.
Best,
Stefan
I am discussing this with my colleagues and as soon as we have an update I will post it here.
Best,
Stefan
Re: Automation with MS Dynamics NAV
Hi Stefan,
Also let me know if you want a remote session to see the actual difficulties. If so, then please tell me date & time.
Regards
NIL
Also let me know if you want a remote session to see the actual difficulties. If so, then please tell me date & time.
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hi Nil,
We will need a sample project and step-by-step instructions how to reproduce that - could you please send such a project to support@pdf-xchange.com along with the instructions and we will investigate this further.
Best,
Stefan
We will need a sample project and step-by-step instructions how to reproduce that - could you please send such a project to support@pdf-xchange.com along with the instructions and we will investigate this further.
Best,
Stefan
Re: Automation with MS Dynamics NAV
Dear Stefan,
We have mailed to support, please check. We have explained every possible things from our end. Please let us know.
Regards
NIL
We have mailed to support, please check. We have explained every possible things from our end. Please let us know.
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Thanks Nil,
Got the e-mail and forwarded it to the people that would be investigating it.
We will write back when we have further news!
Best,
Stefan
Got the e-mail and forwarded it to the people that would be investigating it.
We will write back when we have further news!
Best,
Stefan
Re: Automation with MS Dynamics NAV
Thanks Stefan. Keep us posted!!
Regards
NIL
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Certainly Nil!
Cheers,
Stefan
Cheers,
Stefan
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Automation with MS Dynamics NAV
You have to download the PDF-XChange 4 Drivers API https://www.pdf-xchange.com/product ... rivers-api and read the documentation on how to use it.
Both V3 and V4 of the driver uses ActiveX, but the library type is different and the method of use of the SDK is also a bit different. There are examples and it should not be a big problem to migrate from V3 to V4.
hth
Both V3 and V4 of the driver uses ActiveX, but the library type is different and the method of use of the SDK is also a bit different. There are examples and it should not be a big problem to migrate from V3 to V4.
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: Automation with MS Dynamics NAV
Hi hth,
Thanks for your reply. Can you give me example how to instantiate and set parameter to desired pdf file. Meanwhile i am trying to download that mentioned link, seems its not working. I have tried to download it many a times wit h IE and Chrome. But i am not able to download it.
Thanks
NIL
Thanks for your reply. Can you give me example how to instantiate and set parameter to desired pdf file. Meanwhile i am trying to download that mentioned link, seems its not working. I have tried to download it many a times wit h IE and Chrome. But i am not able to download it.
Thanks
NIL
Re: Automation with MS Dynamics NAV
Hi hth,
Also i cannot find pxclib40.dll and xcpro40.dll even after i have installed PDF-Xchange v4.0 and API. Can you tell me how do i get these .dll file?
Regards
NIL
Also i cannot find pxclib40.dll and xcpro40.dll even after i have installed PDF-Xchange v4.0 and API. Can you tell me how do i get these .dll file?
Regards
NIL
Re: Automation with MS Dynamics NAV
Hi hth,
Found pxclib40.dll and other dll set in SDK folder. While registering with regsvr32 command its telling that dll file was loaded but entry point of DllRegisterServer was not found!!
And also i cannot find from Navision the existence of that dll.
Please help and guide me what to do?
Regards
NIL
Found pxclib40.dll and other dll set in SDK folder. While registering with regsvr32 command its telling that dll file was loaded but entry point of DllRegisterServer was not found!!
And also i cannot find from Navision the existence of that dll.
Please help and guide me what to do?
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hello Nil,
Please check the suggestions Ivan has made in this post:
https://forum.pdf-xchange.com/ ... 794#p35794
Best,
Stefan
Please check the suggestions Ivan has made in this post:
https://forum.pdf-xchange.com/ ... 794#p35794
Best,
Stefan
Re: Automation with MS Dynamics NAV
Dear Stefan,
Just gone through mentioned post. There is no such post related with pxclib40.dll registration. So need your assistance.
Regards
NIL
Just gone through mentioned post. There is no such post related with pxclib40.dll registration. So need your assistance.
Regards
NIL
- Paul - Tracker Supp
- Site Admin
- Posts: 6897
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Automation with MS Dynamics NAV
Hi navision,
I think there has been a misunderstanding here. Don't worry about Stefan's references to registering the DLL, you don't need that.
You do not need to register that dll as you do not need to use it! What Ivan was telling you is that you can use ActiveX for this and as such you do not need to us or register that DLL.
If you have any questions using the ActiveX as per Ivan's post do let us know.
sincerely
I think there has been a misunderstanding here. Don't worry about Stefan's references to registering the DLL, you don't need that.
You do not need to register that dll as you do not need to use it! What Ivan was telling you is that you can use ActiveX for this and as such you do not need to us or register that DLL.
If you have any questions using the ActiveX as per Ivan's post do let us know.
sincerely
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Re: Automation with MS Dynamics NAV
HI Paul,
Thanks for correcting me, please let us know how do i use activeX to generate PDF file and set PDF properties that i have mentioned earlier. We can only find PDF-Xchange v4.0 Library in Aotumation server list.
Appreciate if you can help me in this regard.
Also please check support mail where i have explained detail requirements.
Regards
NIL
Thanks for correcting me, please let us know how do i use activeX to generate PDF file and set PDF properties that i have mentioned earlier. We can only find PDF-Xchange v4.0 Library in Aotumation server list.
Appreciate if you can help me in this regard.
Also please check support mail where i have explained detail requirements.
Regards
NIL
- Paul - Tracker Supp
- Site Admin
- Posts: 6897
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Automation with MS Dynamics NAV
Hi Nil,
Ivan is looking at your email with details now. He should have a response later today.
regards
Ivan is looking at your email with details now. He should have a response later today.
regards
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
- Paul - Tracker Supp
- Site Admin
- Posts: 6897
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Automation with MS Dynamics NAV
Hi again Nil,
after looking at your email Ivan has informed me that this is all documented in the SDK. In a nutshell you need to create a CPXCControlEX object, use it's property Printer to get the object CPXCPrinter (a real printer will be created at the same time) and use it's properties to configure the printer for your task.
If you look in this folder on the machine where the SDK is installed <install path>\Tracker Software\PDF-XChange 4 API\Examples there are numerous examples. We have very little knowledge of MS Dynamics and cannot help you with that side of the equation however I'm sure there is much available on MSDN. The examples do show how to use the ActiveX and create this object. Please do go through those examples and read the associated documentation.
regards
after looking at your email Ivan has informed me that this is all documented in the SDK. In a nutshell you need to create a CPXCControlEX object, use it's property Printer to get the object CPXCPrinter (a real printer will be created at the same time) and use it's properties to configure the printer for your task.
If you look in this folder on the machine where the SDK is installed <install path>\Tracker Software\PDF-XChange 4 API\Examples there are numerous examples. We have very little knowledge of MS Dynamics and cannot help you with that side of the equation however I'm sure there is much available on MSDN. The examples do show how to use the ActiveX and create this object. Please do go through those examples and read the associated documentation.
regards
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Re: Automation with MS Dynamics NAV
Thanks for your reply. I cannot find a way to get CPXCPrinter by CPXCControlEX class property Printer. I have explored all of SDK example. Where example are using dll directly. So if you give me syntax of vb.net / c# .NET to get CPXCPrinter by CPXCControlEX Class that will really help us.
Regards
NIL
Regards
NIL
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
After installing the PDF XChange 4 API, the C# example is installed in:
[InstallationDirectory]\PDF-XChange 4 API\Examples\APIExamples\C#Examples\PDFdriverAPI\
The syntax to create a printer object instance is in the class found in the example project's Form1.cs source:
[InstallationDirectory]\PDF-XChange 4 API\Examples\APIExamples\C#Examples\PDFdriverAPI\
The syntax to create a printer object instance is in the class found in the example project's Form1.cs source:
Code: Select all
[...]
PXCComLib.CPXCPrinter PDFPrinter;
[...]
PXCComLib.CPXCControlEx prnFactory = new PXCComLib.CPXCControlEx();
PDFPrinter = (PXCComLib.CPXCPrinter)prnFactory.get_Printer("", "Simple PDF-XChange", "<REG CODE>", "<DEV CODE>");
[...]
etc.
Re: Automation with MS Dynamics NAV
Hi Walter,
I have explored mentioned API example. As we are not C# programmer, can you tell me what is "PXCComLib". Is it a .lib file directly attached with this program? If so i cannot use that .lib file directly to NAVISION.
Now the situation is that we can instantiate CPCXControlEX class and can use following code:
To instantiate CPXCControlEX class as PDF:
IF ISCLEAR(PDF) THEN
IF NOT CREATE(PDF) THEN
ERROR('Cannot Create PDF Automation Object');
Below mentioned PDFPrinter is pointing to class CPXCPrinter
PdfPrinter := PDF.get_Printer('', 'PDF-Xchange 4.0', 'XXXXXXXXXXXXX','XXXXXXXXXXXXX');
We are facing error PDF.get_Printer syntax.
Help me on this regard.
Regards
NIL
I have explored mentioned API example. As we are not C# programmer, can you tell me what is "PXCComLib". Is it a .lib file directly attached with this program? If so i cannot use that .lib file directly to NAVISION.
Now the situation is that we can instantiate CPCXControlEX class and can use following code:
To instantiate CPXCControlEX class as PDF:
IF ISCLEAR(PDF) THEN
IF NOT CREATE(PDF) THEN
ERROR('Cannot Create PDF Automation Object');
Below mentioned PDFPrinter is pointing to class CPXCPrinter
PdfPrinter := PDF.get_Printer('', 'PDF-Xchange 4.0', 'XXXXXXXXXXXXX','XXXXXXXXXXXXX');
We are facing error PDF.get_Printer syntax.
Help me on this regard.
Regards
NIL
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
PXCComLib is just a namespace in C# (and a COM progid in the windows registry.)
I cannot see anything wrong with your get_Printer() syntax, unless it turns out that you should be using the C++ version and passing a CPXCPrinter pointer as the last argument (I don't know how NAVISION works).
-Walter
I cannot see anything wrong with your get_Printer() syntax, unless it turns out that you should be using the C++ version and passing a CPXCPrinter pointer as the last argument (I don't know how NAVISION works).
-Walter
navision wrote:Hi Walter,
I have explored mentioned API example. As we are not C# programmer, can you tell me what is "PXCComLib". Is it a .lib file directly attached with this program? If so i cannot use that .lib file directly to NAVISION.
Now the situation is that we can instantiate CPCXControlEX class and can use following code:
To instantiate CPXCControlEX class as PDF:
IF ISCLEAR(PDF) THEN
IF NOT CREATE(PDF) THEN
ERROR('Cannot Create PDF Automation Object');
Below mentioned PDFPrinter is pointing to class CPXCPrinter
PdfPrinter := PDF.get_Printer('', 'PDF-Xchange 4.0', 'XXXXXXXXXXXXX','XXXXXXXXXXXXX');
We are facing error PDF.get_Printer syntax.
Help me on this regard.
Regards
NIL
Re: Automation with MS Dynamics NAV
Hi Walter,
Thanks for your reply. In our case NAVISION using C/AL language. I cannot use that mentioned syntax that way. Anyway I like to show you how NAVISION works with .dll. If possible please let me know time and date so that we can share this on teamviewer. You can contact me on my skype: nilanjan.c
Please let me know so that we can solve it as early as possible.
Regards
Nilanjan
Thanks for your reply. In our case NAVISION using C/AL language. I cannot use that mentioned syntax that way. Anyway I like to show you how NAVISION works with .dll. If possible please let me know time and date so that we can share this on teamviewer. You can contact me on my skype: nilanjan.c
Please let me know so that we can solve it as early as possible.
Regards
Nilanjan
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
I was a little bit imprecise in my previous response: PXCComLib is a namespace in one of the C# demos but it is also the progid used for the COM DLL (as registered in the windows registry) which you can use to retrieve the printer interface via the class factory IPXCControlEx / CPXCControlEx. The basic challenge here is to figure out how to get COM interfaces in NAV, which is a general Microsoft programming issue rather than a specific issue related to our libraries - and I have absolutely no idea how to do this since I have no familiarity with NAV; do you know?
Please keep in mind that this is a registered COM DLL, not a DLL with flat c-style exports.
-Walter
Please keep in mind that this is a registered COM DLL, not a DLL with flat c-style exports.
-Walter
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
I believe this may be where to find information:
http://msdn.microsoft.com/en-us/library/dd301404.aspx
http://msdn.microsoft.com/en-us/library/dd301404.aspx
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
Hi Walter,
You are right. Yes, we know how to call a class from Dynamics NAV. We understood your points but we cannot access printer interface via the class factory IPXCControlEx / CPXCControlEx.
Let me check once again and we will let you know update.
Regards
NIL
You are right. Yes, we know how to call a class from Dynamics NAV. We understood your points but we cannot access printer interface via the class factory IPXCControlEx / CPXCControlEx.
Let me check once again and we will let you know update.
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Sure Nil,
Looking forward to seeing the results of your tests!
Best,
Stefan
Looking forward to seeing the results of your tests!
Best,
Stefan
Re: Automation with MS Dynamics NAV
Dear Stefan,
We are now able to generate PDF file from Dynamics NAV (Navision) thru. PDF-Xchange 4.0.
Now we are facing 2 problems as follows:
1. Sometimes SAVEAS dialog appear though i have mentioned in my code:
PDFPrinter.Option('Save.ShowSaveDialog',FALSE);
2. Sometimes A logo is appearing "click here to buy now" top right and left corner though i have supplied a valid registration and dev. key.
PDFPrinter := PDF.Printer('dell', 'PDF-Xchange 4.0', 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXX','xxxxxxxxxxxxxxxxxxxxxxx');
Where PDFPrinter is pointing to PXCPPrinter class and PDF is pointing to PXCPControlEX class.
Help me in this regard.
Regards
NIL
We are now able to generate PDF file from Dynamics NAV (Navision) thru. PDF-Xchange 4.0.
Now we are facing 2 problems as follows:
1. Sometimes SAVEAS dialog appear though i have mentioned in my code:
PDFPrinter.Option('Save.ShowSaveDialog',FALSE);
2. Sometimes A logo is appearing "click here to buy now" top right and left corner though i have supplied a valid registration and dev. key.
PDFPrinter := PDF.Printer('dell', 'PDF-Xchange 4.0', 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXX','xxxxxxxxxxxxxxxxxxxxxxx');
Where PDFPrinter is pointing to PXCPPrinter class and PDF is pointing to PXCPControlEX class.
Help me in this regard.
Regards
NIL
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
Hi,
Glad to hear you have got the interface sorted out.
However, we still have some work to do it seems.
Most importantly, can you clarify what you mean by "sometimes?"
Does it display the dialog box whenever you try to save a file, or do you really mean that sometimes it does not display the dialog and sometimes it does? Can you check to ensure that a save filename (Save.File) is always set before attempting to save the PDF? What have you set for Save.SaveType? What about Save.WhenExists?
Same question with respect to watermarks. When you say "sometimes", do you mean that in the same piece of code you will occasionally get watermarks and occasionally not?
In both of these cases I wonder if perhaps there is some logic that is bypassing your settings, but it is hard to know without seeing the code that is responsible. First thing though will be to understand what you mean when you say "sometimes". Most importantly, is it the same code section that occasionally works and occasionally does not? Or different parts of your program (or even different applications)?
Glad to hear you have got the interface sorted out.
However, we still have some work to do it seems.
Most importantly, can you clarify what you mean by "sometimes?"
Does it display the dialog box whenever you try to save a file, or do you really mean that sometimes it does not display the dialog and sometimes it does? Can you check to ensure that a save filename (Save.File) is always set before attempting to save the PDF? What have you set for Save.SaveType? What about Save.WhenExists?
Same question with respect to watermarks. When you say "sometimes", do you mean that in the same piece of code you will occasionally get watermarks and occasionally not?
In both of these cases I wonder if perhaps there is some logic that is bypassing your settings, but it is hard to know without seeing the code that is responsible. First thing though will be to understand what you mean when you say "sometimes". Most importantly, is it the same code section that occasionally works and occasionally does not? Or different parts of your program (or even different applications)?
Re: Automation with MS Dynamics NAV
Hi Walter,
Thanks for your prompt reply.
Here i have mentioned my final coding for your reference as follows:
CREATE(PDFControl);
// Instantiate CPXCControlEX class thru. PDFControl
PDFPrinter := PDFControl.Printer('', 'NAV2PDF', 'XXXX-XXXX-XXXXX-XXXXX-XXXXX-XXXXX','XXXXXXXXXXXXXXXXXXXX');
// Instantiate CPXCPrinter class thru. PDFPrinter
// NAV2PDF our pdf printer name
FileNameToCreate := 'Example.pdf';
PDFPrinter.Option('Save.SaveType','Save');
PDFPrinter.Option('Save.ShowSaveDialog',FALSE);
PDFPrinter.Option('Save.Path','c:\PDF\');
PDFPrinter.Option('Save.File',FileNameToCreate);
PDFPrinter.Option('Save.WhenExists', 'Overwrite');
PDFPrinter.Option('Save.RunApp', FALSE);
PDFPrinter.SetAsDefaultPrinter();
**Where PDFControl is pointing to CPXCControlEX class and PDFPrinter is pointing to CPXCPrinter class.
I think above mentioned PDF coding is all that i have written for our application. While running its showing "Save As" dialog. Request you to please have a look on above mentioned code, and help me in this regard.
Also i am observing that no of times i am trying to generate PDF from my program a printer queue is being added.
Please feel free to ask me.
Regards
NIL
Thanks for your prompt reply.
Here i have mentioned my final coding for your reference as follows:
CREATE(PDFControl);
// Instantiate CPXCControlEX class thru. PDFControl
PDFPrinter := PDFControl.Printer('', 'NAV2PDF', 'XXXX-XXXX-XXXXX-XXXXX-XXXXX-XXXXX','XXXXXXXXXXXXXXXXXXXX');
// Instantiate CPXCPrinter class thru. PDFPrinter
// NAV2PDF our pdf printer name
FileNameToCreate := 'Example.pdf';
PDFPrinter.Option('Save.SaveType','Save');
PDFPrinter.Option('Save.ShowSaveDialog',FALSE);
PDFPrinter.Option('Save.Path','c:\PDF\');
PDFPrinter.Option('Save.File',FileNameToCreate);
PDFPrinter.Option('Save.WhenExists', 'Overwrite');
PDFPrinter.Option('Save.RunApp', FALSE);
PDFPrinter.SetAsDefaultPrinter();
**Where PDFControl is pointing to CPXCControlEX class and PDFPrinter is pointing to CPXCPrinter class.
I think above mentioned PDF coding is all that i have written for our application. While running its showing "Save As" dialog. Request you to please have a look on above mentioned code, and help me in this regard.
Also i am observing that no of times i am trying to generate PDF from my program a printer queue is being added.
Please feel free to ask me.
Regards
NIL
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
I do not see any obviuos problems with this code, but I need you to clarify the other questions I asked regarding the intermittency of this problem.
Re: Automation with MS Dynamics NAV
Hi Walter,
As you have asked "intermittency", I have examined thoroughly our program and found that "Save As" dialog is appearing every time. Please let me know if there is any way out to bypass "Save As" dialog.
Regards
NIL
As you have asked "intermittency", I have examined thoroughly our program and found that "Save As" dialog is appearing every time. Please let me know if there is any way out to bypass "Save As" dialog.
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hi Nil,
Could you please try and check whether any of the other save options is also not setting up correctly or it is only the ShowSaveDialog that's not working as intended.
Best,
Stefan
Could you please try and check whether any of the other save options is also not setting up correctly or it is only the ShowSaveDialog that's not working as intended.
Best,
Stefan
Re: Automation with MS Dynamics NAV
Dear Stefan,
It seems that ShowSaveDialog is not working.
Also observing that a large no of print queue is being generated with every print call. Though i have clear and destroy class instance at the end of our program.
We are trying to close this issue as early as possible. So please help me on this regard.
Regards
NIL
It seems that ShowSaveDialog is not working.
Also observing that a large no of print queue is being generated with every print call. Though i have clear and destroy class instance at the end of our program.
We are trying to close this issue as early as possible. So please help me on this regard.
Regards
NIL
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Automation with MS Dynamics NAV
Hi Nil,
I also received your e-mail and have replied to it. I believe this will need Walter's attention and it's a day off in Canada today so lets wait for him to to come to work tomorrow and we will see to assist further.
Best,
Stefan
I also received your e-mail and have replied to it. I believe this will need Walter's attention and it's a day off in Canada today so lets wait for him to to come to work tomorrow and we will see to assist further.
Best,
Stefan
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
Assuming you are properly setting the ShowSaveDialog option in the correct scope you shouldn't have a problem with dialog boxes opening. Can you provide a more complete example so we can trace through the main application logic?
Re: Automation with MS Dynamics NAV
Hi Walter,
We are still testing PDF-Xchange product in different scenario. As observing below mentioned code is running fine in Windows 7 (where mentioned code is successfully save PDF file without "Save As" dialog) but in Windows XP SP3 environment its asking File Name to Save (Save As dialog). So we don't want Save As Dialog while user save / print to PDF.
Is there any permission settings to "PDF Printer" ?
IF ISCLEAR(PDFControl) THEN
IF NOT CREATE(PDFControl) THEN
ERROR('Cannot Create PDF Automation Object');
PDFPrinterA := PDFControl.Printer ('','NavisionPDF','XXXXXXXXXXXXXXXX','XXXXXXXXXXXX');
FileNameToCreate := 'Example1' + '.PDF';
IF EXISTS('c:\pdf\'+FileNameToCreate) THEN
ERASE('c:\pdf\'+FileNameToCreate);
PDFPrinterA.Option('Security.Enabled',TRUE);
PDFPrinterA.Option('Security.HasUserPassword',TRUE);
PDFPrinterA.Option('Security.HasOwnerPassword',TRUE);
PDFPrinterA.Option('Security.UserPassword','ZZZZZ');
//PDFPrinterA.Option('Save.Path','c:\pdf\');
PDFPrinterA.Option('Save.File','c:\pdf\'+FileNameToCreate);
PDFPrinterA.Option('Save.SaveType','Save');
PDFPrinterA.Option('Save.ShowSaveDialog',FALSE);
PDFPrinterA.Option('Save.WhenExists', 'Overwrite');
PDFPrinterA.Option('Save.RunApp',FALSE);
PDFPrinterA.SetAsDefaultPrinter();
Then Call Report and Report will print directly PDF file.
//Destroy PDF Printer
CLEAR(PDFPrinter);
Appreciate if you help me in this regard ASAP.
I can share / show you that i have written in a real situation. If possible please let me know date & time so that we both can examine that by Team Viewer as i have told Stefan.
Regards
NIL
We are still testing PDF-Xchange product in different scenario. As observing below mentioned code is running fine in Windows 7 (where mentioned code is successfully save PDF file without "Save As" dialog) but in Windows XP SP3 environment its asking File Name to Save (Save As dialog). So we don't want Save As Dialog while user save / print to PDF.
Is there any permission settings to "PDF Printer" ?
IF ISCLEAR(PDFControl) THEN
IF NOT CREATE(PDFControl) THEN
ERROR('Cannot Create PDF Automation Object');
PDFPrinterA := PDFControl.Printer ('','NavisionPDF','XXXXXXXXXXXXXXXX','XXXXXXXXXXXX');
FileNameToCreate := 'Example1' + '.PDF';
IF EXISTS('c:\pdf\'+FileNameToCreate) THEN
ERASE('c:\pdf\'+FileNameToCreate);
PDFPrinterA.Option('Security.Enabled',TRUE);
PDFPrinterA.Option('Security.HasUserPassword',TRUE);
PDFPrinterA.Option('Security.HasOwnerPassword',TRUE);
PDFPrinterA.Option('Security.UserPassword','ZZZZZ');
//PDFPrinterA.Option('Save.Path','c:\pdf\');
PDFPrinterA.Option('Save.File','c:\pdf\'+FileNameToCreate);
PDFPrinterA.Option('Save.SaveType','Save');
PDFPrinterA.Option('Save.ShowSaveDialog',FALSE);
PDFPrinterA.Option('Save.WhenExists', 'Overwrite');
PDFPrinterA.Option('Save.RunApp',FALSE);
PDFPrinterA.SetAsDefaultPrinter();
Then Call Report and Report will print directly PDF file.
//Destroy PDF Printer
CLEAR(PDFPrinter);
Appreciate if you help me in this regard ASAP.
I can share / show you that i have written in a real situation. If possible please let me know date & time so that we both can examine that by Team Viewer as i have told Stefan.
Regards
NIL
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
Is it possible that you need to escape the backslashes specifying directories in the filename and path? Is there a filename already set in the save dialog box, when it opens?
-Walter
-Walter
Re: Automation with MS Dynamics NAV
Hi Walter,
We have changed our code as you advised "escape the backslashes specifying directories in the filename and path". Also "Save As" option of printing preference of PDF-Xchange PDF printer is remain as default.
Result is same.
Help me in this regards.
Regards
NIL
We have changed our code as you advised "escape the backslashes specifying directories in the filename and path". Also "Save As" option of printing preference of PDF-Xchange PDF printer is remain as default.
Result is same.
Help me in this regards.
Regards
NIL
Re: Automation with MS Dynamics NAV
Hi,
Today again I tried the code on another windows 7 Sys but it is not working ,
So Final Conclusion is that it is not stable
I would like to share the development on on Team viewer , Pls confirm the time .
Thanks
NIL
Today again I tried the code on another windows 7 Sys but it is not working ,
So Final Conclusion is that it is not stable
I would like to share the development on on Team viewer , Pls confirm the time .
Thanks
NIL
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: Automation with MS Dynamics NAV
In consultation with a colleague we have noticed that you are calling clear to release the PDF printer object before printing has completed. You must wait until the print job has completed before clearing. Ideally you should trap the events fired by the printer but I'm not sure if NAV can handle events from COM controls.
Re: Automation with MS Dynamics NAV
Is there any latest build of PDFX4API, if so how do i download it? I am seeing that events are not fired while executing automation.
Thanks
NIL
Thanks
NIL
- Chris - Tracker Supp
- Site Admin
- Posts: 797
- Joined: Tue Apr 14, 2009 11:33 pm
Re: Automation with MS Dynamics NAV
Hi NIL,
Yes there was a new v4 build release on Feb 25.
Please go to our download page and click the developer downloads tab.
Go to the Drivers API SDK section and under the download now button click View Previous Versions and download the V4 Build 4.0.210.
Yes there was a new v4 build release on Feb 25.
Please go to our download page and click the developer downloads tab.
Go to the Drivers API SDK section and under the download now button click View Previous Versions and download the V4 Build 4.0.210.
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.
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com