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);
Code: Select all
Object reference not set to an instance of an object.
TIA,
Al3x
Merry Christmas!