Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MyByteReader to Stream Reader

6 REPLIES 6
Reply
Message 1 of 7
swimming123
966 Views, 6 Replies

MyByteReader to Stream Reader

Can I get the data from MgByteReader, and turn to Stream Reader; so I can make a pdf map using iTextSharp?

6 REPLIES 6
Message 2 of 7
jackie.ng
in reply to: swimming123

You can try this class I wrote, that provides a System.IO.Stream adapter over the MgByteReader:

 

http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Desktop/MapViewer/MgReadOnlyStream.cs

 

- Jackie

Message 3 of 7
swimming123
in reply to: jackie.ng

Thank you Jackie,

 

when I add your class to my project, I found I cannot reference the namespace OSGeo.MapGuide.Viewer; And Line 216 "Strings" not exist in the context. I am pretty new, can you help me more? Thanks again.

Message 4 of 7
swimming123
in reply to: swimming123

Did I need other assembly class files?

Message 5 of 7
jackie.ng
in reply to: swimming123

That file can't just be dropped in, so change/rename the namespace

 

Strings.ErrorStreamNotRewindable is just a localizable message, just replace it with something equivalent

 

- Jackie

Message 6 of 7
swimming123
in reply to: swimming123

I create a new class file and paste your code there, but still I cannot new a MgReadOnlyStream. I cannot find the problem is.

Message 7 of 7
swimming123
in reply to: jackie.ng

Finally I get the MgReadOnlyStream. Thank you Jackie.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report