We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Flatten annotations will overlay text marks

Hi,

If I add a highlight annotation to a PDF and after that use pdfViewer.LoadedDocument.FlattenAnnotations(), the highlight annotation is set to foreground.

Please find a demo PDF attached.

This seems to happen after upgrading to syncfusion 21.1.35.


Attachment: demo_d8f98417.zip

5 Replies

KG Krithika Ganesan Syncfusion Team April 5, 2023 01:43 PM UTC

Marco, based on previous forum threads, we suspect that you are using Pdfium as your rendering engine and SfPdf for text extraction. With this combination, we were unable to reproduce the reported issue when trying to highlight annotations and flatten them. Therefore, we have attached a sample below that we used to try and reproduce the issue on our end.

 

However, if we use SfPdf for rendering the PDF, we can reproduce the reported issue. We should note that this issue has also been present in previous versions. Can you please confirm whether you are using Pdfium or SfPdf for rendering the PDF in PdfViewer? This information would be helpful for us to investigate further.


Attachment: PdfViewerWPF_e941ae7f.zip


MU Marco Uffelmann April 5, 2023 04:22 PM UTC

Krithika, I am using the SfPdf for rendering. Otherwise I have another problem selecting the text. This is what is in the other thread.

Hope this helps.



KG Krithika Ganesan Syncfusion Team April 7, 2023 04:03 AM UTC

Marco, In our PDF viewer WPF control, we are using Pdfium by default for text extraction, rendering PDF, creating images, printing the page, exporting as images, etc without any flaws. PDFium rendering engine renders the PDF pages, which is more robust and promising than our own rendering engine(SFPDF). PDFium rendering engine is comparatively more reliable and will be better in performance when compared to SFPDF rendering engine. PDFium rendering engine is used in Google Chrome for rendering the PDF files. Hence, we highly recommend you use PDFium rendering engine.


The document you have shared in this forum cause the issue in pdfium. We have already reported this issue to Pdfium, please find the link below,

https://bugs.chromium.org/p/pdfium/issues/detail?id=1954


meanwhile for other PDF document we are not facing the reported issue to highlight the text and flatten the annotations. We have also attached a sample below for your reference.


Attachment: PdfViewerWPF_89f9711b.zip


MU Marco Uffelmann April 7, 2023 03:45 PM UTC

Hi  Krithika,

Understand, but we cannot use the Pdfium engine because of the bug with missing characters while copy and selecting text.

This is very critical for us, so perhaps can you put more focus on the reported issue with Pdfium?

Thank you and kind regards, Marco



KG Krithika Ganesan Syncfusion Team April 10, 2023 03:34 PM UTC

Marco, we have requested update in this public PDFium group 

https://bugs.chromium.org/p/pdfium/issues/detail?id=1954

We will wait for further update from Pdfium team



Loader.
Live Chat Icon For mobile
Up arrow icon