Just tried that -- no luck. I'll try Ajas' Javascript solution and see how it goes.

-- Angeli

On 7/25/2017 12:17 PM, Seth Bienek wrote:

CFCONTENT with reset=”true” should clear everything from the output buffer. I would assume this would include CFHEADER values, but have not tested to confirm.

Can you try it without the reset argument to see what the results are? This is what I use:

<!--- Set the header values. --->

<cfheadername="content-length"value="#ArrayLen(pdfOutput)#"/>

<cfheadername="content-disposition"value="attachment; filename=#attributes.fileName#.pdf"/>

<!--- Stream the binary data to the user. --->

<cfcontenttype="application/pdf"variable="#pdfOutput#"/>

Take Care,

Seth

*From:*houcfug@googlegroups.com [mailto:houcfug@googlegroups.com] *On Behalf Of *Angeli Wahlstedt
*Sent:* Tuesday, July 25, 2017 9:58 AM
*To:* houcfug@googlegroups.com
*Subject:* Re: [houcfug] Head-scratcher regarding dynamic PDF's

Hmm, I wonder if this may be an "undocumented feature" in CF 10 and 11...? Also, could IIS be a factor as well?

-- Angeli

On 7/24/2017 10:50 PM, Mike G wrote:

    I get the pdf file name, but I am on CF 9

    On Mon, Jul 24, 2017 at 9:05 PM, Angeli Wahlstedt
    <sabasu...@gmail.com <mailto:sabasu...@gmail.com>> wrote:

        Actually, I had tried that (along with using "SaveAsName" in
        the cfdocument tag), but it still came up as "receipt.cfm" for
        me.  What name came up for you when you clicked the "Download"
        icon in Google Chrome's PDF viewer?

        -- Angeli

        On 7/24/2017 8:14 PM, Mike G wrote:

            <cfheader name="Content-Disposition" value="inline;
            filename=survey.pdf">

            <cfcontent type="application/pdf" reset="true"
            variable="#content#">

            This works for me, try attachments inline..

            On Mon, Jul 24, 2017 at 4:31 PM, Angeli Wahlstedt
            <sabasu...@gmail.com <mailto:sabasu...@gmail.com>> wrote:

                Long time, no talk. Here's a head-scratcher that I
                want to bounce off you folks. A client just told me
                that a CFM page which generates a PDF document for
                displaying in the browser doesn't work quite right in
                Google Chrome. It displays the PDF content correctly,
                but when you select to download the document, it
                defaults as the name "receipt.cfm" rather than, say,
                "receipt.pdf" which confuses customers. (If you rename
it as "receipt.pdf", it saves correct, but still...) Here's the complete code:

                <cfinclude template="inc_generateReceipt.cfm" />
                <cfheader name=“Content-Disposition”
                value=“attachment;filename=receipt.pdf” />
                <cfcontent type="application/pdf" reset="true"
                variable="#variables.PDFContent#" />

                (The included template obviously generates the PDF
                document using CFDocument.) No matter what I try, the
                browser still says "receipt.cfm" for the PDF document.
                Firefox also has a similar issue -- it says
                "document.pdf" instead of "receipt.pdf". I've Googled
                to no avail.

                The production server is running CF 10, and I've
                replicated the same issue on CF 11. Any thoughts?

                Thanks,
                Angeli Wahlstedt
                IdeaSculpt LLC

-- -- You received this message because you are subscribed
                to the "Houston ColdFusion Users' Group" discussion list.
                To unsubscribe, send email to
                houcfug-unsubscr...@googlegroups.com
                <mailto:houcfug-unsubscr...@googlegroups.com>
                For more options, visit
                http://groups.google.com/group/houcfug?hl=en

                --- You received this message because you are
                subscribed to the Google Groups "Houston ColdFusion
                Users' Group" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an email to
                houcfug+unsubscr...@googlegroups.com
                <mailto:houcfug%2bunsubscr...@googlegroups.com>.
                For more options, visit
                https://groups.google.com/d/optout.

-- -- You received this message because you are subscribed to
            the "Houston ColdFusion Users' Group" discussion list.
            To unsubscribe, send email to
            houcfug-unsubscr...@googlegroups.com
            <mailto:houcfug-unsubscr...@googlegroups.com>
            For more options, visit
            http://groups.google.com/group/houcfug?hl=en

            ---
            You received this message because you are subscribed to
            the Google Groups "Houston ColdFusion Users' Group" group.
            To unsubscribe from this group and stop receiving emails
            from it, send an email to
            houcfug+unsubscr...@googlegroups.com
            <mailto:houcfug+unsubscr...@googlegroups.com>.
            For more options, visit https://groups.google.com/d/optout.

-- -- You received this message because you are subscribed to the
        "Houston ColdFusion Users' Group" discussion list.
        To unsubscribe, send email to
        houcfug-unsubscr...@googlegroups.com
        <mailto:houcfug-unsubscr...@googlegroups.com>
        For more options, visit
        http://groups.google.com/group/houcfug?hl=en

        ---
        You received this message because you are subscribed to the
        Google Groups "Houston ColdFusion Users' Group" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to houcfug+unsubscr...@googlegroups.com
        <mailto:houcfug+unsubscr...@googlegroups.com>.
        For more options, visit https://groups.google.com/d/optout.

-- -- You received this message because you are subscribed to the
    "Houston ColdFusion Users' Group" discussion list.
    To unsubscribe, send email to houcfug-unsubscr...@googlegroups.com
    <mailto:houcfug-unsubscr...@googlegroups.com>
    For more options, visit http://groups.google.com/group/houcfug?hl=en

    ---
    You received this message because you are subscribed to the Google
    Groups "Houston ColdFusion Users' Group" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to houcfug+unsubscr...@googlegroups.com
    <mailto:houcfug+unsubscr...@googlegroups.com>.
    For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list. To unsubscribe, send email to houcfug-unsubscr...@googlegroups.com <mailto:houcfug-unsubscr...@googlegroups.com>
For more options, visit http://groups.google.com/group/houcfug?hl=en

---
You received this message because you are subscribed to the Google Groups "Houston ColdFusion Users' Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to houcfug+unsubscr...@googlegroups.com <mailto:houcfug+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

--
--
You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list.
To unsubscribe, send email to houcfug-unsubscr...@googlegroups.com
For more options, visit http://groups.google.com/group/houcfug?hl=en

---
You received this message because you are subscribed to the Google Groups "Houston ColdFusion Users' Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to houcfug+unsubscr...@googlegroups.com <mailto:houcfug+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to houcfug-unsubscr...@googlegroups.com
For more options, visit http://groups.google.com/group/houcfug?hl=en

--- You received this message because you are subscribed to the Google Groups "Houston ColdFusion Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to houcfug+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to