1

I am using cfpdf and cfdocument to create thumbnails and save them to a pdf. Everything works ok but I don't like the resolution. What other approach can I use to generate images from HTML, then create a pdf with those images.

2
  • Could you give me a little more details about what you are trying to accomplice. An example would be very helpful.
    – Nebu
    Jun 15, 2015 at 13:27
  • i solved the issue generating thumbnails with same with of a "a4" page, so in print the resolution is the same of webpage. Jul 9, 2015 at 17:34

2 Answers 2

1

Without more details on your issue, I can only guess at a solution. That said, when using cfpdf action="thumbnail", there is an attribute called hires which can be set to "yes". This will retain the resolution of the image (doesn't shrink it down). If that doesn't do the trick, you could combine hires="yes" with scale="100" to retain the original dimensions of the image. The resulting image should be identical in size and resolution to the source document, and you are free at this point to use CSS to control the actual size of the image on the pdf during cfdocument.

1
  • Sscale retain original dimensions, so it's not enothing cuz i generate thumbnails from webpages and i will add to a pdf that have a diff dimensions, using a combination of scale + maxBreadth solved me problem, so now i can generate hi resolution pdf based on any html page. Jul 9, 2015 at 17:39
0

I solved my issue, just need to use a combination of maxBreadth + scale = 100. But remember, hi maxBreadth number result in a slow process to generate thumbnails.

if you only use scale = 100, thumbanail will be generated based on your html page, if you want a increase the width of the thumbail to generate a better resolution thumbnail, you need to use maxBreadth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.