Estoy intentando utilizar esta clase pero al indicar una fuente de un color determinado con algunos colores me los cambia.
Pongo un ejemplo
- Code: Select all Expand view RUN
#define HPDF_COMP_ALL 0x0F
// HPDF_TextAlignment
#define HPDF_TALIGN_LEFT 0
#define HPDF_TALIGN_RIGHT 1
#define HPDF_TALIGN_CENTER 2
#define HPDF_TALIGN_JUSTIFY 3
#DEFINE AZUL CLR_BLUE //16711680
#DEFINE ROJO CLR_RED //255
#DEFINE VERDE CLR_GREEN //65280
STATIC FUNCTION TestHaru()
Local oPrint, oFont
oPrint := THaruPdf():New(".\pdf\testharu.pdf", NIL, NIL, NIL, .T., NIL)
oPrint:SetCompression( HPDF_COMP_ALL )
oFont := oPrint:DefineFont( 'Arial', 10 )
oPrint:StartPage()
WITH OBJECT oPrint
//METHOD CmRect( nTop, nLeft, nBottom, nRight, oPen, nColor )
:CmSay( 04.02, 10.2, "AZUL", oFont, 5.0,AZUL ,, HPDF_TALIGN_LEFT )
:CmSay( 04.02, 12.2, "HBLUE", oFont, 5.0,CLR_HBLUE,, HPDF_TALIGN_LEFT )
:CmSay( 04.52, 10.2, "VERDE", oFont, 5.0,VERDE ,, HPDF_TALIGN_LEFT )
:CmSay( 05.02, 10.2, "ROJO", oFont, 5.0,ROJO ,, HPDF_TALIGN_LEFT )
:CmSay( 05.52, 10.2, "GRAY", oFont, 5.0,CLR_GRAY,, HPDF_TALIGN_LEFT )
:CmSay( 05.52, 10.2, "GRAY", oFont, 5.0,CLR_GRAY,, HPDF_TALIGN_LEFT )
:CmSay( 06.02, 10.2, "YELLOW", oFont, 5.0,CLR_YELLOW,, HPDF_TALIGN_LEFT )
:CmRect( 08.0, 10.0, 09, 16, 1, CLR_HBLUE)
:CmSay( 08.2, 10.2, "HBLUE 8,10, 09,16", oFont, 5.0,CLR_HBLUE,, HPDF_TALIGN_LEFT )
:CmRect( 10.0, 10.0, 11, 16, 2, CLR_HRED)
:CmSay( 10.2, 10.2, "HRED 10,10, 11,16", oFont, 5.0,CLR_RED, HPDF_TALIGN_LEFT )
//RoundBox( nTop, nLeft, nBottom, nRight, nWidth, nHeight, oPen, nColor, nBackColor )
:CMRoundBox( 14, 10, 15, 12, 0.1, 0.1, 3, CLR_HGREEN, CLR_YELLOW)
END
oPrint:EndPage()
oprint:eND()
RETURN NIL
Alguna pista
Gracias