Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Fontsize if printing from Explorer
Fri, Mar 8 2019 3:08 AMPermanent Link

Ronald

Hi,

I use a TBrowser to show a simple textreport in a htmlpage. If I print this in Firefox or Chrome the fontsize is correct, but if I print this in Explorer the fontsize is much smaller. I have tried adjusting the HTML like: font-size: large instead of font-size: 20px, but it keeps being smaller in print. I also checked if Explorer has a setting to "Fit to print", but that was not acivated too. Has anyoe come across this and have you solved it?

Greetings,
Ronald
Fri, Mar 8 2019 9:15 AMPermanent Link

Walter Matte

Tactical Business Corporation

I do all reports/printing via PDF's to avoid these issues.

Walter
Fri, Mar 8 2019 1:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< I use a TBrowser to show a simple textreport in a htmlpage. If I print this in Firefox or Chrome the fontsize is correct, but if I print this in Explorer the fontsize is much smaller. I have tried adjusting the HTML like: font-size: large instead of font-size: 20px, but it keeps being smaller in print. I also checked if Explorer has a setting to "Fit to print", but that was not acivated too. Has anyoe come across this and have you solved it? >>

You can use CSS declarations to control how HTML is printed in an embedded browser control:

https://www.smashingmagazine.com/2011/11/how-to-set-up-a-print-style-sheet/

Just include the CSS via the HTML that is being loaded into the TBrowser control, and that should do what you want.

Tim Young
Elevate Software
www.elevatesoft.com
Sat, Mar 9 2019 4:35 AMPermanent Link

Ronald

Tim Young [Elevate Software] wrote:

<<You can use CSS declarations to control how HTML is printed in an embedded browser control:>>

I Tim, I tried this and I can now get another size when printing (I never used @media before). But unfortunately there still is a big difference between Explorer en for eample Firefox. Explorer alwijs prints the font much smaller.

I hope Microsoft will soon use Chromium as they promised. I think I wil just add a checkbox to ask for a bigger font when printing.

@Walter I understand why you use .PDF, but that is a lot more work for a print.

Greetings,
Ronald
Image