When embedded, a PDF file from GoodNotes 5 causes significant lag in Anytype's UI, and is incorrectly rendered

Describe the bug
When a PDF file from GoodNotes 5 is exported and embedded as a PDF file in Anytype Desktop, it causes significant UI lag and is also somewhat incorrectly rendered. It appears as if all PDF files created with a non-blank template in GoodNotes will cause this issue, and files with more handwriting will cause more lag.

To Reproduce
Steps to reproduce the behavior:

  1. Export a file with handwriting or a non-blank template from GoodNotes in PDF format. I’ve provided the file as attachments in the “Additional Context” section.
  2. Import it back into Anytype in a PDF block. Once the PDF loads, the Anytype UI will lag significantly. The background will also appear to be darker and thicker than it actually is.

Expected behavior
I expected the PDF that was imported to not lag the UI significantly, as most other PDF viewers, such as Preview and Firefox’s PDF.js, are able to handle viewing the PDF with little issue.

System Information:

  • OS: MacOS 12.1
  • Device Manufacturer/Model: MacBook Air M1 Late 2020
  • Anytype Version: 0.23.0

Additional context
Here’s the file that were exported directly from GoodNotes.
Untitled (Draft) 5.pdf (3.7 MB)

This file generates like 10k clippaths in svg, which is pretty heavy for rendering. Do not think anything can be done here, I’ll try switching to canvas rendering, but it has some disadvantages.

1 Like

nvm, canvas fixed it

1 Like

@edwards it’s going to be the fastest patch we’ve ever done

4 Likes