' create PDFDoc object
Set PDFDoc = CreateObject("PDFDocScout.PDFDocument")
' initialize library
PDFDoc.InitLibrary "demo", "demo"
' set output filename for PDF document
PDFDoc.OutputFileName = "pdfdocscout_example_line_styles.pdf"
' automatically open generated PDF document in default PDF viewer application
PDFDoc.AutoOpenGeneratedPDF = true
' starts PDF document generation
PDFDoc.BeginDocument
' draw default line style
PDFDoc.Page.MoveTo 100, 100
PDFDoc.Page.LineTo 200, 100
PDFDoc.Page.Stroke
' set line style for dravning
PDFDoc.Page.SetDash "[2 2] 0"
' move to start point
PDFDoc.Page.MoveTo 100, 150
' draw line
PDFDoc.Page.LineTo 200, 150
' show line
PDFDoc.Page.Stroke
' set another style
PDFDoc.Page.SetDash "[13 3 2 3 2 3] 0"
PDFDoc.Page.MoveTo 100, 200
PDFDoc.Page.LineTo 200, 200
' to make drawn objects visible you should call .Stroke method
PDFDoc.Page.Stroke
' close pdf document generation
PDFDoc.EndDocument
' disconnect from library
Set PDFDoc = Nothing