Print Page | Close Window

Save tiff with transparency on disk

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3542
Printed Date: 18 Apr 24 at 7:26PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Save tiff with transparency on disk
Posted By: dezhavi
Subject: Save tiff with transparency on disk
Date 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 (((



Replies:
Posted By: Ingo
Date Posted: 24 Jan 18 at 10:08PM
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



Posted By: dezhavi
Date Posted: 25 Jan 18 at 2:43PM
Originally posted by Ingo Ingo wrote:

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

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?


Posted By: Ingo
Date Posted: 25 Jan 18 at 9:27PM
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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk