Solved

How to export pdf as image in visual c++

Posted on 2006-11-29
12
390 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need public domain images 7 107
is twain_32.dll cmpatible with windows 10 ? 10 127
How to gracefully close the c++ 11 thread? 3 83
c++, dynamic object by json 1 24
Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

895 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

11 Experts available now in Live!

Get 1:1 Help Now