pymupdf/PyMuPDF

insert_htmlbox() does not overlay content

Closed this issue · 1 comments

Hello,

if I add content to a PDF file with Firefox's internal PDF viewer/editor, insert_htmlbox() does not overlay this content despite overlay=True argument. Here's an example:

1_original.pdf - original PDF;
2_firefox.pdf - content added in Firefox;
3_pymupdf.pdf - insert_htmlbox().

It seems this only happens with Firefox editor, I tried the same thing in Chromium and LibreOffice Draw and the content is always overlayed by insert_htmlbox().

This is not a bug. Everything works as expected.
Don't let yourself be confused by the choice of words like "editor". The blue cloudy object on the Firefox page is an ("Ink") annotation.
Like all annotations it is by definition not part of the page - but hovers above the page's contents.
Text / image / vector graphics ... insertions however become part of the page's contents - and will thus be covered by annotations like all the rest.