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 - Problem with TIF to PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem with TIF to PDF

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


Joined: 13 Aug 07
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JimCanuck Quote  Post ReplyReply Direct Link To This Post Topic: Problem with TIF to PDF
    Posted: 13 Aug 07 at 11:38AM

Greetings to all. I am new to the forum.

I have been using ISED.dll (ver 4) with VB6 for a while to do basic pdf document manipulation, then recently, I needed to convert TIF image files to PDF documents.  I tried the obvious AddImageFromFile() function, but have problems.
 
As I found after (finding! ) and searching on this forum, there has been problems with blank pages in the PDF after loading image files, which appears to have been addressed in ver 5.21 and later, but after trying this new version, I still get blank pages. 
 
Can some one provide a little example code of the correct way to import TIF images to produce good PDF documents? I will be converting multiple tifs, one tif per page, each sized to fit the current page size, into new PDF documents. The documents will not contain any other objects.
 
I am importing Tif files with LZW or Packbit compression, 8 bit color, 50 to 600 dpi. Also some G4 or G3 fax format files.
 
Here is my code that I have been trying. I am trying to load a single tif (less than one A4 page in size) to a one page PDF for starters.
 
  Dim QP As iSED.QuickPDF
  Set QP = CreateObject("iSED.QuickPDF")
  QP.NewDocument
  QP.NewPage
 
'add the image tif file
  rsp = QP.AddImageFromFile(inputTifFileName, 0)
'make the document
  rsp = QP.SaveToFile(pdfoutputFile)
  Set QP = Nothing
 
 
Thanks in advance for any help you can 'render'  Tongue
 
Jim
Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 13 Aug 07 at 11:54AM
Hi there,
remove the call to NewPage and everything should be ok. Please do not forget that in QuickPDF an empty document has always an empty page.
Back to Top
JimCanuck View Drop Down
Beginner
Beginner


Joined: 13 Aug 07
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JimCanuck Quote  Post ReplyReply Direct Link To This Post Posted: 13 Aug 07 at 12:11PM
Marian:
 
Thank you for the very fast reply!
 
Sorry, your suggestion did not solve the problem. It did of course remove the second page from the resulting document.  
 
So other than incompatible image files or silly programming mistakes, there should be no problem creating PDF from TIF now with 5.21 or later?
 
 I have tried a few tif variants (LZW, RLE, no compression) and BMP converted images, with the same blank page results.
 
I am definitely using ised.dll  ver 5.22.0.145  in (VB 6 on WinXP)
 
Any further suggestions will be welcomed.
 
Jim
Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 15 Aug 07 at 8:23PM
Jim,
I have answered you directly per email. To make sure that this solution is visible for the whole community I will place my solution here as well:
 
  Dim QP As iSED.QuickPDF
  Set QP = CreateObject("iSED.QuickPDF")
  QP.NewDocument
  ' QP.NewPage
  ' - NewPage is not needed because a NewDoc has always a new Page
 
'add the image tif file
  rsp = QP.AddImageFromFile(inputTifFileName, 0)
  call QP.DrawImage(left, top, width, height)
  ' this call you have to add to your source code
'make the document
  rsp = QP.SaveToFile(pdfoutputFile)
  Set QP = Nothing 
 
Best regards, Marian
Back to Top
JimCanuck View Drop Down
Beginner
Beginner


Joined: 13 Aug 07
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote JimCanuck Quote  Post ReplyReply Direct Link To This Post Posted: 16 Aug 07 at 2:07PM

This does indeed solve the problem. Thank for all the great support.

Time to study more interesting details about creating PDF!
 
Cheers! Jim
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