Forum  General Visual ...  How do I...?  Print User-Generated Image
Previous Previous
 
Next Next
New Post 3/5/2010 11:16 AM
  LotD2242
25 posts
No Ranking


Print User-Generated Image 

Hello all,

A big part of our app is a psuedo-CAD interface that allows users to generate polygonal shapes.  We essentially draw them via graphics class on a bmp, and then pass that through the DynamicStreamResourceHandle class that was posted in the forums (thank you!) to get it into a picturebox.   We'd like the user to have the option to print those images on a form with some other information.  I know you can create a print form using an HTML box, but that HTML code would require an image file somewhere on the server to source, which doesn't exist in this case.

Normally we would use the web version of the Stimulsoft Report Viewer since we use that for our desktop apps and it would allow us to just pass the image over as a byte array, but I cannot for the life of me get that wrapped and working with VWG.   So, is there a way to pass the image off directly to the HTML form/box? Preferrably without saving it to the server as an actual file somewhere.  Or if someone has managed to get Stimulsoft working with VWG, can you walk me through it?

Thanks,
Chris

 
New Post 3/13/2010 6:37 AM
  palli
11189 posts
1st Level Poster




Re: Print User-Generated Image 

Hi Chris,

I am not familiar with Stimulsoft (yet), but from your description I don't see any problems with using an HtmlBox in your solution. As you were able to the the image shown in a PictureBox, you can as well have it shown in a HtmlBox.

Using PictureBox versus HtmlBox to display an image is almost identical, once you have got the GatewayReference:

 

reference = New GatewayReference(Me, "submitimage")
PictureBox1.Image = New Gizmox.WebGUI.Common.Resources.GatewayResourceHandle(reference)
HtmlBox1.Url = New Gizmox.WebGUI.Common.Resources.GatewayResourceHandle(reference).ToString()

And to continue, I already uploaded a Wiki sample showing how to print the contents of a specific HtmlBox only and you can find that sample code here.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 3/18/2010 9:36 PM
  LotD2242
25 posts
No Ranking


Re: Print User-Generated Image 

That was exactly what I was looking for.  I'd still be interested in getting Stimulsoft to work since there are a number of features that would be useful to have, but this does the job I was looking to do at the moment.

Thanks Palli!

 
New Post 3/19/2010 11:27 AM
  palli
11189 posts
1st Level Poster




Re: Print User-Generated Image 

Hi Chris,

You are welcom and glad to be able to help. Thanks for confirming.

If Stimulsoft can produce the graphics, you should be able to use it. See for instance the idea behind the Gauges sample which creates the graphics serverside and presents it to the user in a picturebox via a gateway.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 3/19/2010 5:25 PM
  LotD2242
25 posts
No Ranking


Re: Print User-Generated Image 

Stimulsoft is a reporting/printing tool actually, not for creating graphics.  We've been using it for a number of years quite reliably. 

http://www.stimulsoft.com/ if you are curious.

Using the control without wrapping it results it looking for a file in what looks like a temp directory that doesn't exist, and I was unable to wrap it because it did not allow me to put the actual viewing control in the toolbox.  I know there's a part of the wrapping procedure where you have to drag the control from the toolbox onto something else and since I couldn't get it in the toolbox that was not possible.

 

 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Print User-Generated Image
Azure banner
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS