Hallo ik werk in vb.net met pdfsharp en wil een nieuwe pagina openen en daar verder op werken maar hij gaat door op de vorige pagina en niet op de nieuwe Wat doe ik fout wat doe ik fout ????
Dim pdf As PdfDocument = New PdfDocument Dim pdfPage As PdfPage = pdf.AddPage Dim graph As XGraphics = XGraphics.FromPdfPage(pdfPage) Dim font As XFont = New XFont("courier new", 11, XFontStyle.Regular) pdf.Info.Title = "My First PDF" '#################### afbeelding plaatsen strBestand = LocatieFotos & "\brief_96dpi.jpg" graph.DrawImage(System.Drawing.Bitmap.FromFile(strBestand), 10, 10, 575, 110)
strBestand = (LocatieFotos & "\knab_bank_rode_balk_facturen_96dpi.jpg") graph.DrawImage(System.Drawing.Bitmap.FromFile(strBestand), 10, 785, 575, 20) ''links 10 , hoogte
''################## tekst plaatsen graph.DrawString("1", font, XBrushes.Black, _ New XRect(400, 120, pdfPage.Width, pdfPage.Height), XStringFormats.TopLeft)
graph.DrawString("2", font, XBrushes.Black, _ New XRect(400, 135, pdfPage.Width, pdfPage.Height), XStringFormats.TopLeft)
graph.DrawString("3", font, XBrushes.Black, _ New XRect(400, 150, pdfPage.Width, pdfPage.Height), XStringFormats.TopLeft)
graph.DrawString("4", font, XBrushes.Black, _ New XRect(400, 165, pdfPage.Width, pdfPage.Height), XStringFormats.TopLeft)
'' ################# nieuwe pagina openen ########################### pdf.AddPage()
graph.DrawString("tweede blad", font, XBrushes.Black, _ New XRect(150, 300, pdfPage.Width, pdfPage.Height), XStringFormats.TopLeft)
Dim pdfFilename As String = "C:\Users\kees\Dropbox\Fotos_Program_Woodart\Nieuwe PDF\De eerste PDF.pdf" pdf.Save(pdfFilename) pdf.Close() Process.Start(pdfFilename)
|