Click here to Skip to main content
15,881,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All

I am a novice programmer and interested in learning C programming . I have a project to convert PDF to BMP . I need suggestions about this project and any ideas regarding how to work my way up .
The language that i am using is C programming .

Thanks a lot
Posted
Updated 20-Feb-13 5:35am
v2
Comments
enhzflep 20-Feb-13 11:52am    
(1) "Less time" - less time than what?
(2) Do you wish to use libraries, or program it all yourself?

If you wish to code it yourself, I'd be tempted to port the javascript code (Mozilla's, I think) that will will display a pdf in a browser. Once you can render the pdf, you can save it to a bmp (or png, etc)

Creating PDFs is a considerably simpler task than rendering them - writing code to create them is not exactly the easiest code I've ever written..

Adobe's PDF v1.2 & v1.6 refferrence docs include simple, minimal examples of pdfs. You could always start by trying to convert them to an image - it would be a simpler task than porting the aforementioned javascript code. :)
Venkata 007 20-Feb-13 11:57am    
1)Time is 1000 bitmaps in 100 seconds is the criteria .
2)Regarding Libraries , i think in C programming i have to code all the libraries my self .
enhzflep 20-Feb-13 12:31pm    
Rendering 10 pages a second seems an arbitrary rate - even acrobat doesn't reach this speed all the time. Anyhow, I suggest you get the 1.2 and 1.6 specs and start reading and drinking lots of coffee or RedBull! :laugh:

Adobe pdf 1.2
Adobe pdf 1.6
Adobe AFM font specs

Also, the source code for pdftk may help save quite some time. http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

Well, it can work. "Display a PDF page" can also be when you use a virtual raster.
First, you need to find out the best suitable way to load and display the PDF pages.
Try [^]

Then, you can use BitBlt to copy the raster where the page is displayed into a bitmap and save it.
If you are progressing but need help, please send me your source code and I'll help you.

See also:
How to Read, Write and Edit PDF Files and Metadata using LEADTOOLS[^]
 
Share this answer
 
v2
You can load the pdf file and grab the screen as a bitmap
 
Share this answer
 
Comments
enhzflep 20-Feb-13 14:47pm    
Oh yes. How exactly do you propose to do that at the rate of 100 pages a second?
enhzflep 20-Feb-13 15:16pm    
Er, um - must be time for bed for me. I'm clearly out here by a factor of 10! Since the OP wants to do 1000 pages in 100 seconds, 10fps rather than 100fps. :oops:
Nice suggestion of PoDoFo as a means to extract the data before rendering. :thumbsup:
Michael Haephrati 20-Feb-13 15:28pm    
Good night then. Hope I helped you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900