Skip to content

PDF export : image ratio not kept #2866

Description

@Spitfireap

What’s broken?

Hi,

original issue here.

It seems that xl-pdf-exporter is trying to fit an image on the end of the page by modifying its aspect ratio instead of just inserting a page break, making the image on pdf export weird sometimes.

Doc example (https://www.blocknotejs.org/demo#jbm5s)

Image

PDF export :

Image

I'll try to see if I can solve it but my skills in PDF and JS are rather limited.

What did you expect to happen?

Image should be pushed to the next page instead of tinkering its aspect ratio

Steps to reproduce

  1. Create a new document
  2. Make it so the image is at the end of a page
  3. See its aspect ratio changing

BlockNote version

No response

Environment

No response

Additional context

No response

Contribution

  • I'd be interested in contributing a fix for this issue

Sponsor

  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue has not yet been reviewed or classified by maintainers.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions