|
|
#1 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Mar 2007
Location: Canada
Device: Sony Portable Reader
|
Code to Convert PDF to Images
With GhostScript (http://sourceforge.net/projects/ghostscript/) & GFL SDK/GFLAx (http://perso.orange.fr/pierre.g/xnview/engfl.html) which is free you can convert PDF files to other image formats. I'm sure that GFL works with MS Visual C# Express and MS VB 2005, which are also free. The code listing below will convert the first 6 pages for FAQ.PDF to png files using vbscript. You can test it out by saving the code into a file called test.vbs and then double click on it run it.
Code:
option explicit
displaypage
sub displaypage
const AX_PNG = 3
const numofpages = 6
Dim File, ThumbNail, imagepath, i
Set ThumbNail = createobject("GflAx.GflAx")
imagepath = "c:\test.png"
File = "c:\FAQ.pdf"
With ThumbNail
for i = 1 to numofpages
.EpsDpi = 72
.Page = i
.LoadBitmap File
.Saveformat = AX_PNG
.saveBitmap replace(imagepath,"test","test" & i)
next
end with
set ThumbNail=nothing
end sub
|
|
|
|
|
|
#2 |
|
Enthusiast
![]() Posts: 25
Karma: 15
Join Date: Feb 2007
Location: Switzerland
Device: Sony Reader
|
sorry!
sorry, i posted this in the wrong section...
Last edited by _darius; 03-27-2007 at 02:02 AM. Reason: wrong section... |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Apr 2007
|
Very nice ! Thanks for the example on PDF conversion. Works like a charm.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ebook-convert HTML to EPUB and problem with <pre><code> | mikegr | Calibre | 2 | 03-09-2010 02:27 PM |
| Best way to convert PDF with images? | anjelika | Sony Reader | 4 | 08-21-2009 02:23 AM |
| Convert multiple images(comics) to PDF - MAC | stustaff | Sony Reader | 2 | 11-28-2007 10:31 AM |
| Best way to convert images into PDF | Greg G | Sony Reader | 0 | 10-02-2006 09:50 PM |