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!
![]() |
Save tiff with transparency on disk |
Post Reply ![]() |
Author | |
dezhavi ![]() Beginner ![]() ![]() Joined: 24 Jan 18 Location: Russian Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 24 Jan 18 at 10:11AM |
Hello! I have a pdf that contains tiff with transparency. I need to save to disk this picture in the form in which it lies in pdf, with transparency Tell me how I can get tiff with transparency. Now, when the image is saved, I get a bmp format file Below is an example code. Tried with different pdf, the result is the same. Is it possible to save tiff with transparency from page to disk int pC = qPdf.PageCount(); for (int i = 1; i <= pC; i++) { qPdf.SelectPage(i); int il = qPdf.GetPageImageList(0); int ic = qPdf.GetImageListCount(il); for (int k = 1; k <= ic; k++) { int it = qPdf.GetImageListItemIntProperty(il, k, 400); int gid = qPdf.GetImageListItemIntProperty(il, k, 405); switch (it) { case 1: filename = "image-" + Convert.ToString(gid) + "-" + k + ".jpg"; break; case 2: filename = "image-" + Convert.ToString(gid) + "-" + k + ".bmp"; break; case 3: filename = "image-" + Convert.ToString(gid) + "-" + k + ".tif"; break; case 4: filename = "image-" + Convert.ToString(gid) + "-" + k + ".png"; break; } qPdf.SaveImageListItemDataToFile(il, k, 0, "d:/xpdf/tet/" + filename); Always .bmp (((
Edited by dezhavi - 24 Jan 18 at 10:14AM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi dezhavi,
are you sure that the inserted image was tiff when it was inserted. The tiff-file seems to be inserted as bmp? Where can we download this pdf to check the file types of the inserted images? Your code is okay - there's no problem. Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
dezhavi ![]() Beginner ![]() ![]() Joined: 24 Jan 18 Location: Russian Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Thanks for response. I created pdf in Adobe Acrobat Pro - and added tiff images. May be Acrobat inserted tiff with other parameters, but i watched the settings images and looked what it not jpg compresion. After i saved pdf and parsed and was getting bmp file. http://design.gmprint.ru/x3.pdf - this is test pdf file which i parse. If open him we see image include transparancy. When i parse pdf i getted bmp and whithout transparancy. And i want tiff with transparancy. May be it's inpossible? |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi,
i've checked this pdf (PDF/X version 4)... It depends on how i'm developing... One time i've get an image extract with one png 618 x 362, 11 kb. Other code extracts one bmp 618 x 362, 657 kb. If i look into the pdf and check the embedded xmp-data then there are only three jpeg-infomations with each 256 x 240. TIF-files aren't inside - that's clear. Is it not long ago you're start using acrobat? |
|
Cheers,
Ingo |
|
![]() |
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