Fit to Page

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
karweru
Posts: 152
Joined: Fri Aug 01, 2008 1:51 pm
Been thanked: 2 times
Contact:

Fit to Page

Post by karweru » Tue Feb 16, 2016 12:11 pm

Hallo folks,

Is there a way to force print to 'fit to page'?
Kind regards,
Gilbert.

User avatar
karweru
Posts: 152
Joined: Fri Aug 01, 2008 1:51 pm
Been thanked: 2 times
Contact:

Post by karweru » Wed Feb 08, 2017 1:35 pm

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 799 times
Kind regards,
Gilbert.

User avatar
mol
Posts: 2913
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 149 times
Been thanked: 82 times
Contact:

Post by mol » Wed Feb 08, 2017 1:37 pm

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: 5193
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 150 times
Been thanked: 138 times
Contact:

Post by Rathinagiri » Wed Feb 08, 2017 6:48 pm

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: 152
Joined: Fri Aug 01, 2008 1:51 pm
Been thanked: 2 times
Contact:

Post by karweru » Sun Dec 24, 2017 7:49 am

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: 489
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 75 times

Post by dragancesu » Mon Dec 25, 2017 8:32 am

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