Home Download Samples Tutorials Pricing FAQ History
Draw shapes and figures
' Create HTML2PDF instance: Set html2pdf_obj = CreateObject("html2pdfx.HTML2PDFX") ' Initiate engine: html2pdf_obj.StartHTMLEngine "demo", "demo" ' Set PDF filename: html2pdf_obj.OutputFileName = "Shapes_sample.pdf" ' Set page margins: html2pdf_obj.MarginLeft = 20 html2pdf_obj.MarginRight = 20 html2pdf_obj.MarginTop = 0 html2pdf_obj.MarginBottom = 0 html2pdf_obj.DocumentTitle = "Example shapes drawings" html2pdf_obj.BeginDoc html2pdf_obj.FontFamily = "Elephant" html2pdf_obj.FontPointSize = 18 html2pdf_obj.DrawText 100, 80, 700, 50, "aligncenter", "Drawing of Simple Shapes", 1, 1, 0 html2pdf_obj.PenWidth = 3 html2pdf_obj.PenColor = "blue" html2pdf_obj.DrawArc 100, 200, 200, 300, 45, 180 html2pdf_obj.PenWidth = 3 html2pdf_obj.PenColor = "blue" html2pdf_obj.FillingColor = "green" html2pdf_obj.DrawChord 300, 200, 200, 300, 45, 180 html2pdf_obj.PenWidth = 2 html2pdf_obj.PenColor = "black" html2pdf_obj.PenStyle = "DashLine" html2pdf_obj.FillingColor = "yellow" html2pdf_obj.DrawEllipse 500, 200, 200, 200, 0 html2pdf_obj.PenColor = "grey" html2pdf_obj.PenStyle = "DashDotLine" html2pdf_obj.FillingColor = "cyan" html2pdf_obj.DrawEllipse 850, 200, 100, 200, 45 html2pdf_obj.PenColor = "grey" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "brown" html2pdf_obj.DrawPie 50, 600, 200, 200, 0, 90 html2pdf_obj.PenColor = "black" html2pdf_obj.PenStyle = "DashDotDotLine" html2pdf_obj.FillingColor = "green" html2pdf_obj.DrawPie 500, 600, 150, 250, 30, 270 html2pdf_obj.PenColor = "black" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "blue" html2pdf_obj.DrawPie 300, 600, 150, 250, 270, 300 html2pdf_obj.PenColor = "black" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "Transparent" html2pdf_obj.DrawRect 550, 600, 250, 150, 0 html2pdf_obj.PenColor = "blue" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "aqua" html2pdf_obj.DrawRect 100, 1000, 150, 250, 0 html2pdf_obj.PenColor = "blue" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "#FFF0FE" html2pdf_obj.DrawRoundedRect 300, 1000, 150, 250, 10, 10, 0 html2pdf_obj.PenColor = "blue" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "#00FF00" html2pdf_obj.DrawRoundedRect 500, 1000, 150, 250, 60, 30, 0 html2pdf_obj.PenColor = "blue" html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.FillingColor = "brown" html2pdf_obj.DrawRoundedRect 700, 1000, 150, 250, 100, 100, 0 html2pdf_obj.NewPage html2pdf_obj.PenColor = "black" html2pdf_obj.DrawText 100, 80, 700, 50, "aligncenter", "Drawing of Lines", 1, 1, 0 html2pdf_obj.PenStyle = "SolidLine" html2pdf_obj.PenWidth = 0 html2pdf_obj.DrawLine 100, 200, 850, 200 html2pdf_obj.PenWidth = 1 html2pdf_obj.DrawLine 100, 220, 850, 220 html2pdf_obj.PenWidth = 2 html2pdf_obj.DrawLine 100, 240, 850, 240 html2pdf_obj.PenWidth = 3 html2pdf_obj.DrawLine 100, 260, 850, 260 html2pdf_obj.PenWidth = 4 html2pdf_obj.DrawLine 100, 280, 850, 280 html2pdf_obj.PenWidth = 5 html2pdf_obj.DrawLine 100, 300, 850, 300 html2pdf_obj.PenWidth = 6 html2pdf_obj.DrawLine 100, 320, 850, 320 html2pdf_obj.PenWidth = 7 html2pdf_obj.DrawLine 100, 340, 850, 340 html2pdf_obj.PenWidth = 8 html2pdf_obj.DrawLine 100, 360, 850, 360 html2pdf_obj.PenWidth = 9 html2pdf_obj.DrawLine 100, 380, 850, 380 html2pdf_obj.PenStyle = "DashLine" html2pdf_obj.PenWidth = 0 html2pdf_obj.DrawLine 100, 420, 850, 420 html2pdf_obj.PenWidth = 1 html2pdf_obj.DrawLine 100, 440, 850, 440 html2pdf_obj.PenWidth = 2 html2pdf_obj.DrawLine 100, 460, 850, 460 html2pdf_obj.PenWidth = 3 html2pdf_obj.DrawLine 100, 480, 850, 480 html2pdf_obj.PenWidth = 4 html2pdf_obj.DrawLine 100, 500, 850, 500 html2pdf_obj.PenWidth = 5 html2pdf_obj.DrawLine 100, 520, 850, 520 html2pdf_obj.PenWidth = 6 html2pdf_obj.DrawLine 100, 540, 850, 540 html2pdf_obj.PenWidth = 7 html2pdf_obj.DrawLine 100, 560, 850, 560 html2pdf_obj.PenWidth = 8 html2pdf_obj.DrawLine 100, 580, 850, 580 html2pdf_obj.PenWidth = 9 html2pdf_obj.DrawLine 100, 600, 850, 600 html2pdf_obj.PenStyle = "DashLine" html2pdf_obj.PenCapStyle = "RoundCap" html2pdf_obj.PenWidth = 0 html2pdf_obj.DrawLine 100, 640, 850, 640 html2pdf_obj.PenWidth = 1 html2pdf_obj.DrawLine 100, 660, 850, 660 html2pdf_obj.PenWidth = 2 html2pdf_obj.DrawLine 100, 680, 850, 680 html2pdf_obj.PenWidth = 3 html2pdf_obj.DrawLine 100, 700, 850, 700 html2pdf_obj.PenWidth = 4 html2pdf_obj.DrawLine 100, 720, 850, 720 html2pdf_obj.PenWidth = 5 html2pdf_obj.DrawLine 100, 740, 850, 740 html2pdf_obj.PenWidth = 6 html2pdf_obj.DrawLine 100, 760, 850, 760 html2pdf_obj.PenWidth = 7 html2pdf_obj.DrawLine 100, 780, 850, 780 html2pdf_obj.PenWidth = 8 html2pdf_obj.DrawLine 100, 800, 850, 800 html2pdf_obj.PenWidth = 9 html2pdf_obj.DrawLine 100, 820, 850, 820 html2pdf_obj.PenStyle = "DotLine" html2pdf_obj.PenCapStyle = "RoundCap" html2pdf_obj.PenWidth = 0 html2pdf_obj.DrawLine 100, 860, 850, 860 html2pdf_obj.PenWidth = 1 html2pdf_obj.DrawLine 100, 880, 850, 880 html2pdf_obj.PenWidth = 2 html2pdf_obj.DrawLine 100, 900, 850, 900 html2pdf_obj.PenWidth = 3 html2pdf_obj.DrawLine 100, 920, 850, 920 html2pdf_obj.PenWidth = 4 html2pdf_obj.DrawLine 100, 940, 850, 940 html2pdf_obj.PenWidth = 5 html2pdf_obj.DrawLine 100, 960, 850, 960 html2pdf_obj.PenWidth = 6 html2pdf_obj.DrawLine 100, 980, 850, 980 html2pdf_obj.PenWidth = 7 html2pdf_obj.DrawLine 100, 1000, 850, 1000 html2pdf_obj.PenWidth = 8 html2pdf_obj.DrawLine 100, 1020, 850, 1020 html2pdf_obj.PenWidth = 9 html2pdf_obj.DrawLine 100, 1040, 850, 1040 html2pdf_obj.PenStyle = "DashDotDotLine" html2pdf_obj.PenCapStyle = "RoundCap" html2pdf_obj.PenWidth = 0 html2pdf_obj.DrawLine 100, 1060, 850, 1060 html2pdf_obj.PenWidth = 1 html2pdf_obj.DrawLine 100, 1080, 850, 1080 html2pdf_obj.PenWidth = 2 html2pdf_obj.DrawLine 100, 1100, 850, 1100 html2pdf_obj.PenWidth = 3 html2pdf_obj.DrawLine 100, 1120, 850, 1120 html2pdf_obj.PenWidth = 4 html2pdf_obj.DrawLine 100, 1140, 850, 1140 html2pdf_obj.PenWidth = 5 html2pdf_obj.DrawLine 100, 1160, 850, 1160 html2pdf_obj.PenWidth = 6 html2pdf_obj.DrawLine 100, 1180, 850, 1180 html2pdf_obj.PenWidth = 7 html2pdf_obj.DrawLine 100, 1200, 850, 1200 html2pdf_obj.PenWidth = 8 html2pdf_obj.DrawLine 100, 1220, 850, 1220 html2pdf_obj.PenWidth = 9 html2pdf_obj.DrawLine 100, 1240, 850, 1240 html2pdf_obj.EndDoc Set html2pdf_obj = nothing CreateObject("WScript.Shell").Run "Shapes_sample.pdf"
– HTML2PDF-X Pilot sample page –