Underline and italic in PDF seems not work
Moderator: Rathinagiri
-
- Posts: 683
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: Underline and italic in PDF seems not work
Excelente Dany !!!!!!!!!
Queda confirmado que el problema es la fuente.-
Abrazo y siempre gracias por compartir.-
Eduardo
Queda confirmado que el problema es la fuente.-
Abrazo y siempre gracias por compartir.-
Eduardo
- mustafa
- Posts: 1162
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: Underline and italic in PDF seems not work
Hola EduardoLuis y y danielmaximiliano
muy agardecido por buestros samples
Daniel: Ok , era la fuente, la que me has mandado
funciona correcto.
Saludos
Mustafa
muy agardecido por buestros samples
Daniel: Ok , era la fuente, la que me has mandado
funciona correcto.
Saludos
Mustafa
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Underline and italic in PDF seems not work
Instead of using ttf fonts for creating barcodes, we can use zebra library to create any type of barcode. Isn't it?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Underline and italic in PDF seems not work
Hi all !
I also have found dificulties to generate pdf thru HARUPDF and I have exaustly study it source fonts for HMG_HARUPDF and I saw the main problem is to VALIDATE the names of fonts regarding:
- Correct name, this must be according Haru array and when is put the pathfile name
- It's properties, when is ITALIC and BOLD
- Localization when is passed path, name and extension.
And all of these points it all works together. So I decided to review the function _HMG_HPDF_SetFont which now is making the right validation and more options was added like as:
_HMG_HPDF_SeekHaruFonts(cFntName,lBold,lItalic)
_HMG_HPDF_SeekEquivalences(cFntName,lBold,lItalic)
_HMG_HPDF_ExistInLocal(cFntName)
_HMG_HPDF_SeekInLocalOptions(cFntName,lBold,lItalic)
FWriteLine( nHandle, cString )
And LOG option to create a text file with all fonts involved in the pdf creation and its reassigned fonts names. This gives to the programmer, the chance to see what font is not passed correctly as parameter in _HMG_HPDF_PRINT.
Some times we pass wrongly name of font. With NO path when we want to load from TTF file unless than this file is in current folder.
Some times we pass wrongly with wrong name. So, there is a _HMG_HPDF_SeekInLocalOptions function which takes the 4 first characters and seek in current folder and in Windows folder, then is reassigned name.
I have added cFilePath to work with cFileNoExt in _HMG_HPDF_SeekInLocalOptions function in order to take the correct pathfile name.
But HARUPDF which is the library, it has a limitation regarding: STRIKEOUT and UNDERLINE properties. In our code, we have both itens, but is not working because HARUPDF works with TTF (True Type Fonts) and this with its limitations.
HARU PDF
Drawing a line for UNDERLINE and STRIKEOUT (suggestion in SourceForge forum)
I also have found dificulties to generate pdf thru HARUPDF and I have exaustly study it source fonts for HMG_HARUPDF and I saw the main problem is to VALIDATE the names of fonts regarding:
- Correct name, this must be according Haru array and when is put the pathfile name
- It's properties, when is ITALIC and BOLD
- Localization when is passed path, name and extension.
And all of these points it all works together. So I decided to review the function _HMG_HPDF_SetFont which now is making the right validation and more options was added like as:
_HMG_HPDF_SeekHaruFonts(cFntName,lBold,lItalic)
_HMG_HPDF_SeekEquivalences(cFntName,lBold,lItalic)
_HMG_HPDF_ExistInLocal(cFntName)
_HMG_HPDF_SeekInLocalOptions(cFntName,lBold,lItalic)
FWriteLine( nHandle, cString )
And LOG option to create a text file with all fonts involved in the pdf creation and its reassigned fonts names. This gives to the programmer, the chance to see what font is not passed correctly as parameter in _HMG_HPDF_PRINT.
Some times we pass wrongly name of font. With NO path when we want to load from TTF file unless than this file is in current folder.
Some times we pass wrongly with wrong name. So, there is a _HMG_HPDF_SeekInLocalOptions function which takes the 4 first characters and seek in current folder and in Windows folder, then is reassigned name.
I have added cFilePath to work with cFileNoExt in _HMG_HPDF_SeekInLocalOptions function in order to take the correct pathfile name.
But HARUPDF which is the library, it has a limitation regarding: STRIKEOUT and UNDERLINE properties. In our code, we have both itens, but is not working because HARUPDF works with TTF (True Type Fonts) and this with its limitations.
HARU PDF
Drawing a line for UNDERLINE and STRIKEOUT (suggestion in SourceForge forum)
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 información muy detallada!
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
Que bien que te gustó Javier, vos siempre tan atento.
Anexé los dos ejemplos que hicieron y adapté poca cosa, solo para poder hacer las lineas simulando STRIKEOUT e UNDERLINE. Los archivos fuentes, serán liberados en la próxima version de HMG 3.2.1, porque no hay como testear con lo que ya está en andamiento.
Hechale una miradita al archivo UsedFonts.txt
Para que el LOG funcione, debes agregarle (futuramente) la palabra "log" al final de:
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
Espero que es gusten.
I am happy you liked, Javier. You are always so attentive.
I am attaching two examples (little adaptetion), just to make the lines simulating STRIKEOUT and UNDERLINE.
The source files will be released in the next version of HMG 3.2.1, because there is no way to test it with actual version, because new version is already in progress.
Please look up at UsedFonts.txt file after PDFs creation
For creation of LOG, you must add (in next release) the word "log" at the end of:
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
I Hope you enjoy it !!
Anexé los dos ejemplos que hicieron y adapté poca cosa, solo para poder hacer las lineas simulando STRIKEOUT e UNDERLINE. Los archivos fuentes, serán liberados en la próxima version de HMG 3.2.1, porque no hay como testear con lo que ya está en andamiento.
Hechale una miradita al archivo UsedFonts.txt
Para que el LOG funcione, debes agregarle (futuramente) la palabra "log" al final de:
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
Espero que es gusten.
I am happy you liked, Javier. You are always so attentive.
I am attaching two examples (little adaptetion), just to make the lines simulating STRIKEOUT and UNDERLINE.
The source files will be released in the next version of HMG 3.2.1, because there is no way to test it with actual version, because new version is already in progress.
Please look up at UsedFonts.txt file after PDFs creation
For creation of LOG, you must add (in next release) the word "log" at the end of:
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
I Hope you enjoy it !!
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
Muy bien Pablo césar, Excelente!
Saludos
siempre tan humilde!Pablo César wrote: y adapté poca cosa
Saludos
-
- 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,
Ya vi el archivo UsedFonts.txt, y lo que observo que cada vez que compilamos se genera ese archivo con los tipos de fuentes y características que se ocupan, pero en qué momento se genera? No lo veo en el *.prg
Saludos
Ya vi el archivo UsedFonts.txt, y lo que observo que cada vez que compilamos se genera ese archivo con los tipos de fuentes y características que se ocupan, pero en qué momento se genera? No lo veo en el *.prg
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. Pero la verdad que los ejemplos fueron pocos los cambios, no se compara con el trabajo que me dió con HMG_HPDF.Prg.Javier Tovar wrote:Muy bien Pablo césar, Excelente!
siempre tan humilde!Pablo César wrote: y adapté poca cosa
En este momento, no estoy disponibilizando el source porque iria precisar hacer muchos cambios e iria causar mucha confusion si la actualizacion. Pero ahora si compilas, no irás a generar tal archivo, visto que falta la biblioteca y algunos fuentes.Javier Tovar wrote:Ya vi el archivo UsedFonts.txt, y lo que observo que cada vez que compilamos se genera ese archivo con los tipos de fuentes y características que se ocupan, pero en qué momento se genera? No lo veo en el *.prg
Pero cuando salga la version HMG.3.2.1 solo precisarias adicionar la palabra "LOG" al final de la linha donde empiezas el relatório. Exactamente aqui:
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG
Fijate, en color rojo. Como ya habia mencinado en mi mensaje anterior.
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
OK Pablo César Visto y anotado!
Saludos
Saludos