Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner


Thread Tools Search this Thread
Old 03-25-2007, 11:55 AM   #1
Junior Member
letkemanp began at the beginning.
Posts: 4
Karma: 10
Join Date: Mar 2007
Location: Canada
Device: Sony Portable Reader
Code to Convert PDF to Images

With GhostScript ( & GFL SDK/GFLAx ( 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.

  option explicit
  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)
  	end with
  	set ThumbNail=nothing
  end sub
letkemanp is offline   Reply With Quote
Old 03-27-2007, 02:06 AM   #2
_darius began at the beginning.
Posts: 25
Karma: 15
Join Date: Feb 2007
Location: Switzerland
Device: Sony Reader

sorry, i posted this in the wrong section...

Last edited by _darius; 03-27-2007 at 03:02 AM. Reason: wrong section...
_darius is offline   Reply With Quote
Old 04-19-2007, 05:25 PM   #3
Junior Member
cyeung began at the beginning.
Posts: 1
Karma: 10
Join Date: Apr 2007
Very nice ! Thanks for the example on PDF conversion. Works like a charm.
cyeung is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 03:27 PM
Best way to convert PDF with images? anjelika Sony Reader 4 08-21-2009 03:23 AM
Convert multiple images(comics) to PDF - MAC stustaff Sony Reader 2 11-28-2007 11:31 AM
Best way to convert images into PDF Greg G Sony Reader 0 10-02-2006 10:50 PM

All times are GMT -4. The time now is 10:17 PM. is a privately owned, operated and funded community.