Libreria Pdf Ejemplo Vb6 Wxpdfcom

703 palabras 3 páginas
Dim pdf As PdfComLib.PdfDoc

Private Sub CmdArrow_Click() Set pdf = New PdfDoc pdf.SetFont "Arial", "", 10 pdf.AddPage (PORTRAIT) pdf.Arrow 10, 10, 50, 50, 3, 10, 3 pdf.Arrow 120, 120, 50, 50, 3, 10, 3 pdf.Arrow 40, 18, 55, 50, 1, 5, 3 pdf.Arrow 300, 120, 50, 60, 2, 3, 2 NombreDocumento = App.Path + "\arrows.pdf" pdf.SaveAsFile (NombreDocumento) Set pdf = Nothing
End Sub

Private Sub HolaMundo_Click() Set pdf = New PdfDoc pdf.AddPage (1) pdf.SetFont "Arial", "", 10 pdf.Cell 20, 10, "Hello World !", 0, 0, 1, 0, ""

pdf.SaveAsFile (App.Path + "\helloworld.pdf") Set pdf = Nothing
End Sub

Private Sub CmdBookmark_Click() Set pdf = New PdfDoc
…ver más…

l", "", 10 For NumPag = 1 To 5 pdf.AddPage (1) pdf.Cell 15, 10, "Body page " & Str(NumPag), 0, 0, 1, 0, "" Next

pdf.SaveAsFile (NombreDocumento) Set pdf = Nothing

End Sub

Private Sub CmdSector_Click() Dim x As Single Dim Radio As Single Radio = 5 Dim Alfa As Integer Set pdf = New PdfDoc pdf.AddPage (1) NombreDocumento = App.Path + "\alfasector.pdf" 'Alfa = pdf.SetAlpha(0.1, 0.1, 2) 'pdf.SetAlphaState Alfa For x = Radio To pdf.GetPageWidth + Radio Step Radio * 2 pdf.SetFillColor Rnd(255) * 255, Rnd(255) * 255, Rnd(255) * 255 pdf.Sector x, 0, Radio, 0, 180, PDF_STYLE_FILLDRAW, False, 180 pdf.Sector x, pdf.GetPageHeight + 1, Radio, 0, 180, PDF_STYLE_FILLDRAW, True, 180 Next For x = Radio To pdf.GetPageHeight + Radio Step Radio * 2 pdf.SetFillColor Rnd(255) * 255, Rnd(255) * 255, Rnd(255) * 255 pdf.Sector 0, x, Radio, 0, 180, PDF_STYLE_FILLDRAW, True, 90 pdf.Sector pdf.GetPageWidth, x, Radio, 0, 180, PDF_STYLE_FILLDRAW, False, 90 Next pdf.SaveAsFile (NombreDocumento) Set pdf = Nothing
End Sub

Private Sub cmdcirculos_Click() Dim x As Single Dim xcentro As Single, ycentro As Single Dim Radio As Single Dim Salto As Single Dim Alfa As Integer Set pdf = New PdfDoc pdf.AddPage (1) xcentro = pdf.GetPageWidth / 2 ycentro = pdf.GetPageHeight / 2 Radio = ycentro

Documentos relacionados