Solved

How to export pdf as image in visual c++

Posted on 2006-11-29
12
391 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
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.

 
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
 
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

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.

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 117
C++ standard library based binary archive format 6 98
C++ to C# code conversion issue 4 106
Problem with SqlConnection 4 168
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This article shows how to convert a multi-page PDF file into multiple image files, with one image file created for each page of the PDF. It does this by utilizing an excellent, free software package called GraphicsMagick. The solution is amazingly s…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

770 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