Page 1 of 1

Determine Format from Stream

Posted: Wed Feb 14, 2018 2:16 pm
by indxlogic
I have a viewer that will routinely open PDF or TIFF documents from a stream. Previously, I would use

var _fmt = GdPictureImaging.GetDocumentFormatFromStream(_stream) to determine the format.

I would then open the stream with the appropriate method either:

GdPicturePDF.LoadFromStream(_stream)

or

GdPictureImaging.CreateGdPictureImageFromStream(_stream,_fmt)

After upgrading to the latest version. I see that imaging object no longer has a method for GetDocumentFormatFromStream. I have two questions.

1. Where is the documentation that says this method was removed?
2. What is the appropriate method to open a stream of unknown format?

Thanks!

Re: Determine Format from Stream

Posted: Tue Mar 27, 2018 9:44 am
by Loïc
Hi,

This method was marked as deprecated since few time now and have been removed in recent update.
Please use the new static method: GdPictureDocumentUtilities.GetDocumentFormat()

Kind regards,

Loïc

Re: Determine Format from Stream

Posted: Tue Mar 27, 2018 9:44 am
by Loïc
Hi,

This method was marked as deprecated since few time now and have been removed in recent update.
Please use the new static method: GdPictureDocumentUtilities.GetDocumentFormat()

Kind regards,

Loïc