Product: Pdftron C++
Product Version:9.4
Please give a brief summary of your issue:
(Think of this as an email subject)
Please describe your issue and provide steps to reproduce it: In version the 8.1 the AnnotInsert is working whereas in 9.4 version the its not working.
(The more descriptive your answer, the faster we are able to help you)
Please provide a link to a minimal sample where the issue is reproducible:
PDF::PDFDoc pDiffDoc;
pDiffDoc.Lock();
pDiffDoc.AppendVisualDiff(page1, page2, &diffOptions);
pDiffDoc.Unlock();
std::vector imported_pages = pActivePdfDoc->ImportPages({ pDiffDoc.GetPage(1) });
Element element = builder.CreateForm(imported_pages[imported_pages.size() - 1]);
writer.Begin(*pActivePdfDoc);
writer.WriteElement(element);
pdftron::SDF::Obj new_app_stm = writer.End();
PDF::Annot overlayAnnot = PDF::Annot::Create(*pActivePdfDoc, PDF::Annot::Type::e_Unknown,
PDF::Rect(0, 0, wd, ht));
overlayAnnot.SetAppearance(new_app_stm);
activePage.AnnotInsert(0, overlayAnnot);
m_viewCtrl->Update(overlayAnnot, activePage.GetIndex());
pPdfOverlay->GetPDFData()->SetAnnot(overlayAnnot);