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 - Loading Multipgae Tiff with GDI+ mode
  FAQ FAQ  Forum Search   Register Register  Login Login

Loading Multipgae Tiff with GDI+ mode

 Post Reply Post Reply
Author
Message
iffi View Drop Down
Beginner
Beginner
Avatar

Joined: 09 Dec 10
Location: Germany
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote iffi Quote  Post ReplyReply Direct Link To This Post Topic: Loading Multipgae Tiff with GDI+ mode
    Posted: 09 Dec 10 at 5:02PM
Hi all, I´m relatively new to Quick PDF, but programming for many years...
I´m working with Quick PDF 7.2.2 as DLL version in MS Visual C++.
 
I have special Tiff Imagges that are compressed CCITT T.6 (singe page and multi page)
This compression causes problems, when loading these images into a PDF with the function AddImageFromFile(<name>, param) and param is 0 or the pagenumber of a multipage Tiff.
If I use the param -1, the tiff file is loaded correctly! But I can only use this param -1 for single page tiffs and NOT for multi page tiff (as far as I understood the documentation and my tests have shown).
Is there any way to use the advanced GDI+ option for multi page Tiffs too?
Any advise would be highly appreciated!
 
Here is some sample code of the main routine:

int pageCount = QP.GetImagePageCount(fName);

for (int p=1;p<=pageCount;p++) {

if (pageCount>1)

rc = QP.AddImageFromFile(fName, p);

else

rc = QP.AddImageFromFile(fName, -1);

if (!rc) {

Msg.Format("CreateImageMerge: ERROR (%i) loading tif-file: %s into PDF\n", rc, fName.c_str());

OutputMsg(1, Msg );

}

else {

if (p>1) QP.NewPage();

int rc2 = 0;

int lWidth = QP.ImageWidth();

int lHeight = QP.ImageHeight();

rc2 = QP.CompressImages(1);

rc2 = QP.SetPageDimensions(lWidth, lHeight);

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

}

}

int rc2 = QP.SaveToFile(fNamePDF);

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

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 10 at 7:48PM
Hi!
 
As far as i know multipage is still a problem.
You should post it on the official support page.
You'll reach it via www.quickpdflibrary.com
 
Cheers and welcome here,
Ingo
 
Back to Top
BEvans View Drop Down
Beginner
Beginner
Avatar

Joined: 07 Nov 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote BEvans Quote  Post ReplyReply Direct Link To This Post Posted: 12 Dec 10 at 8:13PM
Multipage TIFF files are just single page TIFF files placed one after another in the file. As a workaround you can use AddImageFromFileOffset() but it does require you to figure out using some other TIFF library where each page starts in the file. You could also use some other TIFF library to split the file into single pages and process those.

Ideal would be if AddImageFromStream didn't reset the stream position to zero all the time so it could be used to get multiple pages from a TIFF file. 
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