Merci encore pour votre aide,je partage le code après la conversion à partir du c# vers le vb.net pour ajouter du texte a n'importe quel pdf.
Dim oldFile As String = "oldfile.pdf"
Dim newFile As String = "newfile.pdf"
' open the reader
Dim reader As PdfReader = New PdfReader(oldFile)
Dim size As Rectangle = reader.GetPageSizeWithRotation(1)
Dim document As Document = New Document(size)
' open the writer
Dim fs As FileStream = New FileStream(newFile, FileMode.Create, FileAccess.Write)
Dim writer As PdfWriter = PdfWriter.GetInstance(document, fs)
document.Open()
' the pdf content
Dim cb As PdfContentByte = writer.DirectContent
' select the font properties
Dim bf As BaseFont = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED)
cb.SetColorFill(BaseColor.DARK_GRAY)
cb.SetFontAndSize(bf, 10)
' write the text in the pdf content
cb.BeginText()
Dim text As String = "Some blablablabla...."
' put the alignment and coordinates here
cb.ShowTextAligned(1, text, 520, 640, 0)
cb.EndText()
' create the new page and add it to the pdf
Dim page As PdfImportedPage = writer.GetImportedPage(reader, 1)
cb.AddTemplate(page, 0, 0)
' close the streams and voilá the file should be changed :)
document.Close()
fs.Close()
writer.Close()
reader.Close()