Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - convert gif to pdf
  FAQ FAQ  Forum Search   Register Register  Login Login

convert gif to pdf

 Post Reply Post Reply
Author
Message
abenitez77 View Drop Down
Beginner
Beginner


Joined: 24 Oct 10
Location: FL, USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote abenitez77 Quote  Post ReplyReply Direct Link To This Post Topic: convert gif to pdf
    Posted: 25 Oct 10 at 12:00PM

I have 100,000 gif images and I want to convert them all to pdf files.  How can i do this in a script?

Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 10 at 6:05PM
Converting GIF images to PDF files can be done relatively easily. Here's a sample written in JScript:

-------------------------------------------------------
/* Convert an image to a PDF */

// Load a sample image into memory

QP.AddImageFromFile("sample123.gif", 0);

// Get the width and height of the image

lWidth = QP.ImageWidth();
lHeight = QP.ImageHeight(); 

// Reformat the size of the page in the selected document 

QP.SetPageDimensions(lWidth, lHeight);

// Draw the image onto the page using the specified width/height

QP.DrawImage(0, lHeight, lWidth, lHeight);

// Store the updated PDF where you like

QP.SaveToFile("sample123.pdf");
-------------------------------------------------------

All you have to do is loop through this little snippet of code for each image that you wish to convert.
Back to Top
abenitez77 View Drop Down
Beginner
Beginner


Joined: 24 Oct 10
Location: FL, USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote abenitez77 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 10 at 8:09PM
Thanks!
I am unfamiliar with jscript.  If I had a folder "e:\images" and wanted to loop thru the gif files in that dir, what is the syntax? 
Back to Top
abenitez77 View Drop Down
Beginner
Beginner


Joined: 24 Oct 10
Location: FL, USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote abenitez77 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 10 at 8:11PM
How would i kick that script off?  do I need to run in from within quickpdf?
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 26 Oct 10 at 7:27AM
It might help if you tell us which programming language you are trying to use.

Wheeley
Back to Top
abenitez77 View Drop Down
Beginner
Beginner


Joined: 24 Oct 10
Location: FL, USA
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote abenitez77 Quote  Post ReplyReply Direct Link To This Post Posted: 26 Oct 10 at 11:45AM
I am familiar with vbscript and vba
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 26 Oct 10 at 8:58PM
There is some samples on how to use Quick PDF Library with VBScript in this folder (after you've installed Quick PDF Library):

C:\Program Files\Quick PDF Library\Samples, Tutorials and Help\VBScript

It should not be very hard to convert the JScript code that I posted into VBScript, just a few minor changes like removing the semi-colons from the end of the lines and a few other things.

As for looping through each image in the folder, off the top of my head I'm not familiar with how to do this in VBScript, but you should be able to find a sample in Google.

Good luck!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store