Merged epub from multiple epubs show 1st page as blank? #791
-
I have an epub created from multiple epub files using the When load the epub with While test with Is there any work around to shows the 1st page as what mupdf does? A test epub was attached. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Confirming this behaviour - weird indeed. >>> import fitz
>>> doc=fitz.open("test-merge.epub", rect=(0,0,400,600))
>>> page=doc[0]
>>> page.rect
Rect(0.0, 0.0, 400.0, 600.0)
>>> pix=page.get_pixmap()
>>> pix.writeImage("t.png")
>>> the page picture is shown correctly. It also works if choosing an A4 rectangle on open. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your investigation. You are right, the aspect ratio will change the behavior. It seems that re-layout() the doc after loading the first page works well. However, what aspect ratio that will make the cover page work is not clear to me. A rect (500, 600) don't work. (450, 550) don't either. A more portrait aspect works, while landscape don't. Don't know why. |
Beta Was this translation helpful? Give feedback.
Confirming this behaviour - weird indeed.
Page rect is (0, 0, 450, 600) when opened without parameter. But if you do this:
the page picture is shown correctly. It also works if choosing an A4 rectangle on open.
One can also do a
doc.layout()
with an appropriate rectangle before loading the first page, and it will work ...