Skip to content

How to insert an image outside the visible page rectangle #2780

Answered by JorjMcKie
unstoppableking asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@unstoppableking
Comment options

@unstoppableking
Comment options

Comment options

You must be logged in to vote
2 replies
@unstoppableking
Comment options

@JorjMcKie
Comment options

Answer selected by unstoppableking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
not a bug not a bug / user error / unable to reproduce
2 participants
Converted from issue

This discussion was converted from issue #2779 on November 02, 2023 13:18.