• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to convert a PDF to a high resolution image with ColdFusion?

New Here ,
Oct 21, 2010 Oct 21, 2010

Copy link to clipboard

Copied

I would like to determine how to convert PDFs to high resolution images using ColdFusion.

I'm running ColdFusion 9,0,0,251028 on CentOS 5.5 with Apache 2.2.3.

The <cfpdf action = "thumbnail" ...> is all well and good for creating 72 dpi images of a PDF, but I need to be able to create 300 dpi images of a PDF.

The PDFs in question have a much higher level of detail available than 72 dpi.

The related scale attribute for the action="thumbnail" functionality has an accepted range of 1 to 100, but an example of what I need is something more like a value of 415.

I should mention that I did try to use the jpgdpi attribute, and set it to 300 dpi . . . which produced a JPG that was indeed set to 300 dpi, but still had the same pixel dimensions as the 72 dpi image, so this did not affect the pdf to jpg conversion process in any way to make the image higher resolution.

Alternatively, would another possibility be to use ColdFusion to alter the dimensions of the pdf to be 415% of its original dimensions in memory, and then output a 100% thumbnail of that altered PDF? Is this possible? I can not for the life of me work out how to alter the set dimensions of a PDF via ColdFusion, in order to determine if this would have an affect on the size of the thumbnail produced.

Or more broadly, how would you use ColdFusion to convert a PDF to a (or a series of) high resolution images?

Thanks in advance for any help on this.

TOPICS
Advanced techniques

Views

3.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 21, 2010 Oct 21, 2010

Copy link to clipboard

Copied

I assume you've tried to set the resolution="high" attribute already?

Cheers

Kai

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2010 Oct 21, 2010

Copy link to clipboard

Copied

Re: Have I tried using resolution="high"

Yes, I've tried all permutations that seemed remotely encouraging. Currently it is something like this:

<cfpdf action="thumbnail" source="x.pdf" imagePrefix="x.pdf" pages="1" format="JPG" destination="images" overwrite="true" resolution="high" hires="yes" scale="100">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 21, 2010 Oct 21, 2010

Copy link to clipboard

Copied

Another idea:

Use a third party tool with CFEXECUTE if there's no other way. As you're on Linux you could easily run ghostscript on the command line to do it. gs lets you specify filetype as the device and also has options for resolution. For Windows there's gs as well (not sure though what it's command line capabilities are there) or tools like this: http://www.softinterface.com/Convert-PDF-To-Image/Convert-PDF-To-Tiff.htm

Cheers

Kai

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2010 Oct 21, 2010

Copy link to clipboard

Copied

LATEST

Re: Third Party tool / cfexecute

I'm already using ghostscript / imagemagick, I want to use ColdFusion, as an alternative because it has better compatibility with all kinds of PDFs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation