Hi,

I have a client that wants to be able to print certificates (pdf's) for their 
clients.  What I do is retrieving a query resultset.

Then i use cfdocument:
<cfdocument
        format="PDF"
        pageType="A4"
        margintop="0"
        marginbottom="0"
        marginright="0"
        marginleft="0"
        unit="cm"
        backgroundvisible="no"
        overwrite="no"
        fontembed="yes"
        scale="100">

Then within a cfoutput tag I have html to position the dynamic content from 
myQueryResultset along with static content (texts and images). I use styles to 
position divs.

I use an htmlvalidator to validate my html and it validated ok.

This works fine when my query resultset contains 1 row: I get 1 pdf with all 
content in the correct position.

But when myQueryResultset contains multiple rows I get multiple pdfs but the 
layout of the pdfs gets messed up:
The first pdf is empty, on subsequesnt pdfs the position of the divs is changed 
and also their relative position changed.

Excerpt of the stylesheet I use:

<style type="text/css">
body{
        font-family: Arial, Helvetica, sans-serif;
}

..Ondergetekenden {
        position: absolute;
        top: 114mm;
        left: 30mm;
        font-size: 13pt;
}

..Cursist {
        position: absolute;
        top: 131mm;
        left: 30mm;
        font-size: 26pt;
        font-weight: bold;
}

..Geboren {
        position: absolute;
        width: 20 cm;
        top: 153 mm;
        left: 30 mm;
        font-size: 13pt;
}

Some other things:

HTML validates OK;
Including the styles in a style block or including it as an external style 
sheet makes no difference.

Do I have to use tables instead of divs? Do I have to use inches to position 
divs instead of mm? Inline styles?  Also specify bottom attribute in the styles?

I hope someone can point me in the right direction to render pdfs correctly.

Thanks,

Marc 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to