HMG_HPDF - Export to PDF made easy... (New Version)

Moderator: Rathinagiri

Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Re: Print EURO sign

Post by Italia1 » Wed Apr 16, 2014 8:28 pm

I'm really confused :oops: . Ok for ENCODING but for all other PRINT command have documentation on HMG Reference. I use this post from Roberto Lopez - Post Re: HMG_HPDF - Export to PDF made easy... (New Version) - viewtopic.php?p=25036#p25036
Roberto Lopez wrote:Hi All,
This is a new version with constants prefix changed to PRINTER, PREVIEW added to SELECT PRINTER, and a new command: OPEN FILE (alias for EXECUTE FILE).

Attachments: pdf.zip [245.6 KiB]
In this file there's hmg_hpdf.ch (9feb2013) with PRINT command :?

Maybe tonight I'm too tired to think. :(

@mustafa viewtopic.php?f=9&t=2497&hilit=hpdf&start=30 is the "old version" in Fri Oct 05, 2012 2:57 pm. I had download in 2013 from Roberto Lopez post n.25036. I'm very confused. Good night dears HMG users
Last edited by Italia1 on Wed Apr 16, 2014 8:36 pm, edited 3 times in total.
I use the great HMG3.2(stable). Have i nice international HMG to everyone!

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Wed Apr 16, 2014 9:54 pm

To Italia1 and others,

To Italia1, please try to not mix topic with the same subject. Try to keep in the same one, in order to start more confusion please... I got readen your message (in other topic) and I understand what you are saying. Let me try to explain for everbody.

I think there is a big mistake or missundertanding or something is missing regarding one instruction from Roberto Lopez which started in this his message.

In short, the proposal of Roberto was to integrate the new commands that Rathinagiri created for hmg_hpdf and make them equal to the regular print commands.

Roberto has public his own hmg_hpdf.ch file and has changed during the same topic several times. This is his last one (I presume).

But.. I do not know if this was implemented. Probably in any previous versions it worked like Roberto has indicated, but I am not sure that this was unified in the previous releases.

I remembered in this my message, I have questioned to Rathinagiri ( but he did not responded, this is becoming quite usal :( ) and from that date seems was used SET HPDF... as like is actually not as Roberto indication.

There is some questions in this message that also is not with any response (sad again). But if you read calmly, you will see this colleague could answer all this questions.
Because his questioning to use BOTH regular print and hmg_hpdf (all together) and this could happen with anyone...

So Italia1, now probably you are resting due time-zone and you seems very tired. But your questioning probably is not be posible to unify commands between regular prints commands with hmg_hpdf ones. Because there is the possibility to use both of it and if you make as Roberto and you are suggesting, without a extra identification or flag, then the system will mix both commands... This is my deductible and if I'm not mistaken, certainly has a lot of sense.

I just want to clarify that I realized those modifications in main goal to validate the true type fonts and I based it on the current version, ie hm.3.2.0

It is always good to deduce that the latest version is more stable. Alias ​​when we speak of stable, always considering also that is subject to modifications, improvements and adaptations for the future.

I hope to be cleared up this matter, ok Italia1 and others ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Post by Italia1 » Thu Apr 17, 2014 9:30 am

Hello! :D
Yesterday I was tired and stressed out because I've probably the CPU broken of main PC, so I apologize if I mixed the post which I never do. Probably I followed only indication of Roberto Lopez and since then I have not stopped (over a year). And 'mainly why I was confused. I ask again apologize to everyone! :oops:
My next sources will try to use the commands HPDF and not the normal PRINT to see if I find myself there. I avoid direct printing and prefer to create PDF then if I must I print it. In short: HMG ecologists programs :mrgreen:

It would probably be advisable to create a thread specific standard commands PRINT Vs. HPDF commands so maybe Roberto Lopez or Rathinagiri can interact. If he want good Pablo César can create it by assemble and moving posts for a better reading of threads.

What I understand is 101% HMG, without even going to read sources (because i've not time). I'm an old Clipper programmer and previously assembler then have pity on my antiquity view. W HMG, my new main compiler! Thank you very much!

Edit: I found the convert string € in my DBF: is the U+20AC Unicode that in UTF-8 is 226 130 172.
The complete converson tables I find in http://utf8-chartable.de/unicode-utf8-t ... -&utf8=dec I hope is useful
I use the great HMG3.2(stable). Have i nice international HMG to everyone!

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Thu Apr 17, 2014 2:03 pm

PeteWG wrote:Actually it yields an exception error.

If my observation is correct and HPDF is really un-able to load fonts, this is a very serious limitation because Base14 fonts are able to display ONLY the latin1 character set, which in fact is of no use for other languages sets -not to mention that Base14 is limited to only three font families (courier, helvetica, times).

However, I have managed to isolate the problem inside hmg_hpdf.prg (lines 235 to 270), and have prepared a function to overcome the problem.
In case you (or anyone else) is interested i could post a working sample here.
On the other hand, if there is no problem at all in your current implementation, it would be very appreciated to enlighten me about the correct way to use .TTF fonts.
Hi Pete, could you make public your corrections ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Thu Apr 17, 2014 2:24 pm

Italia1 wrote:It would probably be advisable to create a thread specific standard commands PRINT Vs. HPDF commands so maybe Roberto Lopez or Rathinagiri can interact. If he want good Pablo César can create it by assemble and moving posts for a better reading of threads.
Hi Italia1, here we can continue to discuss this your question and I made all the concerned messages to here.
Italia1 wrote:
Pablo César wrote:As a far I know, this command SET HPDFDOC ENCODING TO belongs to hmg_hpdf fro long time at least I know since hmg.3.0.46 version... :?
My first approach to THE GREATH HMG, and I look it every day, is the HMG Reference on hmgdoc/data/ and in Print System (on the left) ther's the PRINT command :(
Peraphs I learned from a dated reference :cry: or I look 2 print systems and I preferred the command PRINT and not HPDFPRINT :?
So, why are you questoning to unificate commands, even knowing there is a chance to use regular and hmg_hpdf at same time (both together), which certainly will be mixed commands and some troubles to separate them. Why ?

You said you learned to use as Roberto indication (unificated commands), so my second question is: from which HMG version you have noted this is like this (with unified commands) ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Fri Apr 18, 2014 12:57 pm

PeteWG wrote:Now, I don't know if am doing something badly wrong , but I've had problem when I tried to load/use .TTF fonts.
So, while this line:

Code: Select all

PRINT 'This is in Courier font' font 'Courier' size 18 
works ok, (because it uses the Base14 fonts that are built-in to PDF)

unfortunately this line (which tries to load a *.TTF font file):

Code: Select all

PRINT 'This is in Courier font' font 'Cour.ttf' size 18 
fails.. Actually it yields an exception error.
Hi Pete, this was happening before my previous upgrade. Before was necessary to include ttf path together with file name. Sure this file must be found at Windows as most of it, but need to put "c:\windows\fonts\"+ttf_file_name. But now this is not necessary any more, because I made some improvements validating ttf files (see this attached source file).
PeteWG at PM wrote:
Rathinagiri wrote:Hi Pete,

Please post your fix. That will be definitely useful.
And
Pablo César wrote:Hi Pete, could you make public your corrections ?
It's a long time ago i haven't touched this code. I really don't remember details about the subject.

If my observation is correct and HPDF is really un-able to load fonts, this is a very serious limitation because Base14 fonts are able to display ONLY the latin1 character set, which in fact is of no use for other languages sets -not to mention that Base14 is limited to only three font families (courier, helvetica, times).

However, I have managed to isolate the problem inside hmg_hpdf.prg (lines 235 to 270), and have prepared a function to overcome the problem.
hmg_hpdf.7z
(7.53 KiB) Downloaded 51 times
Hi Pete, thank you for your response and contribution. I have note your changings but as far I have done previously with some more implementations, I think will be ok as is it now which will be in the new HMG release.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Rathinagiri
Posts: 5173
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 136 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Fri Apr 18, 2014 1:57 pm

I am trying to get successfully using Unicode with HMG_HPDF.

Also, in the next release we try to incorporate PDF, Barcode and BosTaurus functionalities into HMG.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bpd2000
Posts: 953
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 127 times
Been thanked: 43 times

Post by bpd2000 » Fri Apr 18, 2014 2:41 pm

Rathinagiri wrote:I am trying to get successfully using Unicode with HMG_HPDF.

Also, in the next release we try to incorporate PDF, Barcode and BosTaurus functionalities into HMG.
It is good news
BPD
Convert Dream into Reality through HMG

User avatar
esgici
Posts: 4346
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 234 times
Been thanked: 80 times
Contact:

Post by esgici » Fri Apr 18, 2014 2:48 pm

bpd2000 wrote:
Rathinagiri wrote:I am trying to get successfully using Unicode with HMG_HPDF.

Also, in the next release we try to incorporate PDF, Barcode and BosTaurus functionalities into HMG.
It is good news
+1
Viva INTERNATIONAL HMG :D

Javier Tovar
Posts: 1274
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar » Fri Apr 18, 2014 4:11 pm

Seria Excelente Rathinagiri! :D :D :D

Saludos

Post Reply