Solved

How to export pdf as image in visual c++

Posted on 2006-11-29
12
396 Views
Last Modified: 2013-12-14
Hi,

I am having problem with my c++ project, i need to add function where it can open PDF file and export it as image (jpg,png) without having to display it on the screen.
I try to search around for the DLL to render PDF file but couldnt find any, does anyone know what should i do?



Best regards
0
Comment
Question by:iphone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 12

Expert Comment

by:rajeev_devin
ID: 18035714
0
 

Author Comment

by:iphone
ID: 18035802
nice one, but its quite expensive.. (usd 299)
anyone know cheaper one? preferably free because the project is non-profit ;(



0
 
LVL 86

Expert Comment

by:jkr
ID: 18039420
Does it have to be an image or would reading the contained text be sufficiant? If so, check out http://www.codeproject.com/cpp/ExtractPDFText.asp ("Code to extract plain text from a PDF file")
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:pepr
ID: 18040786
Try to call the ImageMagick's (http://www.imagemagick.org/) utility convert or to use the core library programmatically to do the same. I guess that ImageMagick uses the libraries from GhostScript (http://www.cs.wisc.edu/~ghost/) to work with PDF.

I usually use only the convert utility to convert png or tiff images into PDF, but the opposite direction (from PDF to raster images) is said to be also supported. If the convert utility works, you should be able to use the core libraries to do the same. As far as I know, the ImageMagick is available with GPL compatible license and the GhostScript also with the Activestate Free Public License (AFPL).
0
 
LVL 29

Expert Comment

by:pepr
ID: 18051738
Well, I tried the "convert something.pdf something.png" and it created the something-0.png and something-1.png, because the something.pdf contained two pages. You can get the sources at http://www.imagemagick.org/script/install-source.php#windows or http://www.imagemagick.org/script/install-source.php#unix.
0
 

Author Comment

by:iphone
ID: 18051805
I need to have imagemagick installed to use it.
Im looking for something like DLL actually, so i can integrate it with my application and the user dont have to go through the problem of installing image magick
0
 
LVL 29

Expert Comment

by:pepr
ID: 18052797
There are both static and DLL versions of the ImageMagick precompiled binaries -- see http://www.imagemagick.org/script/binary-releases.php#windows. The DLL version contains the core DLL and some DLL related to image formats. I is likely you could create some customized minimal instalation. The versions can also be compiled from the sources that you can also get. It means that, technically, you can statically or dynamically link it to your specific application (you should check the license).

There is also the server  http://www.imagemagick.org/discourse-server/ to help solving various problems related to ImageMagick. Ask there.
0
 

Author Comment

by:iphone
ID: 18058669
hmm.. it requires ghostscript to be able to work with pdf..
i found some dll that i want but they are too expensive:
http://www.foxitsoftware.com/pdf/sdk/dll/

and

http://www.pdf-tools.com/asp/products.asp?name=P2IA&gclid=CNX_p_HU7ogCFQOnTAodmhMPiQ

anyone know where can i get the cheaper dll?
0
 
LVL 86

Expert Comment

by:jkr
ID: 18058680
Hm, again: Does it have to be an image or would reading the contained text be sufficiant?
0
 

Author Comment

by:iphone
ID: 18058775
It has to be image.. the exported image of the pdf pages to be exact
0
 
LVL 29

Accepted Solution

by:
pepr earned 500 total points
ID: 18062988
And what is the problem with Ghostscript? You can have it for free. If you are fine with GPL, you can use the sources http://sourceforge.net/project/showfiles.php?group_id=1897&package_id=108733&release_id=421473.

Also, have a look at "Graphics Conversion project" at SourceForge http://sourceforge.net/softwaremap/trove_list.php?form_cat=105 to search for possibly another free tools.
0
 

Author Comment

by:iphone
ID: 18065911
the ghostscript need installation, thats the problem..
however i have found a cracked dll to solve my problem..
thanks alots for helpingme anyway

cheers
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This article provides the solution to a question (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28674207.html) posed here at Experts Exchange. The asker of the question has many JPG images in many folders, and all of t…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question