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!
![]() |
Loading Multipgae Tiff with GDI+ mode |
Post Reply
|
| Author | |
iffi
Beginner
Joined: 09 Dec 10 Location: Germany Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: Loading Multipgae Tiff with GDI+ modePosted: 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); elserc = 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); |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
BEvans
Beginner
Joined: 07 Nov 10 Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store