Solved

Coldfusion - cfpdf merge - automatically open pdf after it has been merged

Posted on 2013-05-14
3
830 Views
Last Modified: 2013-05-14
I an creating a dynamic pdf merge using CFPDF which works great.  It saves the merged pdf into the current active directory of the website, but I would like it to:

-merge the pdf's
-open the merged pdf without user intervention

How can I do this?

Max
0
Comment
Question by:MaxwellTurner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 39166182
Try using the "name" attribute to send the merge results to a variable.  Then use cfcontent to display the contents in the browser. Something like

<cfpdf action = "merge"
      source="files to merge here"
      name="mergedPDFs" ...>

<cfheader name="Content-Disposition" value="inline; filename=someFile.pdf">
<cfcontent type="application/pdf" variable="#mergedPDFs#" reset="true">

Open in new window


In some versions you may have to wrap the pdf variable in ToBinary first:

    .. merge the pdfs ....
   <cfheader name="Content-Disposition" value="inline; filename=someFile.pdf">
   <cfcontent type="application/pdf" variable="#toBinary(mergedPDFs)#" reset="true">
0
 
LVL 1

Author Comment

by:MaxwellTurner
ID: 39166752
Oh I was sooo close!  I had to wrap it in toBinary.

Thanks again agx ... you make me look 'much smarter than I am' to the colleagues I do all this stuff for! ;)

Max
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39167077
Aww, thanks... and you're welcome :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question