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

Images Pixelated on PDF Import #22

Closed
wbrenna opened this issue Sep 9, 2013 · 11 comments
Closed

Images Pixelated on PDF Import #22

wbrenna opened this issue Sep 9, 2013 · 11 comments
Assignees
Labels

Comments

@wbrenna
Copy link
Contributor

wbrenna commented Sep 9, 2013

Might be something to do with the old poppler library, but might also be something in Xournalpp.

@andreasb242
Copy link
Contributor

Only if you zoom in or always?

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 9, 2013

Apparently always - there is a noticeable effect compared to evince. It looks to be dynamically adjusting the image quality as I zoom in (and definitely the text is kept sharp) but especially text in an image looks pixelated.

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 9, 2013

It might be antialiasing. I'm testing by importing this document (page 6):
http://jfi.uchicago.edu/~leop/TALKS/AmsterdamCritical.pdf

@andreasb242
Copy link
Contributor

The PDF Page is rendered to an image, which is then drawn to the screen by Xounal++, so it's a problem with poppler.

To fix this there are 3 possibilities:

  1. make it working with the current poppler version, but has to be done every time poppler makes incompatible updates
  2. extend poppler API, this is not so easy, I asked on the poppler mailinglist (some time ago), they are not against it, but there was nobody who wants to help.
  3. Use another library, but then the PDF(s) have also be parsed by another library. There are some libraries which supports to put a PDF page on top of another.

The problem is only for PDF export, not for PDF import, there are many poppler APIs, GTK, C++, QT...

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 9, 2013

Good suggestions. My personal vote would be for number 1. What I was worried about was prematurely deprecating people like myself, who run Debian oldstable and are semi-permanently stuck using very old versions of poppler, but now that the addpoppler branch provides an internal version, I think it's safe to try moving to the most recent poppler API. It is probably a fairly good thing to do as 0.12.4 wasn't fully ISO PDF compliant, from what I hear.

My suggestion would be to jump to poppler-0.24.1. Thoughts? You know more than I about the internal poppler calls in Xournalpp; I haven't looked too closely at those yet, so I don't have a great sense of how difficult this will be.

@ghost ghost assigned andreasb242 Sep 9, 2013
@andreasb242
Copy link
Contributor

I now built it against poppler-0.24.1, its compiling and it loads PDFs.

I'll check tomorrow if all is working, and then commit the changes...

There are no big changes, only a few new flags, and some easy changes (e.g. supply the PDF document instead of the pdf xref table)

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 9, 2013

Sounds awesome! What is the plan for compatibility? Should the 0.12.4 addpoppler be maintained as a branch for those on older machines, or move master to a legacy branch, or maybe put everything together with macros depending on the system's poppler version?

@andreasb242
Copy link
Contributor

I replaced the old poppler source with 0.24.1, and compiled successfully on Ubuntu 12.04, so I think it should not be a problem if we deliver the correct poppler sources.

To use the system poppler version is a bad idea, because not all distributions delviers the necessary headers, e.g. Gento does not.

If you whish you can create a branch, e.g. if you think there is a new problem, you can easy test it.

@andreasb242
Copy link
Contributor

Ah sorry, I'm on the addpoppler branch... There it should be no question.

But for the main Branch its a good question...

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 10, 2013

Oh I see, yes, there should be no problem with putting it into the addpoppler branch. The only thing I could foresee is if some systems don't have access to recent enough libpng or libfontconfig packages, etc, such that the new poppler won't compile.

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 10, 2013

This issue is fixed in the poppler-0.24.1 branch. It was simply the poppler-0.12.4 that was causing the problem.

@wbrenna wbrenna closed this as completed Sep 10, 2013
@yasmah74 yasmah74 mentioned this issue May 18, 2023
@Samanbaia Samanbaia mentioned this issue Jul 22, 2023
@opaluja opaluja mentioned this issue Aug 3, 2023
@bmany bmany mentioned this issue Aug 4, 2023
@rschram rschram mentioned this issue Oct 26, 2023
@majorace majorace mentioned this issue Apr 9, 2024
@01-1 01-1 mentioned this issue Apr 20, 2024
@IlyaSulli IlyaSulli mentioned this issue May 4, 2024
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