I hope to add a parameter `matrix=None` to `page.show_pdf_page`
Closed this issue · 3 comments
Description of the bug
I encountered a problem. page.rect is set to Rect(0.0, 0.0, 595.2760009765625, 841.8900146484375), page.mediabox is set to Rect(0.0, 0.0, 841.8900146484375, 595.2760009765625), and page.rotation is set to 90. I intend to fix it using page.set_mediabox and then write it into a new PDF document. `new_page.show_pdf_page(
new_page.rect, # target rectangle
doc, # source document
page_num, # source page number
matrix = matrix # transformation matrix
)
How to reproduce the bug
In the source code
def show_pdf_page(
page,
rect,
docsrc,
pno=0,
keep_proportion=True,
overlay=True,
oc=0,
rotate=0,
clip=None,
matrix=None
):
if not matrix:
matrix = calc_matrix(src_rect, tar_rect, keep=keep_proportion, rotate=rotate)
PyMuPDF version
1.26.5
Operating system
No response
Python version
No response
This is no issue at all. Please visit our Forum to discuss help.
Hello, will the parameter matrix=None be added in subsequent versions
Hello, will the parameter matrix=None be added in subsequent versions
No, this would not make sense at all.