Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placing a PDF with image() does not respect the mediaBox of the PDF. #461

Open
JakobFangmeier opened this issue Dec 11, 2021 · 2 comments
Open

Comments

@JakobFangmeier
Copy link

Placing a PDF in Drawbot does not respect the mediaBox.

Expected result, as replicated in Illustrator:

Screenshot 2021-12-11 at 10 50 47

Actual result in Drawbot:

Screenshot 2021-12-11 at 10 52 56

@typemytype
Copy link
Owner

RF currently doesnt take the mediaBox into account to position the pdf asset.

A PDFPage has support to retrieve bounds for each display box:
https://developer.apple.com/documentation/pdfkit/pdfpage/1504213-boundsforbox?language=objc

and the position has to be adjusted here:
https://github.com/typemytype/drawbot/blob/master/drawBot/context/pdfContext.py#L281-L285

this goes maybe together with this unsolved PR #304

@typemytype
Copy link
Owner

displayTrimBox.zip

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants