HPDFPRINT TO ERRO

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HPDFPRINT TO ERRO

Post by edk »

jairpinho wrote: Sun Dec 02, 2018 6:56 pm need to know what exact value of all rows to add in to heightlines

@ F, 35 HPDFPRINT cDescricao to F+nDesc_size, 150
Not necessarily.😉
Just after spliting the string into lines, print each line with the HPDFPRINT command (not HPDFPRINT ... TO).

But 🆗, I'll try to prepare something. I need to analyze the harupdf source in C to see how the line spacing is handled when creating a text area. I'm not proficient in C 😕, so give me some time to investigate.
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HPDFPRINT TO ERRO

Post by mol »

You can calculate row height upon to font size
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HPDFPRINT TO ERRO

Post by edk »

mol wrote: Mon Dec 03, 2018 7:45 am You can calculate row height upon to font size
It will not be correct in every case, eg if you set a line spacing (leading) different from the default. The question remains of the font used and the line of the upper extension and the height between the baseline and the bottom line of the letter. :roll:
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HPDFPRINT TO ERRO

Post by edk »

Voilà:
Modified command:
@ <Row>, <Col> HPDFPRINT [DATE] <xData> TO <nToRow>, <nToCol>
[FONT <cFontName>]
[SIZE <nFontSize>]
[BOLD [IF lBold]]
[ITALIC [IF lItalic]]
[UNDERLINE [IF lUnderline]]
[STRIKEOUT [IF lStrikeout]]
[COLOR <aColor>]
[RIGHT | CENTER | JUSTIFY]
[WRAP]
[FONTSIZEFIT | HEIGHTFIT]
[GETBOTTOM <@nBottRowVar> ]

WRAP option: word-wrap even when there is no split character.
FONTSIZEFIT option: adjusting the font size (by reducing) so that all content fits within the declared area.
HEIGHTFIT option: adjusting the height of the area depending on: content, font, font size and set line spacing.
The FONTSIZEFIT and HEIGHTFIT options can not be used simultaneously.
Option GETBOTTOM <@nBottRowVar>: the variable <nBottRowVar> will get the value of the position of the bottom row of the printed area by reference. Value expressed in mm.

New feature:
_HMG_HPDF_GetHeight_MULTILINE_PRINT (<cText>, [<nLenght>], [<cFontName>], [<nFontSize>], [<lBold>], [<lItalic>], [<lWrap>]) --> nAreaHeight

Returns the calculated height of the printed area. Value expressed in mm. The height of the area depends on the function parameters and on the set line spacing ( SET HPDFPAGE LINESPACING TO <nSpacing> )
Arguments:
<cText> - printed content
<nLenght> - length of the line in mm (width of the area)
<cFontName> - font name
<nFontSize> - font size
<lBold> - .T. if the text is in bold
<lItalic> - .T. if the text is italic
<lWrap> - .T. if the word-wrap, even if there is no split character.

Step 1:
Insert this code into the hmg_hpdf.ch file by replacing the command "#xcommand @ <Row>, <Col> HPDFPRINT [DATE] <cText>;
TO <ToRow>, <ToCol>; ... ":

Code: Select all

#xcommand @ <Row> , <Col> HPDFPRINT [ DATA ] <cText> ;
	TO <ToRow> , <ToCol> ;
	[ <lfont : FONT> <cFontName> ] ;
	[ <lsize : SIZE> <nFontSize> ] ;
	[ <bold : BOLD> [ IF <lBold> ] ] ;
	[ <italic : ITALIC> [ IF <lItalic> ] ] ;
	[ <underline : UNDERLINE> [ IF <lUnderline> ] ] ;
	[ <strikeout : STRIKEOUT> [ IF <lStrikeout> ] ] ;
	[ <lcolor : COLOR> <aColor> ] ;
	[ <align:CENTER,RIGHT,JUSTIFY> ] ;
	[ <wrap : WRAP> ] ;
	[ <fit : FONTSIZEFIT,HEIGHTFIT> ] ;
	[ <lGetBottom : GETBOTTOM> <xVariable> ] ;
	=> ;
	_HMG_HPDF_MULTILINE_PRINT ( <Row> , <Col> , <ToRow> , <ToCol> , <cFontName> , <nFontSize> , <aColor>\[1\] , <aColor>\[2\] , <aColor>\[3\] , <cText> , ;
		<.bold.> .AND. iif( HB_IsLogical(<lBold>), <lBold>, HB_IsNil(<lBold>) ) ,; 
		<.italic.> .AND. iif( HB_IsLogical(<lItalic>), <lItalic>, HB_IsNil(<lItalic>) ) ,;
		<.underline.> .AND. iif( HB_IsLogical(<lUnderline>), <lUnderline>, HB_IsNil(<lUnderline>) ) ,;
		<.strikeout.> .AND. iif( HB_IsLogical(<lStrikeout>), <lStrikeout>, HB_IsNil(<lStrikeout>) ) ,;
		<.lcolor.> , <.lfont.> , <.lsize.> , <"align">, <.wrap.>, <"fit">, <xVariable> ) 
Step 2:
Insert this code into the file h_HMG_HPDF.Prg replacing the function "_HMG_HPDF_MULTILINE_PRINT":

Code: Select all

************************************************************************************
#define bbox_left   1 
#define bbox_top    2
#define bbox_right  3
#define bbox_bottom 4

Function _HMG_HPDF_MULTILINE_PRINT ( nRow, nCol, nToRow, nToCol, cFontName, nFontSize, nRColor, nGColor, nBColor, cText, lBold, lItalic, lUnderline, lStrikeout, lColor, lFont, lSize, cAlign, lWrap, cFit, xVariable )
Local nWidth := _HMG_SYSDATA[ 150 ][ 4 ]
Local nHeight := _HMG_SYSDATA[ 150 ][ 5 ]
Local nTextWidth := 0
Local nxPos := _HMG_HPDF_MM2Pixel( nCol )
Local nyPos :=  nHeight - _HMG_HPDF_MM2Pixel( nRow )
Local nToxPos := nxPos + _HMG_HPDF_MM2Pixel( nToCol - nCol )
Local nToyPos := nyPos - _HMG_HPDF_MM2Pixel( nToRow - nRow )
Local oFont := Nil
Local cFont := ''
Local cTtfFnt // Pablo June, 2014
Local cTextIn, cTextOut, cLine, nLineSpacingPrev, nLineSpacing, nLineCount, nLineLen, bbox, nAreaHeight

default cFontName := ''
//default nFontSize := 12
default nFontSize := _HMG_SYSDATA[ 150 ][ 9 ]
default nRColor := 0
default nGColor := 0
default nBColor := 0
default lBold := .f.
default lItalic := .f.
default lUnderline := .f.
default lStrikeout := .f.
default lColor := .f.
default lFont := .f.
default lSize := .f.
default cAlign := ''
default lWrap := .f.		
default cFit := ''
default xVariable := Nil
	
cTtfFnt := cFontName // Pablo June, 2014

If _HMG_SYSDATA[ 150 ][ 1 ] == Nil // PDF object not found!
   _HMG_HPDF_Error( 3 )
   Return Nil
endif
If _HMG_SYSDATA[ 150 ][ 7 ] == Nil // PDF Page object not found!
   _HMG_HPDF_Error( 5 )
   Return Nil
endif

// set color
If lColor
   HPDF_Page_SetRGBFill( _HMG_SYSDATA[ 150 ][ 7 ], nRColor/255, nGColor/255, nBColor/255 )
else
   HPDF_Page_SetRGBFill( _HMG_SYSDATA[ 150 ][ 7 ], 0.0, 0.0, 0.0 )
endIf   

// set font
//If HMG_LEN( alltrim( cFontName ) ) == 0
//   cFontName := _HMG_HPDF_SetFont( cFontName, lBold, lItalic )
//   oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, _HMG_SYSDATA[ 150 ][ 10 ] )
//else
   // cFontName := alltrim( cFontName )
   cFontName := AllTrim(_HMG_HPDF_SetFont( cFontName, lBold, lItalic ))
   
   if HMG_UPPER (cFileExt (cFontName)) == '.TTF' // load ttf font
   
      cFont := HPDF_LOADTTFONTFROMFILE( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, .t. )
      If HMG_LEN( alltrim( cFont ) ) == 0
         _HMG_HPDF_Error( 6 , cFontName )
         Return Nil
      endif
      oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFont, _HMG_SYSDATA[ 150 ][ 10 ] )
   else
      If HMG_UPPER( alltrim( cFontName ) ) == "SYMBOL" .or. HMG_UPPER( alltrim( cFontName ) ) == "ZAPFDINGBATS"
         oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, Nil )
      else   
         oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, _HMG_SYSDATA[ 150 ][ 10 ] )
      endIf   
   endif
//endIf   

If oFont == Nil
   _HMG_HPDF_Error( 6 , cFontName )
   Return Nil
else
   nLineSpacingPrev := HPDF_Page_GetTextLeading(_HMG_SYSDATA[ 150 ][ 7 ])
   nLineSpacing := nLineSpacingPrev
   bbox := HPDF_Font_GetBBox (oFont)
   IF nLineSpacing == 0		//set default Line spacing, based on: hpdfpago.c -> HPDF_Page_TextRect
	  nLineSpacing := ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize
   ENDIF
   
   DO WHILE .T.	//Fitting text
      HPDF_Page_SetFontAndSize( _HMG_SYSDATA[ 150 ][ 7 ], oFont, nFontSize )
      HPDF_Page_SetTextLeading( _HMG_SYSDATA[ 150 ][ 7 ], nLineSpacing )
      
      cTextIn := cText
      cTextOut := ""
      nLineCount := 0
   
      DO WHILE !EMPTY(cTextIn)
         nLineLen := HPDF_Page_MeasureText( _HMG_SYSDATA[ 150 ][ 7 ], cTextIn, nToxPos - nxPos, !lWrap, NIL )
         IF nLineLen = 0
             EXIT
         ENDIF
         nLineCount ++
         cLine := Trim( hb_USubStr( cTextIn , 1 , nLineLen ) )
         cTextIn := hb_USubStr( cTextIn, nLineLen + 1 )
         cTextOut += cLine + IF( !EMPTY( cTextIn ) , " " /* hb_eol() */ , "")
      ENDDO
	  
      nAreaHeight := ( (nLineCount - 1) * nLineSpacing /* Lines: 1 .. Last-1. The height of each line equals the line spacing. */ ) + ;
				 ( ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize /* The height of the last line equals the default line spacing for this font */ ) + .01 /* area higher than calculated (floating point and HPDF_Page_TextRect issue) */
	
	  
      IF !(HMG_UPPER( cFit ) == 'FONTSIZEFIT') /* Don't fit font size */ .OR. ;
         nAreaHeight <= nyPos - nToyPos /* Fits */ .OR. ;
         nFontSize <= 4 /* Abandon further reducing the font. */	
         EXIT
      ENDIF
         nFontSize -= 0.1			 //decrease font size
         nLineSpacing := ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize  //decrease line spacing
   ENDDO
   
   cText := cTextOut
   
   IF HMG_UPPER( cFit ) == 'HEIGHTFIT'
       nToyPos := nyPos - nAreaHeight
   ENDIF
   
   xVariable := _HMG_HPDF_Pixel2MM ( nyPos - nToyPos ) + nRow  //Return the bottom row "TO nToRow" in mm as a variable by reference.
	
   HPDF_Page_BeginText( _HMG_SYSDATA[ 150 ][ 7 ] )
   do case
      case HMG_UPPER( cAlign ) == 'CENTER'
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_CENTER, Nil )
      case HMG_UPPER( cAlign ) == 'RIGHT'
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_RIGHT, Nil )
      case HMG_UPPER( cAlign ) == 'JUSTIFY'
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_JUSTIFY, Nil )
      otherwise         
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_LEFT, Nil )
   endcase         
   HPDF_Page_EndText( _HMG_SYSDATA[ 150 ][ 7 ] )
   
   //restore previous line spacing
   HPDF_Page_SetTextLeading(_HMG_SYSDATA[ 150 ][ 7 ], nLineSpacingPrev )
   
   If lDoLog // Pablo June, 2014
     HTML_TABLE_LINE(nFHandle,{{StrZero(nRow,4,0)+" ("+StrZero(nyPos,7,2)+")","#FFFFFF",.t.},;
                               {StrZero(nCol,4,0)+" ("+StrZero(nxPos,7,2)+")","#FFFFFF",.t.},;
                         {StrZero(_HMG_SYSDATA[ 150 ][ 13 ],3,0),"#FFFFFF",.t.},;
                         {PadR(If(Empty(cTtfFnt),"<Default>",cTtfFnt),If(HMG_Len(cTtfFnt)>30,HMG_Len(cTtfFnt),30)),"#FFFFFF",.f.},;
                         {StrZero(nFontSize,2,0),"#FFFFFF",.t.},;
                         {If(lBold,"BOLD" ,Space(4))+If(lItalic," ITALIC",Space(7)),"#FFFFFF",.f.},;
                         {cFontName,If(If(Empty(cTtfFnt),HMG_Len(cFontName),HMG_Len(cTtfFnt))==HMG_Len(cFontName),"#FFFFFF","#FFFF66"),.f.}})
   Endif
endif
Return Nil
Step 3:
Add this code to the file h_HMG_HPDF.Prg:

Code: Select all

****************************************************************
Function _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cText, nLen, cFontName, nFontSize, lBold, lItalic, lWrap )
Local oFont := Nil
Local cFont := ''

Local nLineSpacing, nLineCount, nLineLen, bbox, nAreaHeight

default cText := ''
default nLen := 0   
default cFontName := ''
default nFontSize := _HMG_SYSDATA[ 150 ][ 9 ]
default lBold := .f.
default lItalic := .f.
default lWrap := .f.	

nLen := _HMG_HPDF_MM2Pixel ( nLen )

If _HMG_SYSDATA[ 150 ][ 1 ] == Nil // PDF object not found!
   _HMG_HPDF_Error( 3 )
   Return 0
endif
If _HMG_SYSDATA[ 150 ][ 7 ] == Nil // PDF Page object not found!
   _HMG_HPDF_Error( 5 )
   Return 0
endif

cFontName := AllTrim(_HMG_HPDF_SetFont( cFontName, lBold, lItalic ))
   
if HMG_UPPER (cFileExt (cFontName)) == '.TTF' // load ttf font
   
   cFont := HPDF_LOADTTFONTFROMFILE( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, .t. )
   If HMG_LEN( alltrim( cFont ) ) == 0
      _HMG_HPDF_Error( 6 , cFontName )
      Return 0
   endif
   oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFont, _HMG_SYSDATA[ 150 ][ 10 ] )
else
   If HMG_UPPER( alltrim( cFontName ) ) == "SYMBOL" .or. HMG_UPPER( alltrim( cFontName ) ) == "ZAPFDINGBATS"
      oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, Nil )
   else   
      oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, _HMG_SYSDATA[ 150 ][ 10 ] )
   endIf   
endif
  
If oFont == Nil
   _HMG_HPDF_Error( 6 , cFontName )
   Return 0
else
   nLineSpacing := HPDF_Page_GetTextLeading(_HMG_SYSDATA[ 150 ][ 7 ])
   bbox := HPDF_Font_GetBBox (oFont)
   IF nLineSpacing == 0		//set default Linespacing, based on: hpdfpago.c -> HPDF_Page_TextRect
      nLineSpacing := ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize
   ENDIF
	
   HPDF_Page_SetFontAndSize( _HMG_SYSDATA[ 150 ][ 7 ], oFont, nFontSize )  
   nLineCount := 0
   
   DO WHILE !EMPTY( cText )
      nLineLen := HPDF_Page_MeasureText( _HMG_SYSDATA[ 150 ][ 7 ], cText, nLen, !lWrap, NIL )
	 IF nLineLen = 0
          EXIT
      ENDIF
      nLineCount ++
      cText := hb_USubStr( cText, nLineLen + 1 )
   ENDDO
Endif   
nAreaHeight := ( (nLineCount - 1) * nLineSpacing /* Lines: 1 .. Last-1. The height of each line equals the line spacing */ ) + ;
			( ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize /* The height of the last line equals the default line spacing for this font */ ) + .01 /* area higher than calculated (floating point and HPDF_Page_TextRect issue) */

Return _HMG_HPDF_Pixel2MM ( nAreaHeight ) 
***************************************************************************************************
Step 4:
Rebuild HMG with BuildLib32.bat

Sample of new features:

Code: Select all

#include "hmg.ch"
#include "harupdf.ch"
Function Main()

Local cFonte1:= "Helvetica"

Local cEdit := "Whitnesseth that said Grantor, for and in consideration of the sum of ten dollars, and other good and valuable considerations " +;
				"to said Grantor in hand paid by said Grantee, the receipt whereof is hereby acknowledged, has remised, released and quit claimed, " +;
				"and by these presents does remise, release and quitclaim unto the Grantee all the right, title, interest, claim and demand which " +;
				"the said Grantor has in and the following described land situate, lying and being in current state."

Local nHeight, nNextRow, nBottomRow

SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
START HPDFDOC
	SET HPDFDOC ENCODING TO "WinAnsiEncoding"
		
	START HPDFPAGE

		//Adjust the height of the text of the area and get the bottom row using a variable by reference
		@ 20, 15 HPDFPRINT cEdit TO 25, 185 FONT cFonte1 size 9 JUSTIFY HEIGHTFIT GETBOTTOM @nBottomRow
		@ 20, 15 HPDFPRINT RECTANGLE TO nBottomRow, 185 PENWIDTH 0.1

		nNextRow := nBottomRow + 1
		
		//Calculate the height of the text of the area with word wrapping.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cEdit /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 9 /* nFontSize */,  /* lBold */, /* lItalic */ , .T. /* lWrap */ )		
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + nHeight , 185 FONT cFonte1 size 9 JUSTIFY WRAP
		
		nNextRow += nHeight + 1
		
		//Calculate the height of the text of the area without word wrapping.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cEdit /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 10 /* nFontSize */, .T. /* lBold */, /* lItalic */ , .F. /* lWrap */ )	
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + nHeight , 185 FONT cFonte1 size 10 BOLD CENTER	
		
		nNextRow += nHeight + 1
		
		//Change line spacing to 6 px
		SET HPDFPAGE LINESPACING TO _HMG_HPDF_Pixel2MM( 6 )	
		
		//Calculate the text height of the area with the previously set line spacing.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cEdit /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 8.5 /* nFontSize */, .T. /* lBold */, .T. /* lItalic */ , .F. /* lWrap */ )	
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + nHeight, 185 FONT cFonte1 size 8.5 BOLD ITALIC RIGHT
		
		//Restore line spacing to defaults
		SET HPDFPAGE LINESPACING TO 0
		
		nNextRow += nHeight + 1
		
		//Adjust the height of the text of the area and get the bottom row using a variable by reference
		@ nNextRow, 15 HPDFPRINT "Some short text ABC Ó xyz" TO nNextRow, 185 FONT cFonte1 size 8 HEIGHTFIT GETBOTTOM @nBottomRow
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nBottomRow, 185 PENWIDTH 0.1

		nNextRow := nBottomRow + 1
		
		//Calculate the text height of the area.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( "Some short text ABC Ó xyz" /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 8 /* nFontSize */, .T. /* lBold */, /* lItalic */ , /* lWrap */ )	
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT "Some short text ABC Ó xyz" TO nNextRow + nHeight, 185 FONT cFonte1 size 8 BOLD
		
		nNextRow += nHeight + 1
		
		//Adjust the font size of the text to the fixed height of the area and get the bottom row using the variable by reference.
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + 12, 185 FONT cFonte1 size 10 FONTSIZEFIT GETBOTTOM @nBottomRow  
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nBottomRow , 185 PENWIDTH 0.1
	
		//Print the line of text in the last row.
		@ nBottomRow, 15 HPDFPRINT "Last Row := " + AllTrim(Str(nBottomRow)) + " mm" SIZE 6
		
	END HPDFPAGE
END HPDFDOC
Execute File 'sample.pdf'
Return Nil
sample.png
sample.png (55.07 KiB) Viewed 3135 times
@Jair Pinho:
You owe me a big bottle of Cachaça Pirassununga 51.
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HPDFPRINT TO ERRO

Post by bpd2000 »

mol wrote: Mon Dec 03, 2018 11:41 am Jesteś wielki, Edward!
+1
BPD
Convert Dream into Reality through HMG
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HPDFPRINT TO ERRO

Post by serge_girard »

Thanks Edward, this must be included in the new HMG 3.4.x!

Serge
There's nothing you can do that can't be done...
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: HPDFPRINT TO ERRO

Post by EduardoLuis »

Hi Jaipirinho:

EDK suggest you this:

"Just after spliting the string into lines, print each line with the HPDFPRINT command (not HPDFPRINT ... TO)"

I must agree with him.- That is the best way to create a PDF when don't know in advance the size of the lenght of each field you will print.- Some time ago i do an accountant sheet (Diary) where concept field size will have indeterminated lenght.- I solve it creating a temp.dbf where i have only the information to print.- Specifically concept field was defined for a maxlenght of 60 chars.- When i exchange information from the original dbf (concept field is a memo), i slice it on portions that will become a new recond on the temp.dbf.- These procedure let me not only print properly full concept text, and also subtotals (for numeric files) that will be transported to next page.-
It seems to be a complex job, but only seems.- During printing you must make a loop that counts each line was printed, and if necesary perform a new HPDFPAGE till the end.-
Hopping these helps you.
With regards. Eduardo
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: HPDFPRINT TO ERRO

Post by jairpinho »

edk wrote: Mon Dec 03, 2018 11:39 am Voilà:
Modified command:
@ <Row>, <Col> HPDFPRINT [DATE] <xData> TO <nToRow>, <nToCol>
[FONT <cFontName>]
[SIZE <nFontSize>]
[BOLD [IF lBold]]
[ITALIC [IF lItalic]]
[UNDERLINE [IF lUnderline]]
[STRIKEOUT [IF lStrikeout]]
[COLOR <aColor>]
[RIGHT | CENTER | JUSTIFY]
[WRAP]
[FONTSIZEFIT | HEIGHTFIT]
[GETBOTTOM <@nBottRowVar> ]

WRAP option: word-wrap even when there is no split character.
FONTSIZEFIT option: adjusting the font size (by reducing) so that all content fits within the declared area.
HEIGHTFIT option: adjusting the height of the area depending on: content, font, font size and set line spacing.
The FONTSIZEFIT and HEIGHTFIT options can not be used simultaneously.
Option GETBOTTOM <@nBottRowVar>: the variable <nBottRowVar> will get the value of the position of the bottom row of the printed area by reference. Value expressed in mm.

New feature:
_HMG_HPDF_GetHeight_MULTILINE_PRINT (<cText>, [<nLenght>], [<cFontName>], [<nFontSize>], [<lBold>], [<lItalic>], [<lWrap>]) --> nAreaHeight

Returns the calculated height of the printed area. Value expressed in mm. The height of the area depends on the function parameters and on the set line spacing ( SET HPDFPAGE LINESPACING TO <nSpacing> )
Arguments:
<cText> - printed content
<nLenght> - length of the line in mm (width of the area)
<cFontName> - font name
<nFontSize> - font size
<lBold> - .T. if the text is in bold
<lItalic> - .T. if the text is italic
<lWrap> - .T. if the word-wrap, even if there is no split character.

Step 1:
Insert this code into the hmg_hpdf.ch file by replacing the command "#xcommand @ <Row>, <Col> HPDFPRINT [DATE] <cText>;
TO <ToRow>, <ToCol>; ... ":

Code: Select all

#xcommand @ <Row> , <Col> HPDFPRINT [ DATA ] <cText> ;
	TO <ToRow> , <ToCol> ;
	[ <lfont : FONT> <cFontName> ] ;
	[ <lsize : SIZE> <nFontSize> ] ;
	[ <bold : BOLD> [ IF <lBold> ] ] ;
	[ <italic : ITALIC> [ IF <lItalic> ] ] ;
	[ <underline : UNDERLINE> [ IF <lUnderline> ] ] ;
	[ <strikeout : STRIKEOUT> [ IF <lStrikeout> ] ] ;
	[ <lcolor : COLOR> <aColor> ] ;
	[ <align:CENTER,RIGHT,JUSTIFY> ] ;
	[ <wrap : WRAP> ] ;
	[ <fit : FONTSIZEFIT,HEIGHTFIT> ] ;
	[ <lGetBottom : GETBOTTOM> <xVariable> ] ;
	=> ;
	_HMG_HPDF_MULTILINE_PRINT ( <Row> , <Col> , <ToRow> , <ToCol> , <cFontName> , <nFontSize> , <aColor>\[1\] , <aColor>\[2\] , <aColor>\[3\] , <cText> , ;
		<.bold.> .AND. iif( HB_IsLogical(<lBold>), <lBold>, HB_IsNil(<lBold>) ) ,; 
		<.italic.> .AND. iif( HB_IsLogical(<lItalic>), <lItalic>, HB_IsNil(<lItalic>) ) ,;
		<.underline.> .AND. iif( HB_IsLogical(<lUnderline>), <lUnderline>, HB_IsNil(<lUnderline>) ) ,;
		<.strikeout.> .AND. iif( HB_IsLogical(<lStrikeout>), <lStrikeout>, HB_IsNil(<lStrikeout>) ) ,;
		<.lcolor.> , <.lfont.> , <.lsize.> , <"align">, <.wrap.>, <"fit">, <xVariable> ) 
Step 2:
Insert this code into the file h_HMG_HPDF.Prg replacing the function "_HMG_HPDF_MULTILINE_PRINT":

Code: Select all

************************************************************************************
#define bbox_left   1 
#define bbox_top    2
#define bbox_right  3
#define bbox_bottom 4

Function _HMG_HPDF_MULTILINE_PRINT ( nRow, nCol, nToRow, nToCol, cFontName, nFontSize, nRColor, nGColor, nBColor, cText, lBold, lItalic, lUnderline, lStrikeout, lColor, lFont, lSize, cAlign, lWrap, cFit, xVariable )
Local nWidth := _HMG_SYSDATA[ 150 ][ 4 ]
Local nHeight := _HMG_SYSDATA[ 150 ][ 5 ]
Local nTextWidth := 0
Local nxPos := _HMG_HPDF_MM2Pixel( nCol )
Local nyPos :=  nHeight - _HMG_HPDF_MM2Pixel( nRow )
Local nToxPos := nxPos + _HMG_HPDF_MM2Pixel( nToCol - nCol )
Local nToyPos := nyPos - _HMG_HPDF_MM2Pixel( nToRow - nRow )
Local oFont := Nil
Local cFont := ''
Local cTtfFnt // Pablo June, 2014
Local cTextIn, cTextOut, cLine, nLineSpacingPrev, nLineSpacing, nLineCount, nLineLen, bbox, nAreaHeight

default cFontName := ''
//default nFontSize := 12
default nFontSize := _HMG_SYSDATA[ 150 ][ 9 ]
default nRColor := 0
default nGColor := 0
default nBColor := 0
default lBold := .f.
default lItalic := .f.
default lUnderline := .f.
default lStrikeout := .f.
default lColor := .f.
default lFont := .f.
default lSize := .f.
default cAlign := ''
default lWrap := .f.		
default cFit := ''
default xVariable := Nil
	
cTtfFnt := cFontName // Pablo June, 2014

If _HMG_SYSDATA[ 150 ][ 1 ] == Nil // PDF object not found!
   _HMG_HPDF_Error( 3 )
   Return Nil
endif
If _HMG_SYSDATA[ 150 ][ 7 ] == Nil // PDF Page object not found!
   _HMG_HPDF_Error( 5 )
   Return Nil
endif

// set color
If lColor
   HPDF_Page_SetRGBFill( _HMG_SYSDATA[ 150 ][ 7 ], nRColor/255, nGColor/255, nBColor/255 )
else
   HPDF_Page_SetRGBFill( _HMG_SYSDATA[ 150 ][ 7 ], 0.0, 0.0, 0.0 )
endIf   

// set font
//If HMG_LEN( alltrim( cFontName ) ) == 0
//   cFontName := _HMG_HPDF_SetFont( cFontName, lBold, lItalic )
//   oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, _HMG_SYSDATA[ 150 ][ 10 ] )
//else
   // cFontName := alltrim( cFontName )
   cFontName := AllTrim(_HMG_HPDF_SetFont( cFontName, lBold, lItalic ))
   
   if HMG_UPPER (cFileExt (cFontName)) == '.TTF' // load ttf font
   
      cFont := HPDF_LOADTTFONTFROMFILE( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, .t. )
      If HMG_LEN( alltrim( cFont ) ) == 0
         _HMG_HPDF_Error( 6 , cFontName )
         Return Nil
      endif
      oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFont, _HMG_SYSDATA[ 150 ][ 10 ] )
   else
      If HMG_UPPER( alltrim( cFontName ) ) == "SYMBOL" .or. HMG_UPPER( alltrim( cFontName ) ) == "ZAPFDINGBATS"
         oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, Nil )
      else   
         oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, _HMG_SYSDATA[ 150 ][ 10 ] )
      endIf   
   endif
//endIf   

If oFont == Nil
   _HMG_HPDF_Error( 6 , cFontName )
   Return Nil
else
   nLineSpacingPrev := HPDF_Page_GetTextLeading(_HMG_SYSDATA[ 150 ][ 7 ])
   nLineSpacing := nLineSpacingPrev
   bbox := HPDF_Font_GetBBox (oFont)
   IF nLineSpacing == 0		//set default Line spacing, based on: hpdfpago.c -> HPDF_Page_TextRect
	  nLineSpacing := ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize
   ENDIF
   
   DO WHILE .T.	//Fitting text
      HPDF_Page_SetFontAndSize( _HMG_SYSDATA[ 150 ][ 7 ], oFont, nFontSize )
      HPDF_Page_SetTextLeading( _HMG_SYSDATA[ 150 ][ 7 ], nLineSpacing )
      
      cTextIn := cText
      cTextOut := ""
      nLineCount := 0
   
      DO WHILE !EMPTY(cTextIn)
         nLineLen := HPDF_Page_MeasureText( _HMG_SYSDATA[ 150 ][ 7 ], cTextIn, nToxPos - nxPos, !lWrap, NIL )
         IF nLineLen = 0
             EXIT
         ENDIF
         nLineCount ++
         cLine := Trim( hb_USubStr( cTextIn , 1 , nLineLen ) )
         cTextIn := hb_USubStr( cTextIn, nLineLen + 1 )
         cTextOut += cLine + IF( !EMPTY( cTextIn ) , " " /* hb_eol() */ , "")
      ENDDO
	  
      nAreaHeight := ( (nLineCount - 1) * nLineSpacing /* Lines: 1 .. Last-1. The height of each line equals the line spacing. */ ) + ;
				 ( ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize /* The height of the last line equals the default line spacing for this font */ ) + .01 /* area higher than calculated (floating point and HPDF_Page_TextRect issue) */
	
	  
      IF !(HMG_UPPER( cFit ) == 'FONTSIZEFIT') /* Don't fit font size */ .OR. ;
         nAreaHeight <= nyPos - nToyPos /* Fits */ .OR. ;
         nFontSize <= 4 /* Abandon further reducing the font. */	
         EXIT
      ENDIF
         nFontSize -= 0.1			 //decrease font size
         nLineSpacing := ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize  //decrease line spacing
   ENDDO
   
   cText := cTextOut
   
   IF HMG_UPPER( cFit ) == 'HEIGHTFIT'
       nToyPos := nyPos - nAreaHeight
   ENDIF
   
   xVariable := _HMG_HPDF_Pixel2MM ( nyPos - nToyPos ) + nRow  //Return the bottom row "TO nToRow" in mm as a variable by reference.
	
   HPDF_Page_BeginText( _HMG_SYSDATA[ 150 ][ 7 ] )
   do case
      case HMG_UPPER( cAlign ) == 'CENTER'
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_CENTER, Nil )
      case HMG_UPPER( cAlign ) == 'RIGHT'
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_RIGHT, Nil )
      case HMG_UPPER( cAlign ) == 'JUSTIFY'
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_JUSTIFY, Nil )
      otherwise         
         HPDF_Page_TextRect( _HMG_SYSDATA[ 150 ][ 7 ], nxPos, nyPos, nToxPos, nToyPos, cText, HPDF_TALIGN_LEFT, Nil )
   endcase         
   HPDF_Page_EndText( _HMG_SYSDATA[ 150 ][ 7 ] )
   
   //restore previous line spacing
   HPDF_Page_SetTextLeading(_HMG_SYSDATA[ 150 ][ 7 ], nLineSpacingPrev )
   
   If lDoLog // Pablo June, 2014
     HTML_TABLE_LINE(nFHandle,{{StrZero(nRow,4,0)+" ("+StrZero(nyPos,7,2)+")","#FFFFFF",.t.},;
                               {StrZero(nCol,4,0)+" ("+StrZero(nxPos,7,2)+")","#FFFFFF",.t.},;
                         {StrZero(_HMG_SYSDATA[ 150 ][ 13 ],3,0),"#FFFFFF",.t.},;
                         {PadR(If(Empty(cTtfFnt),"<Default>",cTtfFnt),If(HMG_Len(cTtfFnt)>30,HMG_Len(cTtfFnt),30)),"#FFFFFF",.f.},;
                         {StrZero(nFontSize,2,0),"#FFFFFF",.t.},;
                         {If(lBold,"BOLD" ,Space(4))+If(lItalic," ITALIC",Space(7)),"#FFFFFF",.f.},;
                         {cFontName,If(If(Empty(cTtfFnt),HMG_Len(cFontName),HMG_Len(cTtfFnt))==HMG_Len(cFontName),"#FFFFFF","#FFFF66"),.f.}})
   Endif
endif
Return Nil
Step 3:
Add this code to the file h_HMG_HPDF.Prg:

Code: Select all

****************************************************************
Function _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cText, nLen, cFontName, nFontSize, lBold, lItalic, lWrap )
Local oFont := Nil
Local cFont := ''

Local nLineSpacing, nLineCount, nLineLen, bbox, nAreaHeight

default cText := ''
default nLen := 0   
default cFontName := ''
default nFontSize := _HMG_SYSDATA[ 150 ][ 9 ]
default lBold := .f.
default lItalic := .f.
default lWrap := .f.	

nLen := _HMG_HPDF_MM2Pixel ( nLen )

If _HMG_SYSDATA[ 150 ][ 1 ] == Nil // PDF object not found!
   _HMG_HPDF_Error( 3 )
   Return 0
endif
If _HMG_SYSDATA[ 150 ][ 7 ] == Nil // PDF Page object not found!
   _HMG_HPDF_Error( 5 )
   Return 0
endif

cFontName := AllTrim(_HMG_HPDF_SetFont( cFontName, lBold, lItalic ))
   
if HMG_UPPER (cFileExt (cFontName)) == '.TTF' // load ttf font
   
   cFont := HPDF_LOADTTFONTFROMFILE( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, .t. )
   If HMG_LEN( alltrim( cFont ) ) == 0
      _HMG_HPDF_Error( 6 , cFontName )
      Return 0
   endif
   oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFont, _HMG_SYSDATA[ 150 ][ 10 ] )
else
   If HMG_UPPER( alltrim( cFontName ) ) == "SYMBOL" .or. HMG_UPPER( alltrim( cFontName ) ) == "ZAPFDINGBATS"
      oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, Nil )
   else   
      oFont := HPDF_GetFont( _HMG_SYSDATA[ 150 ][ 1 ], cFontName, _HMG_SYSDATA[ 150 ][ 10 ] )
   endIf   
endif
  
If oFont == Nil
   _HMG_HPDF_Error( 6 , cFontName )
   Return 0
else
   nLineSpacing := HPDF_Page_GetTextLeading(_HMG_SYSDATA[ 150 ][ 7 ])
   bbox := HPDF_Font_GetBBox (oFont)
   IF nLineSpacing == 0		//set default Linespacing, based on: hpdfpago.c -> HPDF_Page_TextRect
      nLineSpacing := ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize
   ENDIF
	
   HPDF_Page_SetFontAndSize( _HMG_SYSDATA[ 150 ][ 7 ], oFont, nFontSize )  
   nLineCount := 0
   
   DO WHILE !EMPTY( cText )
      nLineLen := HPDF_Page_MeasureText( _HMG_SYSDATA[ 150 ][ 7 ], cText, nLen, !lWrap, NIL )
	 IF nLineLen = 0
          EXIT
      ENDIF
      nLineCount ++
      cText := hb_USubStr( cText, nLineLen + 1 )
   ENDDO
Endif   
nAreaHeight := ( (nLineCount - 1) * nLineSpacing /* Lines: 1 .. Last-1. The height of each line equals the line spacing */ ) + ;
			( ( bbox [bbox_top] - bbox [bbox_bottom] ) / 1000 * nFontSize /* The height of the last line equals the default line spacing for this font */ ) + .01 /* area higher than calculated (floating point and HPDF_Page_TextRect issue) */

Return _HMG_HPDF_Pixel2MM ( nAreaHeight ) 
***************************************************************************************************
Step 4:
Rebuild HMG with BuildLib32.bat

Sample of new features:

Code: Select all

#include "hmg.ch"
#include "harupdf.ch"
Function Main()

Local cFonte1:= "Helvetica"

Local cEdit := "Whitnesseth that said Grantor, for and in consideration of the sum of ten dollars, and other good and valuable considerations " +;
				"to said Grantor in hand paid by said Grantee, the receipt whereof is hereby acknowledged, has remised, released and quit claimed, " +;
				"and by these presents does remise, release and quitclaim unto the Grantee all the right, title, interest, claim and demand which " +;
				"the said Grantor has in and the following described land situate, lying and being in current state."

Local nHeight, nNextRow, nBottomRow

SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
START HPDFDOC
	SET HPDFDOC ENCODING TO "WinAnsiEncoding"
		
	START HPDFPAGE

		//Adjust the height of the text of the area and get the bottom row using a variable by reference
		@ 20, 15 HPDFPRINT cEdit TO 25, 185 FONT cFonte1 size 9 JUSTIFY HEIGHTFIT GETBOTTOM @nBottomRow
		@ 20, 15 HPDFPRINT RECTANGLE TO nBottomRow, 185 PENWIDTH 0.1

		nNextRow := nBottomRow + 1
		
		//Calculate the height of the text of the area with word wrapping.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cEdit /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 9 /* nFontSize */,  /* lBold */, /* lItalic */ , .T. /* lWrap */ )		
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + nHeight , 185 FONT cFonte1 size 9 JUSTIFY WRAP
		
		nNextRow += nHeight + 1
		
		//Calculate the height of the text of the area without word wrapping.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cEdit /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 10 /* nFontSize */, .T. /* lBold */, /* lItalic */ , .F. /* lWrap */ )	
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + nHeight , 185 FONT cFonte1 size 10 BOLD CENTER	
		
		nNextRow += nHeight + 1
		
		//Change line spacing to 6 px
		SET HPDFPAGE LINESPACING TO _HMG_HPDF_Pixel2MM( 6 )	
		
		//Calculate the text height of the area with the previously set line spacing.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( cEdit /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 8.5 /* nFontSize */, .T. /* lBold */, .T. /* lItalic */ , .F. /* lWrap */ )	
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + nHeight, 185 FONT cFonte1 size 8.5 BOLD ITALIC RIGHT
		
		//Restore line spacing to defaults
		SET HPDFPAGE LINESPACING TO 0
		
		nNextRow += nHeight + 1
		
		//Adjust the height of the text of the area and get the bottom row using a variable by reference
		@ nNextRow, 15 HPDFPRINT "Some short text ABC Ó xyz" TO nNextRow, 185 FONT cFonte1 size 8 HEIGHTFIT GETBOTTOM @nBottomRow
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nBottomRow, 185 PENWIDTH 0.1

		nNextRow := nBottomRow + 1
		
		//Calculate the text height of the area.
		nHeight := _HMG_HPDF_GetHeight_MULTILINE_PRINT ( "Some short text ABC Ó xyz" /* cText */ , 185 - 15 /* nLen ( nToCol - nCol ) */ , cFonte1 /* cFontName */, 8 /* nFontSize */, .T. /* lBold */, /* lItalic */ , /* lWrap */ )	
		//Print and draw area with calculated height.
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nNextRow + nHeight , 185 PENWIDTH 0.1
		@ nNextRow, 15 HPDFPRINT "Some short text ABC Ó xyz" TO nNextRow + nHeight, 185 FONT cFonte1 size 8 BOLD
		
		nNextRow += nHeight + 1
		
		//Adjust the font size of the text to the fixed height of the area and get the bottom row using the variable by reference.
		@ nNextRow, 15 HPDFPRINT cEdit TO nNextRow + 12, 185 FONT cFonte1 size 10 FONTSIZEFIT GETBOTTOM @nBottomRow  
		@ nNextRow, 15 HPDFPRINT RECTANGLE TO nBottomRow , 185 PENWIDTH 0.1
	
		//Print the line of text in the last row.
		@ nBottomRow, 15 HPDFPRINT "Last Row := " + AllTrim(Str(nBottomRow)) + " mm" SIZE 6
		
	END HPDFPAGE
END HPDFDOC
Execute File 'sample.pdf'
Return Nil
sample.png

@Jair Pinho:
You owe me a big bottle of Cachaça Pirassununga 51.
Edward, thank you, may I, I'll arrange Pirassununga 51

I made all changes but shows the error
erro pdf.jpg
erro pdf.jpg (57.42 KiB) Viewed 3091 times
erro2pdf.jpg
erro2pdf.jpg (55.89 KiB) Viewed 3081 times
Last edited by jairpinho on Mon Dec 03, 2018 7:16 pm, edited 1 time in total.
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HPDFPRINT TO ERRO

Post by edk »

Show me line 41 proc TESTE
Post Reply