atom-community / markdown-preview-plus

Markdown Preview + Community Features
https://atom.io/packages/markdown-preview-plus
Other
370 stars 88 forks source link

Large images don't always load properly when saving as PDF #536

Open danieltaylor opened 2 years ago

danieltaylor commented 2 years ago

Description

When I add a large image to a markdown file, everything looks fine in preview mode, but the resulting PDF (using either the "Make PDF" or "Save As..." options) often doesn't have the full image in it.

Steps to Reproduce

  1. Add an image to a markdown file, e.g. ![](test.png). (The image used in this example is a PNG of approximately 3000 × 2000 pixels.)
  2. Use MPP to create a PDF.

Expected behavior:

The image should be fully displayed in the PDF, just as it is in preview mode:

Screen Shot 2022-04-21 at 11 02 22 PM

Actual behavior:

The image is only partially displayed in the PDF:

Screen Shot 2022-04-21 at 11 02 07 PM

Reproduces how often:

Probably depends on the size of the image, but I've seen it happen about 90% of the time or more when trying to create a PDF containing a large image. Usually if I try making a PDF over and over it eventually works.

Versions

Atom 1.60.0 macOS 12.3.1

Additional Information

I would be interested in seeing if others are able to reproduce this issue.

lierdakil commented 2 years ago

Well, I tried to fix the issue, but when I went to try to publish the patch version, I got

Publishing markdown-preview-plus@v4.11.3 ✗
Creating new version failed: Application error

Sigh. I'm switching to VSCode. I suggest you do the same.