Forum Bugs

PRINCE ALIGNMENT ISSUE

deb_butan
I am getting alignment issue while creating HTML to PDF file. The content of the file going towards right side.
I am attaching the HTML file as well as the generated PDF file.

You guys can take a look and let me know the steps I need to follow.

*** Attachment of html file giving some issue, so I am copy paste the file content here.



<!DOCTYPE HTL PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>



























<TITLE>ABCD.com</TITLE>



<style>
.Mail {FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial; BACKGROUND-COLOR: #ffffff}
.Mail_title {{FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #3f505e; FONT-FAMILY: verdana}
.Mail_heading {{FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #003366; TEXT-ALIGN: right; FONT-FAMILY: arial}
.Mail_normal {FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial}
.Mail_italic {FONT-STYLE: italic; FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial}
.Mail_coupon {{FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial}
.text_footer {FONT-SIZE: 7pt; COLOR: #003366; FONT-FAMILY: verdana}
.text_orange_link {FONT-SIZE: 8pt; COLOR: #ff6600; FONT-FAMILY: arial}
</style>


<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<META name="title" content="">
<META name="description" content="Search or browse up-to-the-minute local deals and offers from local businesses in cities across the United States.">
<META name="keywords" content="Yellow pages, Internet yellow pages, local offers, local deals, local businesses, local search, local advertising, internet advertising, classifieds, business listings, animals & pets, apparel, fashion, jewelry, attorneys, automotive, cars, auto repair, auto service, auto parts, car service, car repair, car parts, beauty & personal care, business opportunities, business services, employment, garage sales, computers, dentists, electronics, photo, finance, insurance, furniture, government, politics, health, fitness, home, home improvement, personal services, physicians, surgeons, real estate, restaurants, shopping, collectibles, sports & recreation, toys, hobbies, travel">
<META name="zipcode" content="">
<META name="city" content="">
<META name="state" content="">
<META name="metropolitan area" content="">
<META name="country" content="United States">
<META name="ICBM" content="">
<META name="copyright" content="2004 ABCD.com. All rights reserved. Duplication of any content on this site is prohibited.">
<META name="robots" content="all">
<META name="revisit-after" content="14 days">
<META name="distribution" content="global">
<META name="document-classification" content="general">
<META name="rating" content="general">
<META name="GENERATOR" content="MSHTML 6.00.2800.1400">


</HEAD>



<body>



<table width="776" cellspacing="2" cellpadding="1" border="0"><tr><td id="begin"><!-- BEGIN BODY ENVELOPE -->






<!-- Header -->
<div id="header_06">
<style>
div#header_06 {
background-image:url(http://ABCD123.dyn.wh.ABCD.com/cobrands/0/images/email_header_base.gif);
background-repeat:repeat-x;
height:70px;
width:776px;
margin:0;
padding:0;
font-family:Arial, Helvetica, sans-serif;
font-size:x-small;
}
div#header_06 a { color:#8C817A; text-decoration:none; }
div#header_06 a:hover { color:#DD5410; }
div#header_06 div#header-logo {
float:left;
padding-left:80px;
width:117px;
height:70px;
}
div#header_06 div#header-nav {
float:left;
width:380px;
margin-left:30px;
margin-top:40px;
}
div#header_06 div#header-nav td {
font-size:12px;
text-align:center;
}
</style>
<div id="header-logo"><a target="_" href="http://ABCD123.dyn.wh.ABCD.com/register/campaign_central.php"><img src="http://ABCD123.dyn.wh.ABCD.com/register/images/rl_logo_de.png" border="0" alt="text text text text text text textunternehmen" /></a></div>
<div id="header-nav">
<table cellspacing="5" border="0" cellpadding="1" width="300">
<tr>
<td>&nbsp;</td>
</tr>
</table>

</div>
</div>
<!-- /Header -->








<TABLE width=100% cellspacing=0 cellpadding=0 border=0 bgcolor=white>

<TR><!-- BEGIN MAIL BOX -->

<TD width=4%></TD><!-- Left vertical spacing -->

<TD><table width=100% cellspacing=0 cellpadding=0 border=0 bgcolor=white><!-- BEGIN MAIL ENVELOPE -->




<!-- BEGIN MAIL BODY -->

<tr><td class=mail>
<div style="margin:15px 0px 15px 0px; ">

<p style="font-family: Sazanami Mincho, arial">キャンペーンリンク先ページからお text text text text text text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text text

. text text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text text.</p>


<p><table class=mail cellspacing=0 cellpadding=1 border=0 width=30%>


<tr><td align=right>text text gesamt:</td><td align=right>€</td></tr>




</table></p>






<p class=text_footer>ANMERKUNG: text text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext.</p>

text text text Grüßen<br>
Ihr ABCD-Team
</div>
</td></tr>

<!-- END MAIL BODY -->

<TR>

<TD class=text_footer valign=center align=middle>


<BR><A class=text_orange_link href="http://ABCD123.dyn.wh.ABCD.com/?mid=14&cb=2488&cb=2488"
target="_top">Zurück zu ABCD</A><BR>&nbsp;</TD>

</TR>



<tr>
<td class=mail align=center>

ABCD GmbH, Neues Kranzler Eck, Ktext textext 223, text Berlin.<br>

<a href="http://ABCD123.dyn.wh.ABCD.com/register/unsubscribe.php?email=emailtest@ABCD.com&cb=2488&campId=&advId=">Abmeldung</a>
<td>
</tr>

<TR>
<TD align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:7pt; color:#8C817A;">
text text text text text text diese E-Mail-Kotext text text text text text werden.</a>
</TD>
</TR>



</table></td><!-- END MAIL ENVELOPE -->

<TD width=4%></TD><!-- Right vertical spacing -->

</tr></table><!-- END MAIL BOX -->






<!-- Footer -->
<div id="footer_06">
<style>
div#footer_06 div#footer-content td {
color:#8C817A;
font-size:8pt;
padding-right:6px;
}
td {
font-size:11px;
}
</style>
<div id="footer-content">
<table border="0" style="text-align:center;margin-left:auto;margin-right:auto;">
<tr>
<td><a href="http://www.ABCD.de/%C3%BCber-ABCD ">Über ABCD</a></td>
<td><img src="/register/images/06/footer_nav_separator.gif" border="0" alt="" /></td>
<td><a href="http://www.ABCD.de/kontakt">Kontaktieren Sie ABCD</a></td>
<td><img src="/register/images/06/footer_nav_separator.gif" border="0" alt="" /></td>
<td>&copy; 2011 ABCD GmbH. Alle ABCDEFGHIJKLM.</td>
</tr>
</table>
</div>
</div>
<!-- /Footer -->







</td></tr></table><!-- END BODY ENVELOPE -->



</body>
</html>

<!DOCTYPE HTL PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>



























<TITLE>ABCD.com</TITLE>



<style>
.Mail {FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial; BACKGROUND-COLOR: #ffffff}
.Mail_title {{FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #3f505e; FONT-FAMILY: verdana}
.Mail_heading {{FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #003366; TEXT-ALIGN: right; FONT-FAMILY: arial}
.Mail_normal {FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial}
.Mail_italic {FONT-STYLE: italic; FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial}
.Mail_coupon {{FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #003366; FONT-FAMILY: arial}
.text_footer {FONT-SIZE: 7pt; COLOR: #003366; FONT-FAMILY: verdana}
.text_orange_link {FONT-SIZE: 8pt; COLOR: #ff6600; FONT-FAMILY: arial}
</style>


<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<META name="title" content="">
<META name="description" content="Search or browse up-to-the-minute local deals and offers from local businesses in cities across the United States.">
<META name="keywords" content="Yellow pages, Internet yellow pages, local offers, local deals, local businesses, local search, local advertising, internet advertising, classifieds, business listings, animals & pets, apparel, fashion, jewelry, attorneys, automotive, cars, auto repair, auto service, auto parts, car service, car repair, car parts, beauty & personal care, business opportunities, business services, employment, garage sales, computers, dentists, electronics, photo, finance, insurance, furniture, government, politics, health, fitness, home, home improvement, personal services, physicians, surgeons, real estate, restaurants, shopping, collectibles, sports & recreation, toys, hobbies, travel">
<META name="zipcode" content="">
<META name="city" content="">
<META name="state" content="">
<META name="metropolitan area" content="">
<META name="country" content="United States">
<META name="ICBM" content="">
<META name="copyright" content="2004 ABCD.com. All rights reserved. Duplication of any content on this site is prohibited.">
<META name="robots" content="all">
<META name="revisit-after" content="14 days">
<META name="distribution" content="global">
<META name="document-classification" content="general">
<META name="rating" content="general">
<META name="GENERATOR" content="MSHTML 6.00.2800.1400">


</HEAD>



<body>



<table width="776" cellspacing="2" cellpadding="1" border="0"><tr><td id="begin"><!-- BEGIN BODY ENVELOPE -->






<!-- Header -->
<div id="header_06">
<style>
div#header_06 {
background-image:url(http://ABCD123.dyn.wh.ABCD.com/cobrands/0/images/email_header_base.gif);
background-repeat:repeat-x;
height:70px;
width:776px;
margin:0;
padding:0;
font-family:Arial, Helvetica, sans-serif;
font-size:x-small;
}
div#header_06 a { color:#8C817A; text-decoration:none; }
div#header_06 a:hover { color:#DD5410; }
div#header_06 div#header-logo {
float:left;
padding-left:80px;
width:117px;
height:70px;
}
div#header_06 div#header-nav {
float:left;
width:380px;
margin-left:30px;
margin-top:40px;
}
div#header_06 div#header-nav td {
font-size:12px;
text-align:center;
}
</style>
<div id="header-logo"><a target="_" href="http://ABCD123.dyn.wh.ABCD.com/register/campaign_central.php"><img src="http://ABCD123.dyn.wh.ABCD.com/register/images/rl_logo_de.png" border="0" alt="text text text text text text text textrnehmen" /></a></div>
<div id="header-nav">
<table cellspacing="5" border="0" cellpadding="1" width="300">
<tr>
<td>&nbsp;</td>
</tr>
</table>

</div>
</div>
<!-- /Header -->








<TABLE width=100% cellspacing=0 cellpadding=0 border=0 bgcolor=white>

<TR><!-- BEGIN MAIL BOX -->

<TD width=4%></TD><!-- Left vertical spacing -->

<TD><table width=100% cellspacing=0 cellpadding=0 border=0 bgcolor=white><!-- BEGIN MAIL ENVELOPE -->




<!-- BEGIN MAIL BODY -->

<tr><td class=mail>
<div style="margin:15px 0px 15px 0px; ">

<p>キャンペーンリンク先ページからお text text text text text text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text text, , für

. text text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text text.</p>


<p><table class=mail cellspacing=0 cellpadding=1 border=0 width=30%>


<tr><td align=right>text gesamt:</td><td align=right>€</td></tr>




</table></p>






<p class=text_footer>ANMERKUNG: text text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext text text texttext.</p>

Mit Grüßen<br>
Ihr ABCD-Team
</div>
</td></tr>

<!-- END MAIL BODY -->

<TR>

<TD class=text_footer valign=center align=middle>


<BR><A class=text_orange_link href="http://ABCD123.dyn.wh.ABCD.com/?mid=14&cb=2488&cb=2488"
target="_top">Zurück zu ABCD</A><BR>&nbsp;</TD>

</TR>



<tr>
<td class=mail align=center>

ABCD GmbH, text text text text text text text 22, 10719 Berlin.<br>

<a href="http://ABCD123.dyn.wh.ABCD.com/register/unsubscribe.php?email=emailtest@ABCD.com&cb=2488&campId=&advId=">Abmeldung</a>
<td>
</tr>

<TR>
<TD align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:7pt; color:#8C817A;">
text text text text text text text E-Mail-Kommunikation bis zu 90 Tage gespeichert werden.</a>
</TD>
</TR>



</table></td><!-- END MAIL ENVELOPE -->

<TD width=4%></TD><!-- Right vertical spacing -->

</tr></table><!-- END MAIL BOX -->






<!-- Footer -->
<div id="footer_06">
<style>
div#footer_06 div#footer-content td {
color:#8C817A;
font-size:8pt;
padding-right:6px;
}
td {
font-size:11px;
}
</style>
<div id="footer-content">
<table border="0" style="text-align:center;margin-left:auto;margin-right:auto;">
<tr>
<td><a href="http://www.ABCD.de/%C3%BCber-ABCD ">Über ABCD</a></td>
<td><img src="/register/images/06/footer_nav_separator.gif" border="0" alt="" /></td>
<td><a href="http://www.ABCD.de/kontakt">text Sie ABCD</a></td>
<td><img src="/register/images/06/footer_nav_separator.gif" border="0" alt="" /></td>
<td>&copy; 2011 ABCD GmbH. Alle text vorbehalten.</td>
</tr>
</table>
</div>
</div>
<!-- /Footer -->







</td></tr></table><!-- END BODY ENVELOPE -->



</body>
</html>
  1. PRINCE_test.pdf52.8 kB
    generated pdf file
mikeday
The width: 776px on the header div and width="776" on the outer table are too big. At 96dpi, this is over 8" wide, which will spill over the right page margin. You can shrink the content to fit with this rule:
@page {
    prince-shrink-to-fit: auto
}

However this will result in text that may be too small. Using width="100%" on the table and header div will give better results.

Also some unrelated errors in the CSS, eg. double curly brackets {{ in these rules:
.Mail_title {{FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #3f505e; FONT-FAMILY: verdana}
.Mail_heading {{FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #003366; TEXT-ALIGN: right; FONT-FAMILY: arial}
deb_butan
Thanks mike, thanks a lot for your suggestion.