Note that there are some explanatory texts on larger screens.

plurals
  1. POSave Controls.Image to PDF with more than 1 Control.Image
    text
    copied!<p>I'm here for a solution to a little unresolved problem. Maybe I haven't searched for the right things as I haven't found a solution and I hope you will be able to help.</p> <p>So I have a WPF application where I load an image, here I have no problems. Next I have to add some points by clicking, so i have this function:</p> <pre><code> private void ClickMouse(object sender, MouseButtonEventArgs e) { Point p = e.GetPosition(this); schema.PointFromScreen(p); var myImage3 = new Image(); var bi3 = new BitmapImage(); bi3.BeginInit(); bi3.UriSource = new Uri(_clickImagePath, UriKind.Relative); bi3.EndInit(); myImage3.Stretch = Stretch.Fill; myImage3.Source = bi3; myImage3.MinWidth = 30; myImage3.MinHeight = 30; myImage3.Width = 30; myImage3.Height = 30; myImage3.Name = _pointName; var oMargin = new Thickness(p.X, p.Y, 0, 0); myImage3.Margin = oMargin; mainCanva.Children.Add(myImage3); _listImg.Add(myImage3); PointList.Items.Add(_pointName); } </code></pre> <p>The problem is not here but I need a context.</p> <p>Now on to the main problem. I have to save the final Image to make a PDF with. I use a piece of sample code I found here (http://stackoverflow.com/questions/1824989/how-to-store-system-windows-controls-image-to-local-disk) to convert to a jpg file using ITextsharp. The only thing I have on the PDF is the first picture, so I admitted that it probably take only the first image and not the other created images on it but I really don't know how to fix it. Does some fonction exist to make a kind of screenshot of the image zone? or maybe to pay attention to all image in the zone of the principal Control.Image ?</p> <p>Thank you for your help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload