Last post Jul 20, 2016 10:49 AM by Philosophaie
Jul 19, 2016 10:33 PM|Philosophaie|LINK
I now am trying to use System.Drawing in iTextSharp PDF creator.
I have successfully downloaded iTextSharp.dll from SourceForge, placed it in a folder in my ASP.net project and "Add Reference" browse to my solution.
It works fine.
I am having some trouble turning my MemoryStream, ms, into an iTextSharp jpg image as seen below:
Dim doc As New Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35)
Dim output = New MemoryStream()
Dim writer = PdfWriter.GetInstance(doc, output)
Using xPanel As New Bitmap(500, 500)
Using gphs As Graphics = Graphics.FromImage(xPanel)
Dim ms As New MemoryStream()
Dim image As System.Drawing.Image = System.Drawing.Image.FromStream(ms)
Dim PdfImage As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(image, System.Drawing.Imaging.ImageFormat.Jpeg)
Jul 20, 2016 06:49 AM|Mikesdotnetting|LINK
I am having some trouble turning my MemoryStream, ms, into an iTextSharp jpg image
Jul 20, 2016 10:49 AM|Philosophaie|LINK
Nothing happens. The System.Drawing code that I entered was not executed. No error messages.