Not a bug

Comic Reader some PDF files are displayed upside down

John Koutromanos 4 years ago updated 4 years ago 11
Man, you are doing a fantastic job!
I have a number of PDF Comics. Some of the them are displayed upside down although they are displayed properly on a PC and with PDF.js viewer (I tried on Pydio as well).
It seems that it is related to the JPedal viewer but I don't know how I can fix it myself.
Can you please help?
Under review
Well that's an interesting problem you have there. :)
Could you provide a PDF file I could download somewhere to reproduce the problem on my side and investigate it ?
any news mate? Did you at least get the file?
Thank you!
I got it but I am currently unable to use a computer (posting from bed). I'll give a more complete answer when I'm back (in a week, maybe two), sorry for the wait.

Hi Tom,

any news on this?

Thanks mate and apologies for spamming.

Hi Tom,

Did you have the chance to look to this?

Thanks mate.

Not a bug

I'm back.

The online comics reader of Ubooquity does not render PDF pages. It merely extract the first image found in the current page and displays it.

By the way the extraction is done using PdfBox. Jpedal is only used to render covers (and pages of PDF shared as ebooks). That's because although JPedal is quite good at rendering PDF, the free version limits image resolution to a point that it can't be used to render comics pages.

The PDF you have a problem with stores its images upside down and contains roation instructions in its layour information (that's weird, I don't understand why it's done that way). In a regular PDF reader, the image is displayed correctly since the rendering pass rotates it. When the image is displayed "as is", it stays upside down.

I plan to replace JPedal with the PDF.js reader, but only for ebooks, not comics. So when it's done, you'll be able to read your upside-down comics, but only by sharing them as books.

Not ideal, I know. :(

thanks Tom. Is there a reason only books you will do the change?

Well for starter, except in a few unfortunate cases (when PDF comics are not simple images), the current way of reading PDF comics is working quite well. Given the little time I have to work on Ubooquity, I have to choose between having one feature working for 100% of cases, or two features working for 90% of the cases.

It's common in software development to choose the second option, as you can easily spend insane amount of time trying to make your software work in every situation.

The second, and perhaps more valid reason, is that I'm not sure that PDF.js will allow me to control content streaming page by page, meaning the full document would be downloaded in the end (provided you don't stop reading) whereas the current reader only downloads what's needed when you display a page.

I have yet to start working with PDF.js and understand how streaming would work exactly. So this is not a definitive no, but for now I plan to stay with the current comic reader.

mate, really appreciate for such comprehensive response. I like your software and will definitely will be following the development.