Search code examples
pdfcoldfusion-11html-to-pdf

Remove extra space from footer of pdf file generated by cfhtmltopdf


I was working in generating pdf report from html content and I was trying to put footer html content in the pdf, but I'm unable to put it inside cfhtmltopdfitem tag, as div tag and class is not allowed inside it. So, I just kept it inside my html body, but I'm getting a huge space between the html footer and the actual pdf footer(as show in the image).

enter image description here

***Note: I feel for this one code sample is not required, if needed please let me know.

Thanks in advance.

I have put this question in ColdFusion forum, here is the reference: https://forums.adobe.com/thread/2204100


Solution

  • Without seeing your code it's hard to diagnose. If you're using CFdocument, set the marginBottom="0" property. EX:

    <cfdocument
        scale="100" unit="in"
        format="pdf"
        name="temp"
        overwrite="yes"
        localUrl="no"
        fontEmbed="yes"
        marginBottom = "0"
        marginLeft = "0"
        marginRight = "0"
        marginTop = "0"
        pageWidth="7.5"
        pageHeight="10"
        orientation="landscape" >