Solved

How to export pdf as image in visual c++

Posted on 2006-11-29
12
389 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
  • 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
 
LVL 28

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 28

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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 28

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 28

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

PaperPort (http://www.nuance.com/for-individuals/by-product/paperport/index.htm) is among the most important applications that I run on my Windows computers. I use it every day, for nearly all of my document and photo scanning, as well as most of my…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Microsoft Office Picture Manager has a Picture Shortcuts pane that shows a list with the Recently Browsed folders. While creating my video Micro Tutorial here at Experts Exchange showing How to Install Microsoft Office Picture Manager in Office 2013…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now