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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Only Black Colors work
Author Message
kai.wachter@camelot- idpro.de
# Posted: 10 Mar 2005 17:51


I can only produce Text and Rectangle in Black. I have the followingf coding:
pPdfSession = CreateObject("PDFCreatorPilot2.piPDFDocument")
' initialize PDF Engine
pPdfSession.StartEngine("demo@demo", "demo")
' set filename
pPdfSession.FileName = "c:\PDF\PDFSESSION.pdf"
pPdfSession.AutoLaunch = False ' auto-open generated pdf document
' start document generation
pPdfSession.BeginDoc()
pPdfSession.PDFPAGE_SetLineWidth(0.5)
pPdfSession.PDFPAGE_BeginText()
pPdfSession.PDFPAGE_SetTextRenderingMode(PDFCreatorPilot2.TxTextRender ingMode.trmFillText)
pPdfSession.PDFPAGE_SetRGBColorStroke(0,0, 0)
pPdfSession.PDFPAGE_SetRGBColor(0,0, 0)
pPdfSession.PDFPAGE_SetRGBColorFill(0,0, 0) pPdfSession.PDFPAGE_SetActiveFont(iFont, iBold, iCursive, iUnderline, iStrikeout, iSize, 0)
pPdfSession.PDFPAGE_TextOut(ix, iy, 0, iTExt)
pPdfSession.PDFPAGE_EndText()
pPdfSession.PDFPAGE_Stroke()

This works fine the text is written in the PDF

When i now start to change the colors:
pPdfSession = CreateObject("PDFCreatorPilot2.piPDFDocument")
' initialize PDF Engine
pPdfSession.StartEngine("demo@demo", "demo")
' set filename
pPdfSession.FileName = "c:\PDF\PDFSESSION.pdf"
pPdfSession.AutoLaunch = False ' auto-open generated pdf document
' start document generation
pPdfSession.BeginDoc()
pPdfSession.PDFPAGE_SetLineWidth(0.5)
pPdfSession.PDFPAGE_BeginText()
pPdfSession.PDFPAGE_SetTextRenderingMode(PDFCreatorPilot2.TxTextRender ingMode.trmFillText)
pPdfSession.PDFPAGE_SetRGBColorStroke(255,0, 0)
pPdfSession.PDFPAGE_SetRGBColor(255,0, 0)
pPdfSession.PDFPAGE_SetRGBColorFill(255,0, 0) pPdfSession.PDFPAGE_SetActiveFont(iFont, iBold, iCursive, iUnderline, iStrikeout, iSize, 0)
pPdfSession.PDFPAGE_TextOut(ix, iy, 0, iTExt)
pPdfSession.PDFPAGE_EndText()
pPdfSession.PDFPAGE_Stroke()

No text appears.

May someoine can give me a hint. May this is a problem related to the demoversion?

best regards.

Kai

Stanislav
# Posted: 13 Mar 2005 13:42


Hello Kai,

Our developers will be informed about this problem.

Thank you very much !

Best regards,
Stanislav

Stanislav
# Posted: 14 Mar 2005 19:48


Hello Kai,

All arguments in this method will take values in the range [0 .. 1].

So, you should use pPdfSession.PDFPAGE_SetRGBColor(1,0, 0) instead.

Thank you very much !

Best regards,
Stanislav

Anonymous
# Posted: 9 Apr 2005 00:27


How do you specify different shades of red, green, and blue such as cyan and turquoise colors.

Stanislav
# Posted: 9 Apr 2005 10:48


Hi,

Cyan is 0, 0.576, 0.87
You can convert values from standard 0..255 to 0..1 by dividing value to 255.

Best regards,
Stanislav

 

 

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

 

Page top