Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / PDF 3.3.244 : Poligons, Lines, Paths And Fills ...
Author Message
Iker Celorrio
Member
# Posted: 12 Apr 2007 10:45


Hi!

If you use the Lines to make it a path, and then fill it with the PDFPAGE_Fill() it do not Fill it.

With the example, works fine on version 2.x (changing the CreateObject Line) but in version 3.x do not fill the path.

On Verson 3.x the position of all the elements is not exactly the same as with the version 2.x, but it is the position is relatively approximated

Example Code right here: --- HelloPDF_v3.x_path_example.vbs ---
' create pdf library object
Set PDF = CreateObject("PDFCreatorPilot3.PDFDocument3")
' initialize PDF Engine
PDF.StartEngine "DEMO@DEMO.com", "DEMO"
' Set AutoLaunch property to TRUE to automatically launch PDF Reader
PDF.AutoLaunch = true
PDF.FileName = "HelloPDF_VBS.pdf"
' start document generation
PDF.BeginDoc
' draw "HELLO, PDF" message on the current PDF page
Call PDF.PDFPAGE_NewPath()
Call PDF.PDFPAGE_MoveTo(100, 100)
Call PDF.PDFPAGE_LineTo(100, 150)
Call PDF.PDFPAGE_LineTo(150, 150)
Call PDF.PDFPAGE_LineTo(150, 100)
Call PDF.PDFPAGE_LineTo(100, 100)
Call PDF.PDFPAGE_ClosePath()
Call PDF.PDFPAGE_SetRGBColorFill(1.0, 0.5, 0.0)
Call PDF.PDFPAGE_Fill()
' finalize document generation
PDF.EndDoc
' disconnect from library
Set PDF = Nothing

Stanislav
Member
# Posted: 12 Apr 2007 11:11


Dear Iker,

I'll forward this issue to developers. Sorry for any inconvenience.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Stanislav
Member
# Posted: 23 Apr 2007 12:47


Dear Iker,

Please call PDFPAGE_SetRGBColorFill before first PDFPAGE_MoveTo:

' create pdf library object
Set PDF = CreateObject("PDFCreatorPilot3.PDFDocument3")
' initialize PDF Engine
PDF.StartEngine "DEMO@DEMO.com", "DEMO"
' Set AutoLaunch property to TRUE to automatically launch PDF Reader
PDF.AutoLaunch = true
PDF.FileName = "HelloPDF_VBS.pdf"
' start document generation
PDF.BeginDoc
' draw "HELLO, PDF" message on the current PDF page

PDF.PDFPAGE_NewPath()
PDF.PDFPAGE_SetRGBColorFill 1.0, 0.5, 0.0
PDF.PDFPAGE_MoveTo 100, 100
PDF.PDFPAGE_LineTo 100, 150
PDF.PDFPAGE_LineTo 150, 150
PDF.PDFPAGE_LineTo 150, 100
PDF.PDFPAGE_LineTo 100, 100

PDF.PDFPAGE_ClosePath()

PDF.PDFPAGE_Fill()
' finalize document generation
PDF.EndDoc
' disconnect from library
Set PDF = Nothing

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Iker Celorrio
Member
# Posted: 24 Apr 2007 01:36


Thanks, it works.

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.015

 

Page top