HMG_HPDF - Export to PDF made easy...
Moderator: Rathinagiri
Re: HMG_HPDF - Export to PDF made easy...
Now no need to "Print Preview", code directly using HMG_HPDF,
better & best way for Print Preview
Thank you to Rathi for simple codeing method
better & best way for Print Preview
Thank you to Rathi for simple codeing method
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: HMG_HPDF - Export to PDF made easy...
I want to refresh this topic, because I have a problem with embedding font into .pdf file.
I'm using Arial Narrow font - it is non stardard window font. But my installlation program installs it.
Everything is OK when I'm printing document. But, If I export this document do PDF, Arial Narrow is changed with normal Arial font.
I've tried to add font file to .pdf by command
but without success.
Can anybody help me?
I'm using Arial Narrow font - it is non stardard window font. But my installlation program installs it.
Everything is OK when I'm printing document. But, If I export this document do PDF, Arial Narrow is changed with normal Arial font.
I've tried to add font file to .pdf by command
Code: Select all
HPDF_LoadTTFontFromFile( _HMG_SYSDATA[ 150 ][ 1 ], MyExePath+"\arialn.ttf", .T.)
Can anybody help me?
-
- Posts: 683
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: HMG_HPDF - Export to PDF made easy...
Hi Mol:
You don't need to previously load the font.-
The font file you want to use must be inside the root/folder of your app.-
Take a look a HPDF sample (line 459 - 460).-
I apply these on my app with font types that don't exist on Windows fonts folder (all print outputs of my app are PDF and some of them really complex).-
It works with no difficulty
Hoping these helps you
With regards.
Eduardo
You don't need to previously load the font.-
The font file you want to use must be inside the root/folder of your app.-
Take a look a HPDF sample (line 459 - 460).-
I apply these on my app with font types that don't exist on Windows fonts folder (all print outputs of my app are PDF and some of them really complex).-
It works with no difficulty
Hoping these helps you
With regards.
Eduardo
Re: HMG_HPDF - Export to PDF made easy...
My font file is places in application root directory, but it's not linked in .pdf file.
Maybe because it's installed in Windows, too?
Maybe because it's installed in Windows, too?
-
- Posts: 683
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: HMG_HPDF - Export to PDF made easy...
Hi Mol:
I think it doesn't matter if font file is inside Windows font file.-
Is really well writen the font filename ??
As i see on my Windows, arial narrow filena name is "ARIALN.TTF" all in Capital Letter.-
Check that.
Hopping these helps you.
Edudardo
I think it doesn't matter if font file is inside Windows font file.-
Is really well writen the font filename ??
As i see on my Windows, arial narrow filena name is "ARIALN.TTF" all in Capital Letter.-
Check that.
Hopping these helps you.
Edudardo
Re: HMG_HPDF - Export to PDF made easy...
Can you try to generate pdf via this code:
Code: Select all
@ 20,20 HPDFPRINT "test font ARIAL- ABCDEFGHIJKLMNOP" ;
FONT "ARIAL" ;
SIZE 12 ;
COLOR BLACK
@ 25,20 HPDFPRINT "test font ARIAL NARROW - ABCDEFGHIJKLMNOP" ;
FONT "ARIAL NARROW" ;
SIZE 12 ;
COLOR BLACK
-
- Posts: 683
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: HMG_HPDF - Export to PDF made easy...
Hi Mol:
Here you get the code.-
Just for your info, i have Arial Narrow on my Win font, but you can include the font file on your app root directory
Hopping these helps you.
With Regards.
Eduardo
Here you get the code.-
Just for your info, i have Arial Narrow on my Win font, but you can include the font file on your app root directory
Hopping these helps you.
With Regards.
Eduardo
Re: HMG_HPDF - Export to PDF made easy...
Works OK, thanks Eduardo.
I didn't know I must use font filename directly.
But, now, I have a problem - In my app user decides which font is used to generate report. He selects windows font name.
Is it possible to get font filename from using windows font name?
I didn't know I must use font filename directly.
But, now, I have a problem - In my app user decides which font is used to generate report. He selects windows font name.
Is it possible to get font filename from using windows font name?
Re: HMG_HPDF - Export to PDF made easy...
It's stange - when I select other exotic font to print text - pdf contains this font.
When I use "Arial Narrow" - it uses ordinary ARIAL
When I use "Arial Narrow" - it uses ordinary ARIAL
Re: HMG_HPDF - Export to PDF made easy...
Hi, all
I finally have hpdfprint working nicely, but have problem to set globle font size from 12 to 10. is there a way like
SET HPDFDOC FONT SIZE TO 10 at start of document. Must be a way.
Thanks in advance, Franco
I finally have hpdfprint working nicely, but have problem to set globle font size from 12 to 10. is there a way like
SET HPDFDOC FONT SIZE TO 10 at start of document. Must be a way.
Thanks in advance, Franco
All The Best,
Franco
Canada
Franco
Canada