How to insert an image outside the visible page rectangle #2780
Answered
by
JorjMcKie
unstoppableking
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
JorjMcKie
Nov 2, 2023
Replies: 2 comments 4 replies
-
This is normal and no issue at all. Please consult the documentation: The pag.rect is the visible part of the page - necessarily the full MediaBox. |
Beta Was this translation helpful? Give feedback.
2 replies
-
You can set the page's visible part to the full "physical" page, then insert what you want, then restore to the original page. Roughly do this (assuming page rotation = 0 for simplifying the explanation): cropbox = page.cropbox # save the old CropBox value
page.set_cropbox(page.mediabox) # set visible page equal to full page
page.insert.... # insert what you need
# optionally re-instate the old visible part
page.set_cropbox = cropbox |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
unstoppableking
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can set the page's visible part to the full "physical" page, then insert what you want, then restore to the original page.
Roughly do this (assuming page rotation = 0 for simplifying the explanation):