HMG_HPDF - Export to PDF made easy...

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
esgici
Posts: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG_HPDF - Export to PDF made easy...

Post by esgici » Tue Mar 13, 2018 1:52 pm

bpd2000 wrote:
Tue Mar 13, 2018 12:30 pm
WOW!
Thank you Edward...
+1
Viva INTERNATIONAL HMG :D

User avatar
bpd2000
Posts: 1024
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG_HPDF - Export to PDF made easy...

Post by bpd2000 » Tue Mar 13, 2018 2:21 pm

Rathinagiri wrote:
Tue Mar 13, 2018 1:50 pm
Wonderful!

EDward, Can you make it work for unicode encoding also? Especially Indian languages?
+1
BPD
Convert Dream into Reality through HMG

edk
Posts: 341
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HMG_HPDF - Export to PDF made easy...

Post by edk » Wed Mar 14, 2018 2:24 pm

Rathinagiri wrote:
Tue Mar 13, 2018 1:50 pm
EDward, Can you make it work for unicode encoding also? Especially Indian languages?
Hi, Rathi.

I made a PDF natively encoded in UTF-8 (without generating Unicode text as a png file).
sample-1.png
sample-1.png (144.27 KiB) Viewed 674 times
Is the example shown at the top of the PDF page in the Indian alphabet?

Would this solution meet your expectations?
In the utf-8 editor, characters from this font look different than in the resulting PDF. I pasted the characters with the Windows Character Map. :roll:
The other fonts appear in the editor in the same way as in PDF.
DemoUTF.7z
(109.29 KiB) Downloaded 42 times
What I noticed, the built-in PDF fonts (Courier, Helvetica, Times-Roman) can not be used for Unicode encoding. Use TTF fonts.


Circular text printing requires changes for Unicode encoding support.
sample-2.png
sample-2.png (170.99 KiB) Viewed 674 times
Replace the HPDF_CircleText function with the one in the attachment.
demo.7z
(2.09 KiB) Downloaded 58 times
Regards, Edward.
Attachments
DemoUTF.7z
(109.29 KiB) Downloaded 56 times
Last edited by edk on Thu Mar 15, 2018 11:46 am, edited 1 time in total.

User avatar
bpd2000
Posts: 1024
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG_HPDF - Export to PDF made easy...

Post by bpd2000 » Thu Mar 15, 2018 3:16 am

Fantastic
Then you Edward, Today I am out of station, will check the next day
BPD
Convert Dream into Reality through HMG

User avatar
esgici
Posts: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG_HPDF - Export to PDF made easy...

Post by esgici » Thu Mar 15, 2018 4:01 am

Hi friends

Does anyone know who is author of Harbur (not HMG) HaruPDF wrapper ?

I remember he was PritPal Bedi, but sadly I can't found in Harbour docs :(

Or more useful, if possible any doc (at least ReadMe) about Harbur HPDF

TIA
Viva INTERNATIONAL HMG :D

User avatar
gfilatov
Posts: 557
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG_HPDF - Export to PDF made easy...

Post by gfilatov » Thu Mar 15, 2018 8:32 am

esgici wrote:
Thu Mar 15, 2018 4:01 am
Hi friends

Does anyone know who is author of Harbur (not HMG) HaruPDF wrapper ?

I remember he was PritPal Bedi, but sadly I can't found in Harbour docs :(

Or more useful, if possible any doc (at least ReadMe) about Harbur HPDF

TIA
Hi Esgici,
/*----------------------------------------------------------------------*
* *
* HaruLib (x)Harbour Wrappers *
* . *
* http://www.libharu.org/ *
* http://sourceforge.net/projects/libharu/ *
* *
* Pritpal Bedi <pritpal@hotmail.com> *
* *
*----------------------------------------------------------------------*/
You can found the following description in the Harbour changelog also:
2008-05-18 09:21 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbhpdf/harupdf.c
! Fixed all MSVC warnings. Now builds cleanly.

2008-05-18 08:52 UTC+0100 Viktor Szakats (harbour syenar.net)
+ contrib/hbhpdf/Makefile
+ contrib/hbhpdf/make_b32.bat
+ contrib/hbhpdf/make_vc.bat
+ contrib/hbhpdf/make_gcc.sh
+ contrib/hbhpdf/common.mak
+ contrib/hbhpdf/tests/bld_b32.bat
+ contrib/hbhpdf/tests/bld_vc.bat
+ Added build/make files.
; Please test GNU make files.

* contrib/make_b32_all.bat
* contrib/make_gcc_all.sh
* contrib/make_vc_all.bat
+ Added hbhpdf to 'all' make files.
(not yet to GNU make files though)

- contrib/hbhpdf/tests/<data files>
+ contrib/hbhpdf/tests/files/<data files>
* Data files needed for test app moved
to a subdir.

* contrib/hbhpdf/tests/harupdf.prg
! Absolute paths changed to relative ones
(for both input and output ones).
! NumToHex() -> hb_NumToHex()
+ hbct added to lib list because test program
uses SIN()/COS()/TAN() from it.

- contrib/hbhpdf/tests/harupdf.ch
+ contrib/hbhpdf/harupdf.ch
* Moved to main dir.

- contrib/hbhpdf/hpdf.h
- Removed original libharu header. This
will be picked up from the package dir,
along with the rest of the .h files.

* contrib/hbhpdf/harupdf.ch
+ Added self-guard.

* contrib/hbhpdf/harupdf.c
! Fixed a few BCC warnings. It now builds cleanly.
; NOTE: There are a lot MSVC casting warnings and errors left.

; Many thanks for this contrib to Pritpal Bedi.

2008-05-17 18:45 UTC+0800 Pritpal Bedi (pritpal@vouchcac.com)
+ harbour/contrib/hbhpdf
+ harbour/contrib/hbhpdf/harupdf.c
+ harbour/contrib/hbhpdf/hpdf.h
Initial upload of wrappers for HaruPDF Library (http://sourceforge.net/projects/libharu/).
+ harbour/contrib/hbhpdf/tests
+ harbour/contrib/hbhpdf/tests/harupdf.prg
+ harbour/contrib/hbhpdf/tests/harupdf.ch
Test program.
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

User avatar
esgici
Posts: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG_HPDF - Export to PDF made easy...

Post by esgici » Thu Mar 15, 2018 8:53 am

gfilatov wrote:
Thu Mar 15, 2018 8:32 am
...
You can found the following description in the Harbour changelog also
...
Thank you very much Grigory :arrow:

Viva Harbour, viva HMG :D
Viva INTERNATIONAL HMG :D

User avatar
bpd2000
Posts: 1024
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG_HPDF - Export to PDF made easy...

Post by bpd2000 » Thu Mar 15, 2018 10:06 am

edk wrote:
Wed Mar 14, 2018 2:24 pm
Would this solution meet your expectations?
Regards, Edward.
Tested and nearly 100% success, big thanks for your hard work for natively encoded pdf in UTF-8
Some of the characters do not shows properly is a second thing and not mistake of yours
BPD
Convert Dream into Reality through HMG

Post Reply