Could not load Text Box, Stamp,... to GDPicturePDF

Discussions about PDF management.
Post Reply
dat024024
Posts: 4
Joined: Fri Jan 25, 2013 3:54 am

Could not load Text Box, Stamp,... to GDPicturePDF

Post by dat024024 » Fri Feb 12, 2016 5:17 am

Hi,

I had a pdf file that has some annotations: Text Box, Stamp,... They were inserted manually by user.
Now I imported that pdf file to my application by using GDPicturePDF but the image load from GDPicturePDF does not load any annotations (Text Box, Stamps,..).

I am using GDPicture 9 and here is my soucre code.
Is there any setting to load those objects?

Code: Select all

                   GdPicturePDF oGdPicturePDF = new GdPicturePDF();
                            oGdPicturePDF.LoadFromFile(filePath, true);
                            int pageCount = oGdPicturePDF.GetPageCount();
                            int renderDPI = Constant.PDF_RENDER_DPI;
                            //convert to TIFF file
                            for (int i = 1; i <= pageCount; i++)
                            {
                                oGdPicturePDF.SelectPage(i);
                                int pageImgID = oGdPicturePDF.RenderPageToGdPictureImage(renderDPI, false);
                               
                                if (i == 1)
                                {
                                    ImageID = oGdPictureImaging.TiffCreateMultiPageFromGdPictureImage(pageImgID);
                                }
                                else
                                {
                                    oGdPictureImaging.TiffAppendPageFromGdPictureImage(ImageID, pageImgID);
                                }
                                var str = oGdPicturePDF.AddImageFromGdPictureImage(ImageID, false, true);
                                oGdPictureImaging.ReleaseGdPictureImage(pageImgID);
                            }
                            oGdPicturePDF.CloseDocument();
Please kindly support me!

Thanks!

delbeke
Posts: 89
Joined: Wed Oct 31, 2012 5:07 pm

Re: Could not load Text Box, Stamp,... to GDPicturePDF

Post by delbeke » Fri Feb 12, 2016 10:54 am

Hi Dat

GdPicture version 9 is rather an old one. We ae about to release the version 12.

Anyway, you can use

int pageImgID = oGdPicturePDF.RenderPageToGdPictureImage(renderDPI, true);

(last parameter set to true)

Jean-Luc

dat024024
Posts: 4
Joined: Fri Jan 25, 2013 3:54 am

Re: Could not load Text Box, Stamp,... to GDPicturePDF

Post by dat024024 » Sat Feb 13, 2016 6:50 am

Thank you so much! It worked perfect.

About GDP ver 12 we will consider soon.

Dat

delbeke
Posts: 89
Joined: Wed Oct 31, 2012 5:07 pm

Re: Could not load Text Box, Stamp,... to GDPicturePDF

Post by delbeke » Sat Feb 13, 2016 12:41 pm

Hi Dat

Thank you for the return.

Jean-Luc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests