HMG_HPDF with pdf417?
Moderator: Rathinagiri
-
- Posts: 30
- Joined: Fri Aug 02, 2013 11:47 am
HMG_HPDF with pdf417?
Hi
How can i make a report with HMG_HPDF with pdf417 codebar?
I don´t know how to use HMG_CreateBarCode, is it possible with ?
Thank you
How can i make a report with HMG_HPDF with pdf417 codebar?
I don´t know how to use HMG_CreateBarCode, is it possible with ?
Thank you
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG_HPDF with pdf417?
Definitely it is possible.
First create a barcode image file by giving the cImageFileName parameter to the HMG_CreateBarCode function. I will make a small sample soon.
First create a barcode image file by giving the cImageFileName parameter to the HMG_CreateBarCode function. I will make a small sample soon.
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.
-
- Posts: 30
- Joined: Fri Aug 02, 2013 11:47 am
Re: HMG_HPDF with pdf417?
Could you show me a piece of this information?
Create a image -> HMG_CreateBarCode and insert it
Thank you
Create a image -> HMG_CreateBarCode and insert it
Thank you
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG_HPDF with pdf417?
Hi,
Please try this!
Please try this!
Code: Select all
#include <hmg.ch>
#include "hfcl.ch"
Function Main
define window barcode at 0, 0 width 400 height 100 title "Barcode PDF Sample" main
define label l1
row 10
col 10
width 100
value 'Enter Barcode'
end label
define textbox t1
row 10
col 110
width 100
end textbox
define button b1
row 10
col 220
caption 'Create PDF'
action createpdf()
end button
end window
barcode.center
barcode.activate
Return
function createpdf
local cImage := 'barcode.png'
local nReturn := 0
local lSuccess := .f.
nReturn := HMG_CreateBarCode( barcode.t1.value,;
"PDF417",;
2,;
100,;
.f.,;
cImage )
if nReturn == 0
msgstop( 'Barcode Creation error!' )
return nil
endif
if file( 'barcode.png' )
SELECT HPDFDOC 'HMG_barcode.pdf' TO lSuccess papersize HPDF_PAPER_A4
if lSuccess
START HPDFDOC
START HPDFPAGE
@ 10, 10 HPDFPRINT IMAGE "barcode.png" WIDTH 172 HEIGHT 78
END HPDFPAGE
END HPDFDOC
endif
endif
return nil
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.
Re: HMG_HPDF with pdf417?
Thank you for working sample
Image can be generated other than PNG format and is valid say .jpg
Image can be generated other than PNG format and is valid say .jpg
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG_HPDF with pdf417?
It is hard coded to be PNG file format. But it can be any extension like jpg, bmp or whatever.
Just change the line appropriately at line no. 59 of \hfcl\source\hmg_zebra.prg
And, don't forget to re-create the library.
Just change the line appropriately at line no. 59 of \hfcl\source\hmg_zebra.prg
And, don't forget to re-create the library.
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.
-
- Posts: 30
- Joined: Fri Aug 02, 2013 11:47 am
Re: HMG_HPDF with pdf417?
Thanks a lot Rathinagiri
It is exacty I was waiting.
Now, I need to define papersize like HPDF_PAPER_USER, How can I do it? 4,00inX2,00in.
Best regards.
It is exacty I was waiting.
Now, I need to define papersize like HPDF_PAPER_USER, How can I do it? 4,00inX2,00in.
Best regards.
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG_HPDF with pdf417?
You can use the following sample for having user defined paper size. The sizes are in millimeters.
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300
SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300
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.