Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing font-weight in IE

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi all

Developing a Windows application whereby a user can modify the application's forms, and the modified form can be viewed and/or printed as an .html file.

The application programatically creates an .html file and the following snippit is typical of such output.

Code:
<div id ="div_Txttextbox5"
    style="position: absolute;
    left: 118;
    top: 340;
    font-family: Arial;
    font-size: 11pt;
    color: #000000;
    font-weight: lighter;
    background: #FFFFFF">
Textbox value prints here    
</div>
The .html is accurate to the original form with the exception that 'font-weight: lighter;' or 'font-weight: 100;' seems to have little or no effect.

Any workarounds, please?

TIA

FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
All of the browsers support bold and normal, but the bolder, lighter, and numbers are not reliable.

See: CSS Font-weight Property




Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Also don't forget to test in non-IE browsers... I suspect if you had you might have seen odd layout due to your missing unit specifiers:

Code:
left: 118[!]px[/!];
top: 340[!]px[/!];

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
traingamer, BRPS

The total methodology is as follows:-

1. Programmatically create .html file from Windows application.
2. Programmatically print .html file to postcript file
3. Programmatically distill postcript file to .pdf

The shortest route would be to programmatically create the postcript file, but would mean programmatically creating .eps files of any images, etc.

It is an IE specific problem as the user can preview the .html file in a webbrowser control in the Windows application.

Have yet to impliment stages 2 and 3 so unsure as to the appearance of the .pdf which may not be that different from the original.

If all else fails, it means using stages 2 and 3 only.

Have noted both your helpful comments and thanks for your replies.

FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top