PdfViewer icon indicating copy to clipboard operation
PdfViewer copied to clipboard

Issues displaying .PDF images which are placed inside PDF documents

Open den43 opened this issue 4 years ago • 6 comments

Expected Behaviour:

The application should display images in the way described in the LaTeX document, e.g. centred

Actual Behaviour:

Images are displayed in the top left hand corner of the document.

How to reproduce:

  1. Create an image using Inkscape or Powerpoint and save it as a .pdf.
  2. Place image into a LaTeX document with appropriate alignment and justification and compile using pdfLaTeX.
  3. Open pdf document in Secure PDF viewer.
  4. .pdf images within the document are now displayed in top left hand corner.

Information:

App version: 3 OS: Android 10 (April 5, 2020 Security update) Device: Pixel 3a (stock)

Notes:

I believe this is related to something called "Page Groups", please see here: https://tex.stackexchange.com/questions/76273/multiple-pdfs-with-page-group-included-in-a-single-page-warning

This problem does not occur in other pdf document readers such as Adobe Reader or Microsoft Edge. I have attached the document for you to see the problem. Please open it in Secure PDF Viewer and any other pdf viewer to compare: document.pdf

den43 avatar May 10 '20 18:05 den43

Updating the PDF rendering engine code may resolve this... but that may require a lot of work due to upstream issues that were encountered last time it was attempted.

thestinger avatar May 27 '20 23:05 thestinger

Please try with the latest release (version 6) which has updated pdf.js.

thestinger avatar Nov 10 '20 23:11 thestinger

Please try with the latest release (version 6) which has updated pdf.js.

I joined the beta programme and tried with version 6 but the problem persists.

den43 avatar Nov 25 '20 02:11 den43

We're missing some CSS and/or JavaScript that solves this as other pdf.js PDF Viewers do not have this issue.

ghost avatar Feb 06 '22 18:02 ghost

Possibly this not only applies to images but to annotations in general. If we create annotated pdfs in the ipados notes or goodnotes app the annotations shift to the upper left corner as well. Of course if you flatten the pdf they are displayed correctly. poc.pdf I have attached an example pdf demonstrating the behaviour. If correctly rendered, eg on firefox, the grid fills the whole page. In the GrapheneOS pdf viewer it fills roughly the upper left ninth of the page. Maybe this is related to the layout issue mentioned in #183 and/or the issue concerning multiple pages (groups) described in #133.

Bernstein76 avatar Sep 09 '22 21:09 Bernstein76

Styling for annotations hasn't been implemented.

thestinger avatar Sep 09 '22 21:09 thestinger