Underline and italic in PDF seems not work
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Underline and italic in PDF seems not work
I have changed output file of "UsedFonts.txt" to "UsedFonts.html", in order to visualizate in different colors. So I included new functions as:
HTML_TABLE_INI (nHandle,cTit,nWidth,nPading)
HTML_TABLE_LINE (nHandle,aLin)
HTML_BOLD (nHandle,cText)
HTML_END (nHandle)
These functions made a TABLE in HTML. Now I show the source fonts for avaliable and to be included for next relase. Ok Mr. Rathinagiri ?
I hope be enjoyed !
HTML_TABLE_INI (nHandle,cTit,nWidth,nPading)
HTML_TABLE_LINE (nHandle,aLin)
HTML_BOLD (nHandle,cText)
HTML_END (nHandle)
These functions made a TABLE in HTML. Now I show the source fonts for avaliable and to be included for next relase. Ok Mr. Rathinagiri ?
I hope be enjoyed !
- Attachments
-
- HFCL_SOURCE.rar
- (9.81 KiB) Downloaded 405 times
-
- HFCL_SAMPLES.rar
- (2.76 MiB) Downloaded 410 times
-
- hfcl_include.rar
- (4.66 KiB) Downloaded 393 times
-
- HFCL_DOC.rar
- (286.48 KiB) Downloaded 404 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Underline and italic in PDF seems not work
Gracias Pablo César por tu esfuerzo y compartirlo!
Saludos
Saludos
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Underline and italic in PDF seems not work
Gracias Javier por demonstrar tu interés en el asunto.
Te gustó como quedó el html ?
Te gustó como quedó el html ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Underline and italic in PDF seems not work
Hola Pablo César,
Claro que si Pablo, ya no se ven las lineas punteadas, ahora se ve muy profesional!
Gracias por compartir!
Claro que si Pablo, ya no se ven las lineas punteadas, ahora se ve muy profesional!
Gracias por compartir!
Re: Underline and italic in PDF seems not work
Sorry for the delay. Problems with PC.
MEGA Great ! Thanks so much for BOLD and ITALIC! I test tomorrow. For UNDERLINE we think together a solution.
I've always used hmg_hpdf so I've programs with many lines with SELECT PRINTER, PRINTDOC, PRINT, PRINTPAGE.
It's possible to change hfcl_hmg_hpdf.ch or create new #command to recreate those controls?
example
With hfcl (or hfcl_hmg_hpdf.ch) i can print Euro Sign in a text?
I test with "old" hmg_hpdf.ch with
SET PRINTDOC ENCODING TO "WinAnsiEncoding"
or
SET PRINTDOC ENCODING TO "FontSpecific"
but nothing.
HMGFORUM: a great forum with great and professional international members!
Thank you for existing!
Edit: I look HB_UTF8TOSTR
MEGA Great ! Thanks so much for BOLD and ITALIC! I test tomorrow. For UNDERLINE we think together a solution.
Code: Select all
#include "hfcl.ch"
// #Include "hmg_hpdf.ch" (Not need any more at your PRGS)
It's possible to change hfcl_hmg_hpdf.ch or create new #command to recreate those controls?
example
Code: Select all
#xcommand SELECT PRINTER <cPDFFile> ;
[ <lOrientation : ORIENTATION> <nOrientation> ] ;
[ <lPaperSize : PAPERSIZE> <nPaperSize> ] ;
[ <lPaperLength : PAPERLENGTH> <nPaperLength> ] ;
[ <lPaperWidth : PAPERWIDTH> <nPaperWidth> ] ;
[ <Log : LOG> ] ;
=> ;
_HMG_HPDF_INIT ( <cPDFFile>, if ( <.lOrientation.> , <nOrientation> , 1 ) , if ( <.lPaperSize.> , <nPaperSize> , 1 ) , if ( <.lPaperLength.> , <nPaperLength> , -999 ) , if ( <.lPaperWidth.> , <nPaperWidth> , -999 ) , <.Log.> )
Code: Select all
var1:=test->note // "I would like print € (euro) sign in PDF"
@ 20,20 PRINT var1
SET PRINTDOC ENCODING TO "WinAnsiEncoding"
or
SET PRINTDOC ENCODING TO "FontSpecific"
but nothing.
HMGFORUM: a great forum with great and professional international members!
Thank you for existing!
Edit: I look HB_UTF8TOSTR
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Underline and italic in PDF seems not work
Glad you liked it, hope it will be very useful to you and many others too.Italia1 wrote:MEGA Great ! Thanks so much for BOLD and ITALIC! I test tomorrow. For UNDERLINE we think together a solution.
No problem at all. you can still use it, but is not necessary because it is being included in HFCL. This library belongs to hfcl, this MUST be include.I've always used hmg_hpdf so I've programs with many lines with SELECT PRINTER, PRINTDOC, PRINT, PRINTPAGE.Code: Select all
#include "hfcl.ch" // #Include "hmg_hpdf.ch" (Not need any more at your PRGS)
Many ressource, different libraries. I do not think good idea to include ALL in one. But probably hfcl must be included as part of HMG libraries (not separated) like as BosTaurus library. But this decision it is not mine.It's possible to change hfcl_hmg_hpdf.ch or create new #command to recreate those controls?
This suggestion, do you think is better to pass last parameter as logic type ? Well I tried but I do not found the right way. Seems (in include files) that logical types requires more elaboration. Why are you asking this, this parameter is optional and you can used sometimes, not always.Italia1 wrote:exampleCode: Select all
#xcommand SELECT PRINTER <cPDFFile> ; [ <lOrientation : ORIENTATION> <nOrientation> ] ; [ <lPaperSize : PAPERSIZE> <nPaperSize> ] ; [ <lPaperLength : PAPERLENGTH> <nPaperLength> ] ; [ <lPaperWidth : PAPERWIDTH> <nPaperWidth> ] ; [ <Log : LOG> ] ; => ; _HMG_HPDF_INIT ( <cPDFFile>, if ( <.lOrientation.> , <nOrientation> , 1 ) , if ( <.lPaperSize.> , <nPaperSize> , 1 ) , if ( <.lPaperLength.> , <nPaperLength> , -999 ) , if ( <.lPaperWidth.> , <nPaperWidth> , -999 ) , <.Log.> )
Remember, this library works ONLY with true types fonts. I believe Euro sign is newer that true type fonts, probably all fonts found in Windows does not exist the euro sign (I think so). Probably you will need to find one true type font, which have been re-edited or having euro sign. I can not found here, links are crashing now in my internet now. So try this: http://www.myfonts.com/Article.html may you will find.With hfcl (or hfcl_hmg_hpdf.ch) i can print Euro Sign in a text?I test with "old" hmg_hpdf.ch withCode: Select all
var1:=test->note // "I would like print € (euro) sign in PDF" @ 20,20 PRINT var1
SET PRINTDOC ENCODING TO "WinAnsiEncoding"
or
SET PRINTDOC ENCODING TO "FontSpecific"
but nothing.
Edit: I look HB_UTF8TOSTR
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: Underline and italic in PDF seems not work
Hello! I try compile demo2.prg: make demo2.exe but not make PDF. Your demo2.exe make PDF correctly: what I wrong?Pablo César wrote:Glad you liked it, hope it will be very useful to you and many others too.Italia1 wrote:MEGA Great ! Thanks so much for BOLD and ITALIC! I test tomorrow. For UNDERLINE we think together a solution.
For #command i try tomorrow some tests and post results here. Thank you for your precious opinions! Your opinions is extremely important for me!
I remember that Euro is inserted in almost all the fonts in Windows (I remember as update). I try this solution that's it's ok for me:Pablo César wrote:Remember, this library works ONLY with true types fonts. I believe Euro sign is newer that true type fonts, probably all fonts found in Windows does not exist the euro sign (I think so). Probably you will need to find one true type font, which have been re-edited or having euro sign. I can not found here, links are crashing now in my internet now.With hfcl (or hfcl_hmg_hpdf.ch) i can print Euro Sign in a text?I test with "old" hmg_hpdf.ch withCode: Select all
var1:=test->note // "I would like print € (euro) sign in PDF" @ 20,20 PRINT var1
SET PRINTDOC ENCODING TO "WinAnsiEncoding"
or
SET PRINTDOC ENCODING TO "FontSpecific"
but nothing.
Edit: I look HB_UTF8TOSTR
Code: Select all
SET PRINTDOC ENCODING TO "WinAnsiEncoding"
wrong:=test->note // character field
witheuro:=STRTRAN(wrong, chr(226)+chr(130)+chr(172), chr(128))
I don't know why Euro € in DBF is changed in 3 chars (266 130 172) but for me is the solution. In HMG-IDE, Windows Notepad and in my compiled textbox I found € Sign nor 3 chars. Only in PDF I find (before my solution) 3 chars. I hope it's useful to others.
Bye bye
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Underline and italic in PDF seems not work
You tried to re-build the hmg_hpdf ?Italia1 wrote:I try compile demo2.prg: make demo2.exe but not make PDF. Your demo2.exe make PDF correctly: what I wrong?
In my previous posts I put such modifications would be available in the next update of HMG. But as I have not got any feedback from Rathinagiri on this subject, I made available the source to the public can evaluate and see if such modifications are approved and wish to be included for the new release or not.
For those who want to use and even take tests, must redo the library.
Yesterday I was not much able to access with good performance to internet. I will check this about ansi fonts, true types fonts and also SET PRINTDOC ENCODING commands I will make some test with euro sign at hmg_hpdf. Please wait I shall revert this matter again.Italia1 wrote:I remember that Euro is inserted in almost all the fonts in Windows (I remember as update). I try this solution that's it's ok for me:chr(128) is a Euro Sign in my PC with XP Home OEM and put it correctly in PDF.Code: Select all
SET PRINTDOC ENCODING TO "WinAnsiEncoding" wrong:=test->note // character field witheuro:=STRTRAN(wrong, chr(226)+chr(130)+chr(172), chr(128))
Probably by the same reason that in DBF is not written in UNICODE and euro sign need to be in UNICODE format.Italia1 wrote:I don't know why Euro € in DBF is changed in 3 chars (266 130 172) but for me is the solution. In HMG-IDE, Windows Notepad and in my compiled textbox I found € Sign nor 3 chars. Only in PDF I find (before my solution) 3 chars. I hope it's useful to others.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Underline and italic in PDF seems not work
What I could see for at begining the right command is:Italia1 wrote:I remember that Euro is inserted in almost all the fonts in Windows (I remember as update). I try this solution that's it's ok for me:
Code: Select all
SET PRINTDOC ENCODING TO "WinAnsiEncoding"
SET HPDFDOC ENCODING TO
This command is for hmg_harupdf and you will find at C:\HMG.3.2\hfcl\Include\hfcl_hmg_hpdf.ch
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: Underline and italic in PDF seems not work
I never re-build a lib I try to put new HMG_HPDF.PRG file in project butPablo César wrote:You tried to re-build the hmg_hpdf ?Italia1 wrote:I try compile demo2.prg: make demo2.exe but not make PDF. Your demo2.exe make PDF correctly: what I wrong?
In my previous posts I put such modifications would be available in the next update of HMG. But as I have not got any feedback from Rathinagiri on this subject, I made available the source to the public can evaluate and see if such modifications are approved and wish to be included for the new release or not.
For those who want to use and even take tests, must redo the library.
Code: Select all
fatal error: hpdfcfg.h: No such file or directory - compilation terminated.
Thanks for help. Bye bye.
Last edited by Italia1 on Wed Apr 16, 2014 5:19 pm, edited 2 times in total.
I use the great HMG3.2(stable). Have i nice international HMG to everyone!