4

I am experimenting with poppler pdf library and Qt4. I use this instruction:

image = pdfPage->->renderToImage(72.0,72.0, 
                                 0,0,
                                 pdfPage->pageSize().width(),
                                 pdfPage->pageSize().height());

Are there better parameters? Even if I put 200.0,200.0 quality is bad, compared to pdf reader in Ubuntu.

magrif
  • 396
  • 4
  • 20
P5music
  • 281
  • 3
  • 12
  • 1
    with no answers accepted so far, out of 11 total questions, probably noone will bother to look at it. You make a bad SO citizen. Feel ashamed :D – Flavius Aug 02 '11 at 11:40
  • I click on "yes" at "Was this post useful to you?" button, I do not see other buttons. You feel ashamed not understanding this is a qui-pro-quo and you missed the occasion to help. – P5music Aug 02 '11 at 12:04
  • "quid-pro-quo", and what do you give in return, so far? Huh! You contradict yourself with your own arguments. – Flavius Aug 02 '11 at 12:44
  • The operative word is 'Accept' – KevinDTimm Aug 02 '11 at 14:00
  • 1
    Maybe the fact that I do not log-in make this button not appear. However qui-pro-quo is synonym for "misunderstanding", while quid-pro-quo is synonym for "do-ut-des" (maybe I am asking too much to you @Flavius here) so I did not mean "do-ut-des" like you misunderstood, I correctly meant "misunderstand". – P5music Aug 03 '11 at 08:43
  • Yes P5music, maybe you are too good for us. I don't see any big interest of anyone to answer your question, so my first assumption still holds. Yet I am the one who hasn't understood SO. Haha. The point is, your own ego stays in the way of getting things right, for your own good. Unprofessional. Grow up. Cheers. – Flavius Aug 03 '11 at 09:22
  • You stay professional too and avoid writing things like "Feel ashamed :D". I tell you again: I am not able or allowed to "accept" answers, probably because of not logging-in. Cheers. – P5music Aug 03 '11 at 10:02
  • You wouldn't be allowed to ask and post comments if you were not logged in. What kind of programmer are you? – Flavius Aug 03 '11 at 21:57
  • Sure? Have you heard of cookies? This site allows users to post just with their nickname and email address. Stop bothering me or I will log-in and I will call for moderator's attention. – P5music Aug 04 '11 at 08:29

1 Answers1

7

document->setRenderHint(Poppler::Document::TextAntialiasing); was useful

P5music
  • 281
  • 3
  • 12
  • Just to add to the answer, call setRenderHint() before renderToImage(); – Philip Langford Apr 03 '19 at 16:38
  • And since then, there are several new flags to render even better-looking, see [`RenderHint` enum documentation](https://poppler.freedesktop.org/api/qt6/classPoppler_1_1Document.html#a8420ce678235ee6214fbd91f5ae2f4e9) – λuser Apr 25 '23 at 08:43