|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
Hi, separate topic here, I think I must be doing something wrong but can't figure out what. I have css styles set to font family = arial narrow and anywhere it is specified throughout the html I set font-family to arial narrow. But - the pdf has arial narrow and times new roman for its font. The title on the table of contents is in Times New Roman entries in table of contents are arial narrow page number is times new roman Headers and footers are in Times new Roman (headers are not showing up in the demo, no problem) the titles of each section in the manual (centered across) are in times new roman Headings in the manual (right side of vertical line) are in arial narrow the body of each heading (left side of vertical line) is in times new roman Can you tell where this is coming from? You can see the demo at http://pakatrak.ipower.com/2009_HRDirector/ConvertwithEO.aspxand the css is found at http://pakatrak.ipower.com/2009_HRDirector/html/BEPolicyStyle.cssand the htm doc is found at http://pakatrak.ipower.com/2009_HRDirector/html/policymanual1002.htmFYI: the htm file displays correct font if you look at it before conversion. So I must be doing something in the conversion? Thanks for any help, Becky
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, Please try to strip down your test file/code into a minimum test project to demonstrate the problem. For example, if you have the following HTML code:
Code: HTML/ASPX
<p style="font-family: Arial Narrow;">
some text here
</p>
And you feed it straight to the HTML to PDF converter but it comes out as Times New Roman, then we would certainly look into it. However if you have some CSS errors, or some code elsewhere in your project that "overrides" this settings then you would certainly need to find out what that is and correct that. We can point you to the right direction but we won't be able to afford to debug your page every time you run into such issues --- eventually you have to know how to debug such issues yourself. So please try to isolate the problem into a minimum test file/project and we will be happy to take a look once you have that. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
OK, I have stripped my htm file down to show what it is supposed to look like but not have much content. I have run it through the W3C CSS validation tool and it validates as level 3 css. It looks the way I want it to when I open it as an html file. It looks the way I want it to if I run it through the winnovative demo (pdf Creator, url to pdf) It looks the way I want it to when I look at it in visual studio. But if I run my code on it (to put headers/footers/toc page numbers, etc) it is not right. And if I run it through the essential objects demo (html url to pdf) it is not right. It is much closer than yesterday. Only 3 things are wrong. 1. font of toc entries is Times New Roman - should be arial narrow 2. font of text on left (content body) is Times New Roman - should be arial narrow 3. First heading (Introduction to Manual) has a 'page-break-always' like all the other section headings but that one does not go to a new page (the other ones work as expected) My htm file is as follows: css:
Code: HTML/ASPX
body{font-family:"Arial Narrow", Arial, sans-serif; font-size:0.95em; margin:5px; padding:0;}
input, form, textarea
h1, h2, h3, h4, h5, h6{margin:0; padding:0; font-family:"arial narrow";}
/*h1{font-size:19px; text-align:left; text-transform:uppercase; text-decoration:none; font-size:15px; color:Black;}*/
h1{font-size:1.05em; font-weight: bold; text-transform:uppercase; text-decoration:none; }
h2{font-size:1.05em; text-align: center; font-style: italic; text-transform:uppercase;}
h3{font-size:0.95em; text-align: left; text-transform:uppercase; padding:4px 0;}
h4{font-size:0.95em; }
/*a:link, a:visited{color:#0033CC; color:#999999; }
a:hover{text-decoration:none;}*/
a.contents{text-decoration:none; font-size:0.95em; color:Black; font-family:"arial narrow";}
div
{
font-family: "arial narrow";
}
p{
font-size : 0.95em;
font-family:"arial narrow", "Arial", "Sans-Serif";
margin-right: 5px;
margin-bottom: 0px;
margin-top: 10px;
}
p.MsoNormal
{ margin:0px 10px 0px 0px;
}
td
{ border: #000000 1px solid;
font-size: 11pt;
font-family: arial narrow;
padding-left: 3px;
}
ul
{ margin-top: 0px;
margin-bottom: 0px;
}
ol
{ margin-top: 0px;
}
/*div{margin-top: 10px;}*/
/* ------------------------------
PAGE STRUCTURE
------------------------------ */
/* #container has an absolute width (780 pixel) */
#container{width:780px; margin:0 auto; }
/*#topbar{width:735px; display:block; padding:10 10 10 10; height:auto; text-align:center; font-size:22px; text-transform:uppercase; font-weight:bold;}*/
#topbar{width:688px; display:block; padding:10px 10px 10px 0px; height:auto; text-align:center; font-size:1.4em; text-transform:uppercase; }
#navbar{width:auto; display:block; height:28px;}
#navbar a{height:28px; line-height:28px; padding:0 8px; display:inline;}
#main{width:688px; display:block; padding:10px 10px 10px 10px; padding-top:25px 0;}
#column_left{width:470px; margin-top:10px; float:left; font-family:arial narrow; font-size:0.95em; padding-right: 10px; border-right: 1px solid black;}
#column_right{width:198px; margin-top:10px; margin-left: 5px; float:left; font-size:1.2em; font-weight:bold; text-align:left; font-style:italic; text-transform:uppercase;}
#column_right_adsense{width:0px; float:left;}
#column_leftacross{width:688px; text-align: center; margin-top:10px; font-size:1.2em; page-break-before:always; padding-right: 10px; }
#column_leftwide{width:688px; margin-top:10px; float:left; font-size:0.95em; }
#column_leftnarrow{width:450px; margin-top:10px; float:left; font-size:0.95em; }
div.spacer{clear:both; height:1px; display:block;}
#footer{width:735px; display:block; padding:10px 0; font-size:.07em; color:#666666;}
policyManual:
Code: HTML/ASPX
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<link rel="stylesheet" href="BEPolicyStyle.css" type="text/css"/>
</head>
<body>
<div style="width:688px; margin-top:5px; float:left; font-size:1.2em;">
<h1 style="text-align:center; font-family:arial narrow, Arial, Sans-Serif">
<b>POLICY MANUAL<br />TABLE OF CONTENTS</b>
</h1>
<h2 style="text-align: center; font-weight:normal; font-family:arial narrow, Arial, Sans-Serif">
<br /> <br /><em>PRINTED: 5/29/2012</em>
</h2><br /><br /><br />
<h3 style="text-align:left; font-weight:normal; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_1_ID" class="contents" href="#INTRODUCTION TO MANUAL"><strong>INTRODUCTION TO MANUAL</strong></a><br />
<a style="padding-left: .2in; text-indent: .2in" id="TOCEntry_2_ID" class="contents" href="#INTRODUCTION TO POLICIES">INTRODUCTION TO POLICIES</a><br />
<a style="padding-left: .2in; text-indent: .2in" id="TOCEntry_3_ID" class="contents" href="#DISTRIBUTION OF MANUAL">DISTRIBUTION OF MANUAL</a><br />
<a style="padding-left: .2in; text-indent: .2in" id="TOCEntry_4_ID" class="contents" href="#OUR PHILOSOPHY">OUR PHILOSOPHY</a><br />
<a id="TOCEntry_5_ID" class="contents" href="#EMPLOYMENT PRACTICES"><strong>EMPLOYMENT PRACTICES</strong></a><br />
</h3></div>
<div id="main">
<div id="column_leftacross" style="page-break-before:always">
<h1 style="text-align: center; font-weight:bold; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_1_Target_ID" name="INTRODUCTION TO MANUAL" class="bookmark">
INTRODUCTION TO MANUAL</a>
</h1></div>
<div id="column_left" style="font-family:arial narrow, Arial, Sans-Serif">
<p><span style="font-size: 11pt; font-family: arial narrow;"><span style="color: #000000;">This manual serves as a ready reference for doctor and employees. It is a summary of personnel policies, procedures and employee benefits. It is designed to be a working guide for the administration of a consistent and fair personnel program. Please read it carefully and learn its contents.</span></span></p>
</div>
<div id="column_right">
<h1 style="font-weight:bold; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_2_Target_ID" name="INTRODUCTION TO POLICIES" class="bookmark">INTRODUCTION TO POLICIES
</a>
</h1>
</div>
<div class="spacer"></div>
<div id="column_left" style="font-family:arial narrow, Arial, Sans-Serif">
<p><span style="font-size: 11pt; font-family: arial narrow"><span style="color: #000000;">This Personnel Policy Manual is the property of the practice and is located in a designated place within the practice for easy referral. Please do not remove the manual from the premises.</span></span></p>
</div>
<div id="column_right"><h1 style="font-weight:bold; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_3_Target_ID" name="DISTRIBUTION OF MANUAL" class="bookmark">DISTRIBUTION OF MANUAL
</a>
</h1>
</div>
<div class="spacer"></div>
<div id="column_left" style="font-family:arial narrow, Arial, Sans-Serif">
<p><span style="font-size: 11pt; font-family: arial narrow"><span style="color: #000000;">Our aim is to provide each patient with the finest care in a professional environment that inspires trust and confidence. We have learned that a patient follows the doctor’s recommendations in direct proportion to the level of trust perceived to exist between the doctor and the employees. We therefore encourage you to share your ideas, opinions, and feelings so we can be sure to keep the channels of communication open.</span></span></p>
</div>
<div id="column_right"><h1 style="font-weight:bold; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_4_Target_ID" name="OUR PHILOSOPHY" class="bookmark">OUR PHILOSOPHY
</a>
</h1>
</div>
<div class="spacer"></div>
<div id="column_leftacross" style="page-break-before:always">
<h1 style="text-align: center; font-weight:bold; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_5_Target_ID" name="EMPLOYMENT PRACTICES" class="bookmark">
EMPLOYMENT PRACTICES
</a></h1></div>
<div id="column_left" style="font-family:arial narrow, Arial, Sans-Serif">
<p><span style="font-size: 11pt; font-family: arial narrow"><span style="color: #000000;">We believe that the strength and future growth of the practice depends directly upon the contributions made by every employee. We also know that high productivity and efficiency depend on individual job satisfaction and happiness.</span></span></p>
</div>
<div id="column_right">
<h1 style="font-weight:bold; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_6_Target_ID" name="EMPLOYER-EMPLOYEE RELATIONS" class="bookmark">EMPLOYER-EMPLOYEE RELATIONS
</a>
</h1>
</div>
<div class="spacer"></div>
<div id="column_leftacross" style="page-break-before:always">
<h1 style="font-weight:bold; text-align: center; font-family:arial narrow, Arial, Sans-Serif">
<a id="TOCEntry_106_Target_ID" name="DESIGNATED NAME(S)" class="bookmark">
DESIGNATED NAMES</a>
</h1>
<p class="MsoNormal" style="margin: 0in 0in 0pt"><span style="font-size: 11pt; color: black; font-family: arial narrow"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: justify"><strong><span style="font-size: 11pt; color: black; font-family: arial narrow"> </span></strong></p>
</div>
</div>
</body></html>
I don't think there is anything wrong with the code since the converter on the demo is creating the same pdf with the same errors so it must be something in the html. I sure would appreciate anything helpful you have to say. Thank you! Becky
|
|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
and url to run htm file in any demo is: pakatrak.ipower.com/2009_HRDirector/html/policymanual1002.htm
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We tested the two files you posted with IE, Chrome and our converter. All three show Airal Narrow correctly here. So I am not sure what we can tell you on that one. We tested by saving the CSS into a CSS file, saving the HTML into an HTML file, then put them both in the same directory. We tested it with browsers by opening that HTML directly; And tested our converter by running Demo -> Convert Url with the HTML file name.
As to the page-break-always, you will want to trim down your HTML further and find out what triggered that. page-break-always may be overridden by another conflicting instructions. For example if you have exactly two columns of text and the left column says "page break avoid" and the right side says "page break always", then either way you go one of them is going to win and another one is going to lose.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
Yes, the font is fine when you bring up just the html file.
But when I run it through essential objects converter there are just a couple problems. Some of the document is in Arial Narrow. But if you look closely you will notice that the table of content entries (INTRODUCTION TO MANUAL, ..) is in Times New Roman
Then you will see the section heading for Introduction to Manual which is correct (but not on a new page)
Then you will see the text "This manual serves as a ready reference...." - this is also in Times New Roman
The next heading "Introduction to Policies and all the other headings are correct.
But all the small text on the left is in Times New Roman.
If you don't see it, I guess there is nothing you can do to help.
Thanks for all the time you have spent on this!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You are very welcome. You might just want to go with another vendor then. Frankly speaking, we do not believe there is any issue with font about our products here ----- that's one of the most basic things and a lot of users would be complaining if that is not working right. So we still think the problem is somewhere else. However regardless where the problem is, the situation is exactly like you said, we can't do anything until we can see it. Since it appears winnovative always give you a result closer to what you wanted, I would think they might be a better choice for your situation as using them might be able to save both of us a lot of time. We wish you best luck with your project.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
We have been using Winnovative, that is why the html is so compatible. But they do not support IE9 browsers on the server and we are using a shared server so our product does not format correctly when there are multiple pages. They actually have a new product which produced an error for us that no one could solve. I was very excited about your product since it is browser independent. I was only comparing to show the way I want the document to look. I think Winnovative is very lax in processing html and you are very strict which is why there are some differences. And I am not an html expert. Therefore the frustration when what worked so well on one product is not working on another.
But not your problem - I'll figure something out.
Thanks again - and just so you know - I think your product is great - very clean, very nice margins, lots of possibilities with the low level content objects.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
I see. That's one of the main problems with some other converters on the market ---- they run on IE's engine, which breaks when user update their browser to IE 9 since IE 9 removed one of the key undocumented interface they've been using.
We use a different engine and our engine is embeded in our DLL. So we will work fine no matter what version of IE you are running, or even if you completely remove IE from your machine. Our egnine works the same way as Google Chrome does. So if you wish to dig into this further, make sure you use Google Chrome, not IE to verify your HTML.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
Hi, I have figured out a couple things.
The converter works perfectly on my local machine.
The places where I am seeing the incorrect font when running on the server are places where the font is set to "font-family:arial narrow" only
The places where I am seeing the correct font when running on the server are places where the font is set to "font-family:arial narrow, arial, sans-serif"
Therefore I am wondering if the font "arial narrow" is not on the server I am trying to run the application on. If it is not, do I just need to install that font on the server? Or is there some setting in the htmlconverter I can set?
Thanks, Becky
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi Becky,
Your observation makes perfect sense. That's what you will get when the font is missing on your server --- the PDF converter will try to "substitute" the missing font with something else (part of that process is done by Windows so we do not really have a lot of control over it).
In that case you will need to install the font on the server. Another possibility is the font is installed on the server but you do not have the permission to access it. You would often run into this problem if you try to run the converter from a scheduler task on Windows 7 and in that case, check the task's "Run with highest privileges" option will allow your application to "see" this font.
We will also try to run the same page on different servers at this to see if we can see the same problem or find anything else. If we see anything else, we will let you know.
Thanks!
|
|