I need help and I'm hoping that I have been overlooking something simple. I am trying to create a printable 8.5x11 pdf using cfdocument format=pdf. The problem I'm running into is that the html that is being rendered is scaling. The only way I can get an element to be the full width or full height of the document is to specify width=100% or height=100%. Using a .25in margin, shouldn't I be able to specify the width/height of an element to be width=8in and height=10.5in? I've tried using pixels rather than inches, and the outcome is the same. The element is scaled down.
Here is some example code (running this you'll notice that the text scales according to the size of its container):
I'd really like to position and size things in inches. At the bottom of the document I'm trying to make, I need a section to be 3.25 inches tall (not including the bottom margin). And to be positioned at the bottom of the page.
If there is any advice on what I could try or what I may be doing wrong, I would appreciate it.
Thanks.
Here is some example code (running this you'll notice that the text scales according to the size of its container):
Code:
<cfdocument format="pdf" fontembed="yes" unit="in" scale="100" pagetype="letter" marginbottom="0" marginleft="0" marginright="0" margintop="0" backgroundvisible="yes">
<cfdocumentsection marginbottom=".25" marginleft=".25" marginright=".25" margintop=".25" mimetype="text/html">
<div style="width: 8in; height: 10.5in; background-color: ##cccccc;">
div style="width: 8in; height: 10.5in; background-color: ##cccccc;
</div>
</cfdocumentsection>
<cfdocumentsection marginbottom=".25" marginleft=".25" marginright=".25" margintop=".25" mimetype="text/html">
<div style="width: 7in; height: 10in; background-color: ##cccccc;">
div style="width: 7in; height: 10in; background-color: ##cccccc;
</div>
</cfdocumentsection>
<cfdocumentsection marginbottom=".25" marginleft=".25" marginright=".25" margintop=".25" mimetype="text/html">
<div style="width: 100%; height: 10.5in; background-color: ##cccccc;">
div style="width: 100%; height: 10.5in; background-color: ##cccccc;
</div>
</cfdocumentsection>
<cfdocumentsection marginbottom=".25" marginleft=".25" marginright=".25" margintop=".25" mimetype="text/html">
<div style="position: relative; top: 2in; left: 2in; width: 2in; height: 2in; background-color: ##cccccc;">
div style="position: relative; top: 2in; left: 2in; width: 2in; height: 2in; background-color: ##cccccc;
</div>
</cfdocumentsection>
</cfdocument>
I'd really like to position and size things in inches. At the bottom of the document I'm trying to make, I need a section to be 3.25 inches tall (not including the bottom margin). And to be positioned at the bottom of the page.
If there is any advice on what I could try or what I may be doing wrong, I would appreciate it.
Thanks.