Hi,
I discovered another SIGSEV in librdpdf.so.
Using latest version (3.53.1) of Android SDK
Topic is still editing of PDF forms.
I have been tasked to implement the ability to add pages to existing PDF documents.
The pages I add contain active PDF forms.
Use case:
user starts with a base document and fill its PDF forms.
Based on various conditions, the workflow requires to add pages to the document in work.
These pages also contain PDF forms.
While normally adding pages works, I have a particular PDF document that causes a SIGSEV in librdpdf.so.
If I simply open the document, no SIGSEV occurs.
If I add its pages to another document, the SIGSEV occurs.
Attached you will find the affected document as well as the stack track of the SIGSEV.
The code I use to add pages to the document is roughly as follows:
com.radaee.pdf.Document target; //document in editing, already open when code is invoked
com.radaee.pdf.Document pages; //document whose pages will be added to 'target'
pages = new Document();
pages.Open(path, null);
pages.SetCache(cache_path);
int targetCount = target.GetPageCount();
int pagesCount = pages.GetPageCount();
com.radaee.pdf.Document.ImportContext importContext = target.ImportStart(pages);
for (int i=0; i<pagesCount ; i++) {
target.ImportPage(importContext, i, i+targetCount);
}
importContext.Destroy();
pages.Close();
Regards,
Michele Noberasco