Pdf overlay difference not showing in some pdf

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:

1 Like

Hi Blessy,

Could you please provide the following information so we can further investigate:

  1. Input file
  2. Output file
  3. Screenshots of the issue (and what you expected to see instead)
1 Like

2022 1.pdf (558.0 KB)
2022 2.pdf (558.1 KB)

on zoom in zoom out the flickered image is showing whereas we need it to show the difference in red and the others in blue to be shown

1 Like