Hello:
I have a PDF template that we are trying to use to create new forms. Template contains embedded java script (on page open) which is used for validating and hiding certain fields based on the data. The javascript is not carrying over to the child document when the DynamicPDF merger is used. Could you please help?
Thanks.
Javascript in PDF templates
Re: Javascript in PDF templates
Support · Nov 22, 2011Hello,
It is suggested to use the latest dll file in your application and see if it works for you. You can download the latest dll files by logging into our CustomerArea: http://www.DynamicPDF.com/CustomerArea
using your version 6 product serial number. Remove reference for the old dll file and reference the latest dll file in your application.
If you continue getting the similar behavior even after using the latest dll file in your application then please send over the sample code which you are using, input and output PDF documents to our support team at: [^a|mailto:support@cete.com|opennewiwndow|support@cete.com^] so that they can look into it further.
Thanks,
ceTe Software Support Team.
Re: Javascript in PDF templates
Forum member · Nov 22, 2011Hello,
Thank you for your reply. We downloaded DynamicPDF™ Core Suite v6.0 for .NET (Build 19502). Earlier we were on version 3.0.3. In the bin folder I don't find the dlls DynamicPDf.Generator.Server or the DynamicPDF.Merger.Server dlls. I see the cete.DynamicPDf.11, .20, .35. .40 dlls. Are they the same/equivalent?
Do I replace the version 3.0.3 dlls with the new ones and will it have any compatibility issues?
Thanks,
Re: Javascript in PDF templates
Support · Nov 22, 2011Hello,
In the latest version v6.0 both Generator and Merger functionality is included in a single dll ceTe.DynamicPDF.xx.dll, where xx represents the target .NET Framework version. You just need to reference one dll in your project. Please refer to this link
regarding which dll to use in your project.
There are several changes done to the API since v3.0.3, so just replacing the dll might not be enough. You may need to make some code changes depending on the features you are using.
Thanks,
ceTe Software Support Team.
Re: Javascript in PDF templates
Forum member · Nov 22, 2011Hello,
Thank you for your reply. Since our project uses Visual Studio 2003 and hence .Net framework version 1.1 will there be any issues using the dll(ceTe.DynamicPDF.20.dll)?
Thanks,
Re: Javascript in PDF templates
Support · Nov 22, 2011Hello,
The ceTe.DynamicPDF.20.dll is compiled using .NET 2.0 and since the .NET Framework is not backward compatible you will not be able to use this dll with .NET 1.1 & Visual Studio 2003. At the least you would need Visual Studio 2005 7 .NET Framework 2.0 to use the ceTe.DynamicPDF.20.dll.
Thanks,
ceTe Software Support Team.
Re: Javascript in PDF templates
Forum member · Nov 22, 2011Hello,
Is there any other alternative approach to my original issue? I have posted my code for your reference.
****************************************************************
this.getField("lblPropertyPolicyIns").display = display.visible;
this.getField("lbliabInsName").display = display.visible;
this.getField("lblPropertyPolicyNo").display = display.visible;
this.getField ("lbliabPolicyNo").display = display.visible;
if(this.getField("Insurance_Company").value.length == 0)
this.getField("lblPropertyPolicyIns").display = display.hidden;
if(this.getField("Insurance_Company").value.length == 0)
this.getField("lbliabInsName").display = display.hidden;
if(this.getField("Policy_Number").value.length == 0)
this.getField("lblPropertyPolicyNo").display = display.hidden;
if(this.getField("Policy_Number").value.length == 0)
this.getField ("lbliabPolicyNo").display = display.hidden;
*******************************************************************
Thanks,
Re: Javascript in PDF templates
Support · Nov 23, 2011Hello,
The original issue is because you are using Merger v3.0.3 and it does not support preserving embedded java script so it was not being carried over to the output document. Merger v6.0 does support preserving embedded java script so using v6.0 should resolve the issue.
Thanks,
ceTe Software Support Team.