Fit to Page

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
karweru
Posts: 220
Joined: Fri Aug 01, 2008 1:51 pm
DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
Contact:

Fit to Page

Post by karweru »

Hallo folks,

Is there a way to force print to 'fit to page'?
Kind regards,
Gilbert.
User avatar
karweru
Posts: 220
Joined: Fri Aug 01, 2008 1:51 pm
DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
Contact:

Re: Fit to Page

Post by karweru »

Any one can help with this please? I would really appreciate. The image below can illustrate my query better. I usually see such option in Excel
preview.png
preview.png (48.39 KiB) Viewed 3190 times
Kind regards,
Gilbert.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Fit to Page

Post by mol »

I don't think so :)
You can create image with report using BosTaurus and then, resize it to fit the page, maybe such a solution?
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Fit to Page

Post by Rathinagiri »

I think you can use Grid+ library.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
karweru
Posts: 220
Joined: Fri Aug 01, 2008 1:51 pm
DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
Contact:

Re: Fit to Page

Post by karweru »

I found an easy way around this by multiplying the Row,Col,Height,Width,fontsize properties in _HMG_PRINTER_H_*() functions with
min(GetPrintableAreaWidth()/(nProperty+leftMargin*1.5),1). Hope this helps someone.
Kind regards,
Gilbert.
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Fit to Page

Post by dragancesu »

I do not know how to create a report

For matrix printers it was known how much the press is wide, it's a little harder today because the fonts are proportional, but something can

Calculates how much width is in character, it turns into a length. if it is wider then the font is shrinking, it is not difficult to calculate the size of a character in a font

Something similar is your solution
Post Reply