Inserting page from one PDf into another fails

A crash occurs when inserting a page from one PDF into another using Aspose.Pdf.Kit.dll 4.0

An unhandled exception of type 'xeb116a323308e2f7.x379651f854a11f87' occurred in Aspose.Pdf.Kit.dll

Main PDF (test1.pdf) has field fill-ins. Page from other PDF (test2.pdf) being inserted has field fill-ins.

It works when "Page from other PDF (test2.pdf) being inserted" does NOT have field fill ins.

When tested with version 3.9 it gave a different error. "Root element is missing."

Code used:

int location = 1;
string inFile1 = ".\\test1.pdf";
string inFile2 = ".\\test2.pdf";
string outFile = ".\\test3.pdf";

int[] pages = new int[] { 1 };

//Creating stream objects holding the PDF files in Open Mode
FileStream inStream1 = new FileStream(inFile1, FileMode.Open);
FileStream inStream2 = new FileStream(inFile2, FileMode.Open);

//Creating output stream object that will store the extracted pages as a PDF file
FileStream outputStream = new FileStream(outFile, FileMode.Create);

//Instantiating PdfFileEditor object
PDF.PdfFileEditor editor = new PDF.PdfFileEditor();

editor.Insert(inStream1, location, inStream2, pages, outputStream);

//Closing output stream
outputStream.Close();

Hi Jonathan,

Thank you very much for considering Aspose.

I have reproduced the problem at my end and logged it as PDFKITNET-13148 in our issue tracking system. Our team will look into the issue and you’ll be updated via this forum thread once the issue is resolved.

We’re sorry for the inconvenience.
Regards,

I have narrowed down the problem(s).

1) The changing of a field value does NOT work for version 3.9 or 4.0

2) The insertion of a another PDF does NOT work for version 3.9 or 4.0

3) The changing of a field value AND the insertion of a Pdf DOES work for version 3.0

4) The 30 day trial license I obtained for 3.9/4.0 does not work for 3.0

Until these bugs are fixed for the newer versions is it possible to get a trial license that will work with 3.0?

The following code was used in the test.

/***** The license is not valid for this product. *****/<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

//Aspose.Pdf.Kit.License license = new Aspose.Pdf.Kit.License();

//license.SetLicense("Aspose.Pdf.Kit.lic");

//Creating stream objects holding the PDF files in Open Mode

FileStream inStream1 = new FileStream("Test1.pdf", FileMode.Open);

FileStream inStream2 = new FileStream("Test2.pdf", FileMode.Open);

//Creating output stream object that will store the extracted pages as a PDF file

FileStream outputStream = new FileStream("Test3.pdf", FileMode.Create);

//Instantiating PdfFileEditor object

PDF.PdfFileEditor editor = new PDF.PdfFileEditor();

//editor.Insert(inStream1, location, inStream2, pages, outputStream);

editor.Append(inStream1, inStream2, 1, 2, outputStream);

//Closing output stream

inStream1.Close();

inStream2.Close();

outputStream.Close();

// Change the value of field value for the inserted page

PDF.Form form = null;

form = new PDF.Form("Test3.pdf", "test_final.pdf");

form.FillField("TextField2", "HELLO");

form.Save();

Hi Jonathan,

As far as first issue is concerned, our team is currently working on this and we’ll update you once it is resolved.

I have logged the second issue with FillField method as PDFKITNET-13277 in our issue tracking system. Our team will be looking into this issue and you’ll be updated with the resolution the earliest possible.

Also, I’m sorry to inform you that we can’t provide you the license for the older versions. However, we’ll try to resolve these issues as soon as possible, so you would be able to use our latest version.

We’re sorry for the inconvenience.
Regards,

The issues you have found earlier (filed as 13148) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.