Click here to Skip to main content
13,298,361 members (79,864 online)
Rate this:
Please Sign up or sign in to vote.
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 20-Feb-13 6:33am
Updated 20-Feb-13 6:35am
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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can load the pdf file and grab the screen as a bitmap
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:
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171207.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100