I am trying to import an existing pdf document than was dynamically merged and stored as a byte [], FLATTEN IT, and return then a Base64 endocded representing that flattened pdf. I have also added two test lines that save a copy of the flattened pdf and the base64 string:
ceTe.DynamicPDF.Merger.PdfDocument doc = new ceTe.DynamicPDF.Merger.PdfDocument(pdfFile.FileByte);
ceTe.DynamicPDF.Merger.MergeDocument merger = new ceTe.DynamicPDF.Merger.MergeDocument(doc);
//merger.Form.IsReadOnly = true;
merger.Security = new ceTe.DynamicPDF.HighSecurity();
merger.Security.AllowEdit = false;
string base64 = Convert.ToBase64String(merger.Draw());
System.IO.File.WriteAllText("c:/base64.txt", base64);
merger.Draw("c:/base64.pdf");
I have the IsReadOnly=true line commented because it says that my pdf i import has merger.Form = null. When this runs, it executes and the files are successfully saved. However, the pdf contains blank fields. All of the input is removed from the pdf. And when the base64 encoded text is imported through an external system, it contains empty fields also. We have another page that BinaryWrites the original byte[] pdf and the data shows up properly.
Please Help
Merger.Draw() clearing all data
Re: Merger.Draw() clearing all data
Support · May 23, 2008Hello,
Can you please try using the latest build of our product and see if it works? You can download the latest build from our CustomerArea
by logging in using your current serial number.
If you still have a problem then please send over some sample code and input PDF documents you are using to our [^a|mailto:support@cete.com|Support Team^] so that they can look into this issue further.
Thanks,
ceTe Software Support Team.
Re: Merger.Draw() clearing all data
Forum member · May 23, 2008While switching to the new version, i got this error and can not find any related postings:
The type or namespace name 'MergeTextField' does not exist in the namespace 'ceTe.DynamicPDF.Merger.Forms' (are you missing an assembly reference?)
The type or namespace name 'MergeCheckBoxField' does not exist in the namespace 'ceTe.DynamicPDF.Merger.Forms' (are you missing an assembly reference?)
Please help. WHat do i need to do
Re: Merger.Draw() clearing all data
Support · May 23, 2008Actually you should be using the 'ceTe.DynamicPDF.Forms' Namespace and you can use the equivalant objects in there. So if you were using 'MergeTextField' you can now use the 'TextField' in the 'ceTe.DynamicPDF.Forms' namespace or if you were using the 'MergeCheckBoxField' you can now use the 'CheckBoxField' in the 'ceTe.DynamicPDF.Forms' namespace.
If you have any other questions with this please let us know.
Thanks,
ceTe Software Support Team
Re: Merger.Draw() clearing all data
Forum member · May 23, 2008I used the new version, and adding mergeoptions made the merger.Form not null. So here is the code:
try
{
ceTe.DynamicPDF.Merger.PdfDocument doc = new ceTe.DynamicPDF.Merger.PdfDocument(pdfFile.FileByte);
ceTe.DynamicPDF.Merger.MergeDocument merger = new ceTe.DynamicPDF.Merger.MergeDocument(doc, new ceTe.DynamicPDF.Merger.MergeOptions(true));
merger.Form.IsReadOnly = true;
merger.Security = new ceTe.DynamicPDF.HighSecurity();
merger.Security.AllowEdit = false;
string base64 = Convert.ToBase64String(merger.Draw());
System.IO.File.WriteAllText("c:/base64.txt", base64);
merger.Draw("c:/base64.pdf");
return base64;
}
When I am in debug, it says merger.Form is not null and it has 191 fields. However, when i open the saved pdf, the pdf is there, but all of the fields are blank.
Re: Merger.Draw() clearing all data
Forum member · May 23, 2008nevermind i got it. thx
Re: Merger.Draw() clearing all data
Forum member · Jun 12, 2012I am not finding this dll ceTe.DynamicPDF.dll please help
Re: Merger.Draw() clearing all data
Support · Jun 12, 2012Hello,
Please login to our CustomerArea: http://www.dynamicpdf.com/CustomerArea
using your product serial number. Install the product using the downloaded product MSI. It will place the dll files at: C:\Program Files\ceTe Software\DynamicPDF Generator v3.0.3 for .NET \bin folder. You will need to reference this dll file in your application to access the classes and the methods of DynamicPDF Generator API.
If the above suggestions do not meet your requirements then please send over following details to our support team at: [^a|mailto:support@cete.com|opennewiwndow|support@cete.com^] so that they can look into it further.
1. More details about your requirements and problem which you are facing while using our DynamicPDF product.
2. Exact version of the DynamicPDF product which you are using.
3. Full stack trace of error message if you are getting any.
Thanks,
ceTe Software Support Team.