Cfdocument pdf

Can someone tell me why my pdf is adding an extra blank page to my document?
<cfdocument
backgroundvisible="no"
encryption="128-bit"
format="pdf"
fontembed="no"
marginbottom="1"
marginleft="1"
marginright="1"
margintop="1"
orientation="portrait"
overwrite="no"
ownerpassword="password"
pagetype="letter"
permissions="AllowPrinting"
unit="cm">
<html>
<head>
<title>1449</title>
</head>
<body>
<cfinclude template="includes/include_1449_p1.cfm">
</body>
</html>
</cfdocument>
When I run the include by itself it is just fine, no extra space or page.

Never mind - I see that this has been addressed in Hotfix 1 -
I installed it and this resolved the problem.

Similar Messages

  • Bug #81169 - Div bkgrnd color (of 1st div w/ content) not honored if cfdocument/pdf written to disk

    Bug for: Div background color (of 1st div w/ content) is not honored when cfdocument/pdf is written directly to disk.
    ==================
    Steps to reproduce
    ==================
    Run the following code with (and without) the cfdocument 'name' attribute.  Then compare both PDFs (the PDF written directly to browser, and the PDF written directly to disk)
    <cfdocument format="pdf" name="myPDF">
    <div style="background-color:#1a9cee;"></div>
    <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st div w/ content. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black.</div>
    <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
    </cfdocument>
    <cfif structKeyExists(variables, "myPDF")>
      <cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
    </cfif>
    ==================
    Attachments
    ==================
    PDF written directly to disk: 20091214_Bug_81169_CFDocumentPDFDivBkgrndColorNotHonored_01.pdf
    PDF written directly to browser: 20091214_Bug_81169_CFDocumentPDFDivBkgrndColorNotHonored_02.pdf
    Thanks!,
    -Aaron Neff
    Btw, this bug is new to CF9.  This bug did not affect CF 8.0.1.

    Ok, if anyone else is experiencing this same issue, here is a workaround.  The issue is that when a cfdocument-generated PDF is written directly to disk, then the background color of the 1st non-empty block-display HTML element is ignored (unless there is an inline-display HTML element preceding it).  Instead, the background color is near-black.
    So, the workaround is to simply ensure an inline-display HTML element preceds the problematic block-display HTML element.  (a <span></span> will do the trick)
    Here was the original code.  Note that line #3 is the 1st non-empty HTML element, and that it is a div (block-display), and it has a background color.  If the PDF is written to disk, then the specified background color is ignored.  Instead, the background color is near-black.  Again, this does not occur when the PDF is written directly to browser.
    1| <cfdocument format="pdf" name="myPDF">
    2| <div style="background-color:#1a9cee;"></div>
    3| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st non-empty block-display HTML element. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black (unless preceded by an inline-display HTML element).</div>
    4| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
    5| </cfdocument>
    6| <cfif structKeyExists(variables, "myPDF")>
    7|   <cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
    8| </cfif>
    Here is the 'fixed' code (note that "display:inline" has been added to line #2):
    1| <cfdocument format="pdf" name="myPDF">
    2| <div style="background-color:#1a9cee; display:inline;"></div>
    3| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st non-empty block-display HTML element. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black (unless preceded by an inline-display HTML element).</div>
    4| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
    5| </cfdocument>
    6| <cfif structKeyExists(variables, "myPDF")>
    7|   <cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
    8| </cfif>
    magical

  • How to delete pdf files created on server using cfdocument pdf?

    I am using <cfdocument format="pdf" ...
    to create a dynamically named and generated .pdf and it works rather well.  Navy managers can easily email the pdf to ships in the fleet and planning forces in the shipyards. (Planning data changes almost daily). However I have noticed that the pdf file stays on the server.  Over time this could become a problem with numbers.  Is there something I am missing to remove these pdfs over time.  Other than a manual review and delete.  This government server requires 4 logins and your right arm to update, so something auto is needed.

    Thanks for responding:
    I am not using cfmail - I am leaving it up to the user to print save or email.
    Your second option sound good but I really was hoping I was just missing something easy (new to cf).
    I did try giving the pdf the same name but I was having lots of troble with always returning the cached version.

  • CFDOCUMENT PDF generation peformance on Linux running CF server 8 or 9 is horrible

    Can anyone help me understand how I can get the <cfdocument> tag to generate PDFs in reasonable time (and without throwing timeout errors) when running on CF 8 on Linux? Running on CF 9 doesn't make a difference, either. I can run the same code that generates a PDF on a Win 7 system and it completes the 1-2 page PDF in seconds.  Do the same thing in CF8/9 on Linux and it takes so long (minutes) and then throws a timeout error. When we tried using Railo instead of CF8/9 it ran fine as well.

    Our apps guy figured out the problem after googling the error log message. To put this in context, the deployed app is running in a Tomcat container on Linux.
    The root cause is Java's AWT thinking there should be an Xserver available to talk to.  Somehow in the code interactions during the PDF generation,  calls are made to an Xserver that doesn't exist, with an absurdly long  timeout.  Adding the line "-Djava.awt.headless=true" to the catalina.sh  script has solved the issue.
    Hope this helps others!
    Tea man

  • Images not displaying in CFDOCUMENT PDF

    Hi there,
    Has anyone notice any problems with images in dynamic PDF
    using CFDOCUMENT? I have a site where I create several dynamic PDF
    document (with images) and all of a sudden, they stop displaying.
    The only new addition was a SSL for the site.
    Any help would be greatly appreciated.

    Thanks, Isaac.
    My reason for posting that I was trying the src="file://E:\ solution before putting it in CFDocument was that I figured if it didn't work with the browser, it probably wouldn't work with CFDocument, which was probably presumptuous of me.  I just tried using the IP Address instead of E:\etc and it shows up in the browser.  Good news, the IP Addresses fix the logo problem, but not the CFChart problem.
    Here's the failed img tag:
    <img src="logo_30.jpg" width="96" height="50" border="0" alt="">
    Here's the successful img tag:
    <img src="http://ipaddress/portal/PROD/Forms/monthly_reports/logo_30.jpg" width="96" height="50" border="0" />
    Here's the chart code:
    <CFQUERY NAME="GrabData" datasource="admi-prod">
              sql goes here
    </CFQUERY>
    <cfset gwidth = 450>
    <cfset gheight = 320>
    <cfset min = int(arrayMin(grabData["total_inventory"])) - 1>
    <cfif int(arrayMin(grabData["total_idle_capital"])) LT min>
            <cfset min = int(arrayMin(grabData["total_idle_capital"])) - 1>
    </cfif>
    <cfset max = ceiling(arrayMax(grabData["total_inventory"])) + 1>
    <cfchart scalefrom="#min#" scaleto="#max#" title="Total Closing Inventory & Total Idle Capital" format="jpg" chartheight="#gheight#" chartwidth="#gwidth#">
            <cfchartseries type="line" query="grabData" valuecolumn="total_inventory" itemcolumn="xlabel"/>
            <cfchartseries type="line" query="grabData" valuecolumn="total_idle_capital" itemcolumn="xlabel"/>
    </cfchart>

  • Cfdocument pdf rendering problem

    When you create a PDF using cfdocument, the <I>
    </I> tag and <B> </B> tag renders incorrectly
    sometimes. When it's at the edge of the table, the text inside the
    tags is repeated twice. And sometimes, it truncates the space or
    spaces before the tag. Or it would overlap the tagged text over the
    text before the tag. Has anyone encountered any of these
    problems?

    Post Author: vtec
    CA Forum: Exporting
    We are having a similar issue. Importing a perfectly justified word document as an OLE Object in Crystal.  The document seems perfect in the viewer but when exported to PDF, the text seems to overlap each other and there are huge spaces between words.  Using Crystal 11 release 2 (version 11.5.8.826).  Any help would be greatly appreciated.

  • JPG images bloat CFDocument PDF 10X

    We're creating PDF files using the CFDocument tag. We're
    including JPG images in the document. The JPG files are 1MB in file
    size total but the resulting PDF file is 11+ MEGs (10X). I've been
    searching the forums and Internet but I'm having trouble finding
    anything about this. All I could find on the topic is something
    about duplicate color spaces but it didn't solve anything.
    Note that if I open the file in Acrobat, I can
    compress/optimize it down to less than 1 MEG but that's not a
    practical solution programming-wise. I wish there was a way to call
    Acrobat from CF to take advantage of the optimization feature.
    Does anyone know of a fix or work around for this? We'll be
    generating thousands of PDFs and this will be a big problem. Do you
    know of an alternate way to generate PDF files from CF. OR how
    about a command line utility or CFX for compressing PDF files?

    How do you use it, as a service on the server watching a
    folder and doing bulk optimizations, or file-by-file from
    CF?

  • Cfdocument - PDF with clear/transparent background?

    I would like to generate a PDF file using cfdocument that has
    a completely clear / transparent background. Is this possible?
    Right now, I get a white "bounding box". Your help is
    appreciated.

    There is an attribute of the cfdocument tag of
    backgroundvisible = "yes" or "no", not sure if that will help.
    I use the background="image.jpg" of the body tag to adjust
    the background of the outputted pdf file.

  • CFDocument PDF losing session in IE6?

    Hello, helpful people!
    I've got a very curious problem in Cold Fusion 8. The
    onSessionEnd is called once one of my users opens a CFDocument.
    Specifically: I have a link to open the same page in a PDF.
    Once a user clicks this link, my log shows the onSessionEnd
    message, and the user is prompted to login again once they navigate
    to a new page.
    Interestingly, this does NOT occur in Firefox, IE7, or in
    some cases of IE6 (I haven't been able to determine what the
    difference is between the IE6 instances). Users who have this
    problem *consistantly* have the problem.
    I'm guessing it has something to do with a setting in IE6 -
    can anyone point me in the right direction?
    Thank you for any help you can give!
    Best wishes,
    Cat

    An interesting update:
    the IE6 version that isn't working seems to be:
    6.0.2900.2180
    However, the following IE6 version works:
    6.0.3790.3959
    Both with the same settings, as far as I can tell.
    I'm not listing this as the root cause of the issue - it may
    be a red herring. However, the 3 instances of the 6.0.29 version
    all display the issue, and the 1 instance of 6.0.37 does not, so it
    was worth mentioning.

  • CFDOCUMENT PDF HEADER FONT SIZE

    Using CF to create a PDF via <cfdocument> and finding that the font sizes within the header do not scale properly.  I've researched the web for hacks or solutions and cannot find any.  Has anyone been able to make the headers in CFDOCUMENT work?  I've adj the topmargin size and the font will adj once you get to 3 inches or greater but then there is huge white space at the top of the document.
    if anyone has any suggestions, would appreciate the feedback.

    Hi There,
    I had the same issue with fonts in the header. The work around I came up for me (at least) was the following.
    <cfdocument ... margintop="0" ...>
    I create a separate .cfm file, with a <div> tag setting the height to the desired header height. I then place the header content inside the <div> tag like images, barcodes, titles, etc, with desired font and border formatting applied.
    I insert the header content with a <cfinclude> tag, as the first line in the <cfdocument> tag. The rest of the page content is inserted below the <cfinclude>. If more then one page, I just <cfinclude> the header content again on the second page and so on. If changes are required, I change the header page which then updates appropriately where inserted.
    Additionally this allows me to insert odd and even headers into multiple page documents, while controlling the font structure, etc. It also allows me to insert a different header for the first page, with a subsequent header for the rest of the pages.
    Others may have their own solution to the header font formatting issue. However, like I said this is what I have found works for me.
    Leonard B

  • How to add digital Signature Field in cfdocument pdf files?

    Hi,
    We are generating pdf files using cfdocument to populate values and wondering how we can add digital signature field in those pdf files. Any help or comments would be deeply appreciated.
    Thanks,
    hismail786

    Hi,
    Yes, we have options to add digital signature to the pdf. We have one attribute called "Permissions" in "cfpdf" tag. If we provide permissions = 'AllowSecure', then system would allow digital signature for that pdf.
    Please go though the docs for details info. I will post in details next.
    Thanks
    Chandrakant

  • CFDocument pdf CF8.01 super slow~unless I remove dynamic image

    Upgraded from CF7 to CF8.01 and all the hotfixes. Since the
    upgrade, dynamic .pdfs are super slow. I commented out an image,
    and now it loads faster. What changed in CF8.01 to cause problems
    with including dynamic images in .pdfs? How do I get around this
    and still use images? Here's my code..
    <img src="file://///xxxDocServer/HiRes
    Photos#Biography.File_Path#" width="119" height="153" />
    I'm open to trying anything to speed this up.. Just don't
    want to have to rollback to CF7
    Help... anyone at Adobe have any ideas? Pretty
    please??

    Make sure your image is in sRGB colorspace.

  • Looping Cfdocument to produce a multiple page doc

    Can anyone point out where I can find information on
    producing a multiple
    page cfdocument (pdf) using a database to include unique
    information?
    I have a customer that wants mailers that have the customers
    name and
    special offer. I want to use CF to generate the PDF doc using
    a database as
    the source. I will need to set up the document and then loop
    it through each
    database entry to create a multiple page document with the
    information on
    it.
    Where can I find good information on how to do that?
    Thanks.
    Wally Kolcz
    Developer / Support

    Something like this:
    <cfdocument>
    <cfoutput query="abc" group="somthing">
    <cfdocumentsection>
    stuff
    <cfoutput>
    more stuff
    closing tags

  • Generate pdf file in coldfusion 6 or 6.1

    hello,
    would like to ask how to create a simple pdf file in
    coldfusion 6 or 6.1?
    thanks

    clyde_01 wrote:
    > would like to ask how to create a simple pdf file in
    coldfusion 6 or 6.1?
    use the open source iText library, that powers cf7's
    cfdocument PDF bits. search
    the forums, plenty of examples.

  • CF8 Document PDF cutting off text

    I am facing text cut-off during CFDocument PDF page breaks.
    I am using CF 8.
    Anyone can help Plz ?
    Thanks,
    -SKS

    We are experiencing the same problem, nearly a year after this original post.  All hot fixes applied and the problem persists.  Our data is not really a report exactly, we aren't looping through queries we are building dyanmic content based on some forms.  So we can't use any of the work around methods like counting the number of rows and such, at least not without some major recoding of approx 50 included files.  Documentation says that cfdocument supports the CSS style page-break-inside, but it appears to ignore it.  The problem is also not corrected in CF9 because we have tested it there as well.  No matter what we try to do the CFDocument tag will break in the middle of a table row / text if it happens to fall at the page length where cf wants to break the page.
    This is highly annoying and a large problem as the print outs are for medical data, and the doctors need to be able to read the text, not only have half of it show up on one page and the other half on another page.

Maybe you are looking for

  • Bluetooth driver problem  on windows 7 64 bit

    I am getting an error code 28 when trying to sync new iphone using bluetooth connection. Problem say driver does not install. I can't find correct driver and no CD came with the iphone. Iphone connects to itunes with no problem when using provided us

  • Video and audio files from dvd using FCP

    Hi Trying to get footage from a dvd using fcp. I can import the clips ok using file >import but they have no audio with them and the audio folder on the dvd is blank...any ideas???????? cheers

  • Validation for a selection screen used as a subscreen

    Hi friends, I have a screen say '0001' in that screen i have three subscreens 0002 0003 0004 In the subscreen 0002, i have declared three selection screens 0102, 0202, 0302 In the Application toolbar of the screen 0001 (PF Status) i have declared thr

  • Variable arguments in macros

    Don't know if this is the right place to post this question but none of the other categories seemed right. I am trying to use a macro with variable arguments in a pro-c module. The short version of my macro is: #define debug(...) printf(stderr, __VA_

  • Program for setting changed output indicator for deliveries

    Hi All, Is there a standard program and Form routine to send changed Delivery data as EDI output ? We have a scenario in which if a delivery that has already been sent out is changed, we want to trigger a changed output. We are using output type SEDI