Skip to content

Pages just White #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Cobular opened this issue Dec 27, 2019 · 3 comments
Open

Pages just White #6

Cobular opened this issue Dec 27, 2019 · 3 comments
Labels

Comments

@Cobular
Copy link

Cobular commented Dec 27, 2019

Hey!
I just came across this tool and really was hoping it would work, but alas something seems to have broken in the last 2 years. Some of the PDFs are coming out entirely white when I check them in chrome, and every page of their conversion looks like this:
image. Each page is also only 1kb in size, which doesn't seem right. I have also attached a sample PDF if that helps. I did have to change the following code from

squid_decoder/papyrus.py

Lines 15 to 23 in a5992bc

# This is a quick fix to check whether we can use pyPdf (depreciated) or PyPDF2
import pip
installed_packages = pip.get_installed_distributions()
flat_installed_packages = [package.project_name for package in installed_packages]
if 'PyPDF2' in flat_installed_packages:
from PyPDF2 import PdfFileWriter, PdfFileReader
elif 'pyPdf' in flat_installed_packages:
from PyPDF2 import PdfFileWriter, PdfFileReader

to

# This is a quick fix to check whether we can use pyPdf (depreciated) or PyPDF2
import pip
from PyPDF2 import PdfFileWriter, PdfFileReader

since the call to pip.get_installed_distributions() was erroring and the internet said that you can't call methods on pip from inside your code for some reason. However, it does seem to be working mostly, which is strange and a bit worrisome.

Combined PDF:
20180118_-_Ch.14-_History_Notes.pdf

Functional Page: page1.pdf

If you could help me, I would be very appreciative, but if this project is totally dead, then I understand. Either way, thanks!

EDIT: Looked into it more, that one document is a really weird page size. Could that be it?

@denysvitali
Copy link
Owner

Hey!
Thanks for opening this issue! Can you please send me the original file so that I can try to reproduce the problem? What version of Squid are you using?

@Cobular
Copy link
Author

Cobular commented May 21, 2020

It seems I totally forgot to follow up on this, sorry! I worked it out in the end, it was my bad. Thanks tho!

@denysvitali
Copy link
Owner

No problem! Can you elaborate a little bit more on what the issue was so that it could be helpful for other users too? (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants