Loading...

Create PDF from stream of a Tiff image and convert to stream

Support for GdPicturePDF Plugin.

Create PDF from stream of a Tiff image and convert to stream

Postby wemerson20 » Tue Nov 29, 2011 6:59 pm

Hi guys.
I'm having a problem with GdPictureImaging, trying to create a PDF from a tiff image Stream. I am using a function in C#

int ImageID = oGdPictureImaging.CreateGdPictureImageFromStream(stream);

I need the ImageID to create a PDF using the function

oGdPictureImaging.PdfCreateFromMultipageTIFF(ImageID, caminhoResultadoConversao, true, "", "", "", "", "");

and received de message when I try to generate the ImageID "Specified method is not supported"

Can anyone help me?

Thanks
wemerson20
 
Posts: 4
Joined: Tue Nov 29, 2011 5:46 pm

Re: Create PDF from stream of a Tiff image and convert to st

Postby Loïc » Wed Nov 30, 2011 1:15 pm

Hi,

Your document is probably not a multipage tiff.
You can try that as a workaround:


Code: Select all
            GdPictureStatus status;
            GdPictureImaging oGdPictureImaging = new GdPictureImaging();
            int ImageID = oGdPictureImaging.CreateGdPictureImageFromStream(new FileStream(@"D:\TIFF\test.tif", FileMode.Open));
            if(oGdPictureImaging.TiffIsMultiPage(ImageID))
               status = oGdPictureImaging.PdfCreateFromMultipageTIFF(ImageID, "C:\\output.pdf", false, "", "", "", "", "");
            else
               status = oGdPictureImaging.SaveAsPDF(ImageID, "C:\\output.pdf", false, "", "", "", "", "");
            oGdPictureImaging.ReleaseGdPictureImage(ImageID);


Hope this helps !

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Create PDF from stream of a Tiff image and convert to st

Postby wemerson20 » Wed Nov 30, 2011 3:01 pm

Hi Loïc.

My service was returning wrong parameter and causing the error, but now is running.

int ImageID = oGdPictureImaging.CreateGdPictureImageFromStream(stream); //the parameter was not a stream

Thanks for help.
wemerson20
 
Posts: 4
Joined: Tue Nov 29, 2011 5:46 pm


Return to GdPicture PDF Plugin

Who is online

Users browsing this forum: No registered users and 1 guest