#include <hmg.ch>
#include "hfcl.ch"
Function Main
MEMVAR _HMG_SYSDATA
Load Window Main
Main.Center
Main.Activate
Return NIL
FUNCTION ssw_HPdfPrint( cTtf)
LOCAL aLine, aFont
LOCAL cString, cFontname, cPdfname, cStartupFolder
LOCAL nI
LOCAL lSuccess
HB_DEFAULT( @cTtf, '')
cString := MEMOREAD( "List.TXT")
aLine := HB_ATOKENS( cString, CRLF)
lSuccess := .F.
IF EMPTY( cTtf)
aFont := GetFont()
cFontname := aFont[ 1]
ELSE
// cFontname := "MS LineDraw.TTF"
// cFontname := "tahoma.TTF"
// cFontname := "times.TTF"
cFontname:= "cour.TTF"
ENDIF
cPdfName := "ssw_" + STRTRAN( cFontname, ".TTF", "_TTF") + ".pdf"
SELECT HPDFDOC cPdfname TO lSuccess papersize HPDF_PAPER_A4
SET HPDFDOC COMPRESS ALL
SET HPDFDOC PAGEMODE TO OUTLINE
SET HPDFINFO AUTHOR TO 'S. Rathinagiri'
SET HPDFINFO CREATOR TO 'S. Rathinagiri'
SET HPDFINFO TITLE TO 'ssw HPDF Print'
SET HPDFINFO SUBJECT TO 'Test HPdfPrint for Load Font'
SET HPDFINFO KEYWORDS TO 'HMG, HPDF, Documentation, LibHaru, Harbour, MiniGUI'
SET HPDFINFO DATECREATED TO date() TIME time()
IF lSuccess
START HPDFDOC
START HPDFPAGE
FOR nI := 1 TO LEN( aLine)
@ 10 + nI * 5, 10 HPDFPRINT aLine[ nI] FONT cFontname
NEXT
END HPDFPAGE
END HPDFDOC
MsgInfo( "Pdf Printed !")
ELSE
MsgInfo( "Error Printing Pdf !")
ENDIF
RETURN NIL
Pudiera ser esta la razon ? viewtopic.php?f=5&t=3422&p=31430#p31430
-------------------------------------------------------------------------------
Hello hmgchang
Rathinagiri wrote:For the time being, try to give the full path of the font file.
Yeah, as I have already told him...
Only in the new version is going to find the ttf file. Is necessary to know where the file is. If is not in current folder, will not find. And I think even been in current, will need the fullpath of ttf file.
HMGing a better world "Matter tells space how to curve, space tells matter how to move." Albert Einstein