This code used to work but doesnt any more. i used a breakpoint, and after this line: Dim jpeg As Image = Image.GetInstance("test.jpg")
it just does not execute anymore code.
Imports System
Imports System.IO
Imports iTextSharp.text
Imports iTextSharp.text.pdf
Public Class Form1
Public Sub New1()
Directory.SetCurrentDirectory("C:\Users\alex\Desktop\") '"
Console.WriteLine("Chapter 6 example 1: Adding a Wmf, Gif, Jpeg and Png-file using urls")
Dim document As Document = New Document
Try
PdfWriter.GetInstance(document, New FileStream("Chap060112.pdf", FileMode.Create))
document.Open()
Dim jpeg As Image = Image.GetInstance("test.jpg")
document.Add(jpeg)
Catch de As DocumentException
Console.Error.WriteLine(de.Message)
Catch ioe As IOException
Console.Error.WriteLine(ioe.Message)
End Try
document.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
New1()
End
End Sub
End Class