Product: PDFTron
Product Version: 10.0.1
Please give a brief summary of your issue:
(Think of this as an email subject)
In some pdf files the overlay is not showing. But when zooming the overlay is flickering.
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
PDF::PDFDoc* pActivePdfDoc = theApp.GetActiveDoc()->GetPDFDoc();
Element element;
ElementWriter writer;
ElementReader reader;
SDF::Obj old_app_stm = m_overlayPreviewAnnot.GetAppearance();
reader.Begin(old_app_stm);
writer.Begin(*pActivePdfDoc); // start new content stream
while ((element = reader.Next()) != NULL)
{
Element::Type type = element.GetType();
if (type != Element::Type::e_form)
continue;
Common::Matrix2D m = element.GetGState().GetTransform();
element.GetGState().SetTransform(m_overlayInfo.m_overlayMatrix);
writer.WritePlacedElement(element);
}
SDF::Obj new_app_stm = writer.End();
m_overlayPreviewAnnot.SetAppearance(new_app_stm);
reader.End();
waitCursor.Restore();
pView->Invalidate(0);
Please provide a link to a minimal sample where the issue is reproducible: