Append PDF document issue

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
Alessandro
Posts: 3
Joined: Mon Dec 19 2011

Append PDF document issue

Post by Alessandro »

Hi,
I have another nice problem :)

I try to append two pdf file.
This is the code:

Code: Select all

System.IO.FileStream file1 = new System.IO.FileStream(PDFGenerati[0], FileMode.Open, FileAccess.Read, FileShare.Read);
IacDocument doc1 = new IacDocument();
doc1.SetLicenseKey(licensee, activationCode);
doc1.Open(file1, "");

// Open the second PDF document from file
System.IO.FileStream file2 = new System.IO.FileStream(PDFGenerati[1], FileMode.Open, FileAccess.Read, FileShare.Read);
IacDocument doc2 = new IacDocument();
doc2.SetLicenseKey(licensee, activationCode);
doc2.Open(file2, "");

file1.Close();
file2.Close();

//// append the two documents
bool Res = doc1.Append(doc2);

// save the result to a third file
System.IO.FileStream file3 = new System.IO.FileStream(PDFFinale, FileMode.Create, FileAccess.Write);
doc1.Save(file3, Amyuni.PDFCreator.IacFileSaveOption.acFileSaveAll);
I think that Append operation it's ok 'cause Res it's true but on Save operation I have this error:

Code: Select all

Object reference not set to an instance of an object.
What can I do? :(

TIA,
Al3x

Merry Christmas!
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: Append PDF document issue

Post by Rich »

Uncertian as to the version # you are using. Can you email support@amyuni.com with the version number found on the Details tab of the properties of the cdintf450.dll and also your License to and Activation code.
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
Alessandro
Posts: 3
Joined: Mon Dec 19 2011

Re: Append PDF document issue

Post by Alessandro »

Rich wrote:Uncertian as to the version # you are using. Can you email support@amyuni.com with the version number found on the Details tab of the properties of the cdintf450.dll and also your License to and Activation code.
Hi, I haven't cdintf450.dll!

Where can I found it? I have only "acPDFCreator.Net.dll" and "acPDFCreatorLib.Net.dll" that I use in my application; also I have some other file like example, text file...

Thank you,
Alessandro
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: Append PDF document issue

Post by Rich »

The necessary DLL's were sent to Alessandro and according to his reply email it resolved his issue.
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
Post Reply