Excluí fonte/PDF do post anterior.
Código: Selecionar todos
::DrawText( 30, 162, "Recibo do Pagador", ::nFontSizeNormal )
::DrawLine( 32, 20, 32, 197 )
::DrawLine( 32, 125, 38, 125 )
::DrawLine( 32, 161, 38, 161 )
::DrawText( 34, 20, "Beneficiário", ::nFontSizeSmall )
::DrawText( 34, 126, "CNPJ/CPF", ::nFontSizeSmall )
::DrawText( 34, 162, "Vencimento", ::nFontSizeSmall )
::DrawLine( 38, 20, 38, 197 )
::DrawLine( 38, 46, 44, 46 )
::DrawLine( 38, 68, 44, 68 )
::DrawLine( 38, 78, 44, 78 )
::DrawLine( 38, 118, 44, 118 )
::DrawLine( 38, 156, 44, 156 )
::DrawText( 40, 20, "CPI", ::nFontSizeSmall )
::DrawText( 40, 47, "Carteira", ::nFontSizeSmall )
::DrawText( 40, 69, "Espécie", ::nFontSizeSmall )
::DrawText( 40, 79, "Quantidade", ::nFontSizeSmall )
::DrawText ( 40, 119, "Valor", ::nFontSizeSmall )
::DrawText( 40, 157, "Agência/Código do Beneficiário", ::nFontSizeSmall )
::DrawLine( 44, 20, 44, 197 )
::DrawLine( 44, 51, 50, 51 )
::DrawLine( 44, 78, 50, 78 )
::DrawLine( 44, 112, 50, 112 )
::DrawLine( 44, 125, 50, 125 )
::DrawLine( 44, 151, 50, 151 )
::DrawText( 46, 20, "Data do Documento", ::nFontSizeSmall )
::DrawText( 46, 52, "Número do Documento", ::nFontSizeSmall )
::DrawText( 46, 79, "Espécie do Documento", ::nFontSizeSmall )
::DrawText( 46, 113, "Aceite", ::nFontSizeSmall )
::DrawText( 46, 126, "Data do Processamento", ::nFontSizeSmall )
::DrawText( 46, 152, "Valor do Documento", ::nFontSizeSmall )
::DrawLine( 50, 20, 50, 197 )
::DrawText( 52, 20, "Endereço", ::nFontSizeSmall )
::DrawLine( 56, 20, 56, 197 )
::DrawLine( 186, 20, 186, 197 )
::DrawLine( 186, 115, 190, 115 )
::DrawLine( 186, 197, 190, 197 )
::DrawText( 188, 20, "RECEBIMENTO ATRAVÉS DO CHEQUE No.", ::nFontSizeSmall )
::DrawText( 188, 149, "Autenticação Mecânica", ::nFontSizeSmall )
::DrawText( 190, 20, "DO BANCO", ::nFontSizeSmall )
::DrawText( 192, 20, "ESTA QUITAÇÃO SÓ TERÁ VALIDADE APÓS O PAGAMENTO", ::nFontSizeSmall )
::DrawText( 194, 20, "DO CHEQUE PELO BANCO PAGADOR", ::nFontSizeSmall )
::DrawLine( 208, 57, 214, 57 )
::DrawLine( 208, 71, 214, 71 )
::DrawText( 213, 58, "341-7", ::nFontSizeLarge )
::DrawText( 213, 35, "Banco Itaú S/A", ::nFontSizeSmall )
::DrawLine( 214, 148, 271, 148 )
::DrawLine( 214, 20, 214, 197 )
::DrawText( 216, 20, "Local de Pagamento", ::nFontSizeSmall )
::DrawText( 216, 149, "Vencimento", ::nFontSizeSmall )
::DrawLine( 223, 20, 223, 197 )
::DrawText( 225, 149, "Agência/Código Beneficiário", ::nFontSizeSmall )
::DrawLine( 229, 20, 229, 197 )
::DrawLine( 229, 49, 235, 49 )
::DrawLine( 229, 78, 235, 78 )
::DrawLine( 229, 99, 235, 99 )
::DrawLine( 229, 121, 235, 121 )
::DrawText( 231, 20, "Data do Documento", ::nFontSizeSmall )
::DrawText( 231, 50, "No.Documento", ::nFontSizeSmall )
::DrawText( 231, 79, "Espécie Doc", ::nFontSizeSmall )
::DrawText( 231, 100, "Aceite", ::nFontSizeSmall )
::DrawText( 231, 122, "Data Processamento", ::nFontSizeSmall )
::DrawText( 231, 149, "Nosso Número", ::nFontSizeSmall )
::DrawLine( 235, 20, 235, 197 )
::DrawLine( 235, 41, 241, 41 )
::DrawLine( 235, 73, 241, 73 )
::DrawLine( 235, 89, 241, 89 )
::DrawLine( 235, 121, 241, 121 )
::DrawText( 237, 20, "Uso do Banco", ::nFontSizeSmall )
::DrawText( 237, 42, "Carteira", ::nFontSizeSmall )
::DrawText( 237, 74, "Espécie", ::nFontSizeSmall )
::DrawText( 237, 90, "Quantidade", ::nFontSizeSmall )
::DrawText( 237, 122, "Valor", ::nFontSizeSmall )
::DrawText( 237, 149, "(-) Valor do Documento", ::nFontSizeSmall )
::DrawLine( 241, 20, 241, 197 )
::DrawText( 243, 20, "Instruções de responsabilidade do BENEFICIÁRIO. Qualquer dúvida sobre este boleto, contate o BENEFICIÁRIO", ::nFontSizeSmall )
::DrawText( 243, 149, "(-) Desconto/Abatimento", ::nFontSizeSmall )
::DrawLine( 247, 148, 247, 197 )
::DrawLine( 253, 148, 253, 197 )
::DrawText( 255, 149, "(+) Mora/Multa", ::nFontSizeSmall )
::DrawLine( 259, 148, 259, 197 )
::DrawLine( 265, 148, 265, 197 )
::DrawText( 267, 149, "(=) Valor Cobrado", ::nFontSizeSmall )
::DrawLine( 271, 20, 271, 197 )
::DrawText( 285, 20, "Sacador/Avalista", ::nFontSizeSmall )
::DrawText( 285, 149, "Código de Baixa", ::nFontSizeSmall )
::DrawText( 285, 18, "Banco Itaú S/A CNPJ 60.701.190", ::nFontSizeSmall, , , 90 )
::DrawLine( 287, 20, 287, 197 )
::DrawText( 289, 145, "Autenticação Mecânica/FICHA DE COMPENSAÇÃO", ::nFontSizeSmall )
METHOD DrawText( nRow, nCol, cTexto, nFontSize, cFontName, anColor, nAngle ) CLASS PDFGenBoletoClass
LOCAL nRadian
nFontSize := iif( nFontSize == NIL, ::nFontSize, nFontSize )
cFontName := iif( cFontName == NIL, ::cFontName, cFontName )
nAngle := iif( nAngle == NIL, ::nAngle, nAngle )
nRow := ::mmRow( nRow )
nCol := ::mmCol( nCol )
::PdfSetColor( anColor )
HPDF_Page_SetFontAndSize( ::oPage, HPDF_GetFont( ::oPdf, cFontName, "CP1252" ), nFontSize )
HPDF_Page_BeginText( ::oPage )
nRadian := ( nAngle / 180 ) * 3.141592
HPDF_Page_SetTextMatrix( ::oPage, Cos( nRadian ), Sin( nRadian ), -Sin( nRadian ), Cos( nRadian ), nCol, nRow )
HPDF_Page_ShowText( ::oPage, cTexto )
HPDF_Page_EndText( ::oPage )
RETURN NIL
METHOD DrawLine( nRowi, nColi, nRowf, nColf, nPenSize, anColor ) CLASS PDFGenBoletoClass
nPenSize := iif( nPenSize == NIL, 0.5, nPenSize )
nRowi := ::mmRow( nRowi )
nColi := ::mmCol( nColi )
nRowf := ::mmRow( nRowf )
nColf := ::mmCol( nColf )
::PdfSetColor( anColor )
HPDF_Page_SetLineWidth( ::oPage, nPenSize )
HPDF_Page_MoveTo( ::oPage, nColi, nRowi )
HPDF_Page_LineTo( ::oPage, nColf, nRowf )
HPDF_Page_Stroke( ::oPage )
RETURN NIL