devnoname120 / google-play-book-downloader

Download and decrypt books purchased on Google Play Books without text reflowing
GNU Affero General Public License v3.0
54 stars 4 forks source link

Pages of right-to-left mangas are not reordered (even/odd pages not swapped) #6

Closed KodywithaK closed 5 months ago

KodywithaK commented 1 year ago

Summary

I don't know how many people will run into this same problem—as it may just be the eBooks I purchased are odd ducks, but if not—hopefully this helps

Problem

I had an issue with my page order (the eBook was an official english translation of an eBook originally in japanese), so every odd numbered page starting from page 3 was on the opposite side of its intended 2-page spread

Solution

With VSCode, I opened the "google-play-book-downloader\books\{BOOK_ID}\pages.txt" file


Thanks devnoname120, your program is a big help to backup all my books!

devnoname120 commented 1 year ago

Thanks for your report. Does the page ordering issue also happen if you open your ebook in Google Play Books? Or does this issue only happen in the PDF that is created with my tool?

KodywithaK commented 1 year ago

Just on the created pdfs, anytime the page order is right to left instead of left to right

devnoname120 commented 1 year ago

@KodywithaK Interesting... Could you share the manifest.json file? You can censor the links inside that contain &sig= if you want.

KodywithaK commented 1 year ago

I haven't committed for a PR yet, but also I added unescape_html() to manifest_text to prevent HTML special characters from showing up in the manifest like a couple do in the zip here

const manifest = JSON.parse(unescape_html(manifest_text));

manifests.zip

devnoname120 commented 1 year ago

Interesting.

So I see in the following in manifest vSzFDwAAQBAJ.json and manifest xpKkDwAAQBAJ.json:

    "is_right_to_left": true,

Can you confirm that these two books have the odd and even pages reversed in the PDF that is produced by the tool? And can you confirm that the remaining book EzGDwAAQBAJ doesn't have issues?

KodywithaK commented 1 year ago

Yes, that's true; on vSzF and xpKk I had to move the page order around to look as it should