Posted 7 August 2017, 4:59 pm EST
Hi C1!
I try to draw an image of the current canvas. I set the Width and Height of the canvas to fit the C1PDF.PageSize (currently it gives me 612 x 792). Then I make a WriteableBitmap and write it into the C1PDF (For testing purpose I do not count margin). I finally call DrawImage function to write the image. I do not want to stretch because the layout is ugly, so I set Stretch = None. However, the PaperSize does not seems to be in pixel, so the final PDF have a smaller image inside. Is there a way to convert the PaperSize in Pixel?
What I want to do is draw in the PDF the image of the canvas but keep the original size, with no stretching.
PDF.DrawImage(MyImage, PDF.PageRectangle, C1.Silverlight.Pdf.ContentAlignment.MiddleCenter, Stretch.None)
The size of MyImage is 612x792 in Pixel, but in the PDF document 612x792 are not pixels, so the image is smaller.
I attached the PDF file I have generated. You will see that 612x792 pixels for the image makes the image smaller than the page.
2011/07/Test.pdf