How to convert Tiff to PDF from Stream to Stream?

Discussions about PDF management.
Post Reply
styxol
Posts: 3
Joined: Fri Oct 30, 2009 9:06 pm

How to convert Tiff to PDF from Stream to Stream?

Post by styxol » Mon Dec 14, 2009 11:50 pm

Hi,

I need to convert TIFF to PDF. The source is Stream and PDF should be saved to Stream.
I am using code below. When I finally save the PDF the file size is 0. When I am using CreateGdPictureImageFromFile and SaveAsPDF everithing works fine.
What is wrong?
Stream tiffIn = ...
Stream pdfOut= new MemoryStream();
...
srcImageID = oGdPictureImaging.CreateGdPictureImageFromStream(tiffIn);
...
conversionStatus = oGdPictureImaging.SaveAsPDFStream(srcImageID, ref pdfOut, false, "", "The Company", "", "", "Document Converter");
...

Oleg

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: How to convert Tiff to PDF from Stream to Stream?

Post by Loïc » Tue Dec 15, 2009 12:26 am

Hi Oleg,

Please, could you give us full code snippet ?

I need to know what there is in "..." :mrgreen:

Kind regards,

Loïc

styxol
Posts: 3
Joined: Fri Oct 30, 2009 9:06 pm

Re: How to convert Tiff to PDF from Stream to Stream?

Post by styxol » Tue Dec 15, 2009 3:52 pm

Sorry. I found solution myself. I forgot to call pdfOut.Close(); before dispose the stream. Without that stream does not flush a data.

Oleg

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests