Skip to content
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

PDF rendering problem #4225

Open
denis-sp opened this issue May 9, 2024 · 4 comments
Open

PDF rendering problem #4225

denis-sp opened this issue May 9, 2024 · 4 comments

Comments

@denis-sp
Copy link

denis-sp commented May 9, 2024

SumatraPDF version

  • Version [e.g. 3.5.2, pre-release]

Both 3.5.2 and latest pre-release (16067, 2024-05-07)

Describe the bug
A clear and concise description of what the bug is.

Sumatra unable to render a pdf file correctly

To Reproduce
Steps to reproduce the behavior:

Open the following pdf files, the screen is blank though Adobe pdf reader render them correctly.

1.pdf
2.pdf

Expected behavior
A clear and concise description of what you expected to happen.

Expected correct rendering of the pages. See the screenshots below.

File that reproduces the problem
If this is related to a specific PDF etc. file, please attach the file.

I have seen it for one pdf file only, example pages are attached above.

Screenshots
If applicable, add screenshots to help explain your problem.

image

image

Additional context
Add any other context about the problem here.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented May 10, 2024

They are exotic JPG many readers see that as a page of white or black the colouring seem like it has been adapted in some way as not confined to the letters thus any attempt at improvement will fail. Generally only Acrobat viewer in Edge can see them but NOT the Chromium PDFium viewer.

The PDF are not good candidates for viewing as there are many oddities in exotic JPG file structure but basically these say that they are JPX images not baseline JPG.

Acrobat is about the only reader I could see anything apart from SumatraPDF 3.1.2 and if we try to maintain file size with PDF compatible JPEG the quality deteriorates.
Top is Acrobat then Sumatra PDF 3.1.2 and lowest a comparison after image made "normal" at similar byte size
image

Best all-round solution is this one saved from edit in an image viewer to be PDF standard.JPG then saved in SumatraPDF or Exchange to be universally usable as a PDF
good.pdf

2Untitled.pdf

If you need to convert the PDF to a PDF of standard images use Acrobat or GhostScript to rewrite the PDF using normal PDF and remove the JPX 2000 poor quality. Then they work in Edge SumatraPDF etc.

image

@denis-sp
Copy link
Author

Well, it's not a question of file conversion or something like that. The original pdf file, from which I've detached the attached pages, consists of 400+ pages like that. I can view it in Adobe Reader, or in Firefox. I just like Sumatra and would like to see its improving. But the pdf file is the only pdf file with bad rendering in Sumatra I've ever seen. I have the same book in djvu, and Sumatra fails rendering some pages of it too, but other djvu viewers fail to render it either.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented May 10, 2024

SumatraPDF 3.1.2 can probably read the whole file however the code that 3.1.2 was built on has changed because that file format is highly problematic as commercially licensed and AFAIK both Ghostscript and MuPDF reduced its support but there is a standalone JBIG2DEC tool that may work for decompression of images once extracted ?

Best solution is reprint whole file without JBIG2K or not JPX coding and thus any common image type would do so Jpeg or PNG etc.

However some PDF editors/Optimisers will see the images as invalid and fail to convert anything but blank pages.

image

@GitHubRulesOK
Copy link
Collaborator

@kjk
I think this is in effect similar if not same root cause as other JPX failures in working with odd JPX encodings.
currently open issue #1365

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

No branches or pull requests

2 participants