Coldfusion MX7: Generating a coldfusion page to a pdf for further actions to be performed and removing blank page

There are two issues:

The first is I am hoping to get some guidance on how best to handle the flow for my use case. I am working on incorporating docusign into one of the coldufison sites I've inherited. The first step was to figure out how to generate a pdf with the information I need. The type of document I need to capture signatures for is a lien release. There can be 50-60 rows of data in this coldfusion page that are set to break after each row. <CFDocument> makes it easy to create the PDF but when the popup window appears that used to show the coldfusion page with the lien releases it appears as a blank page because I've wrapped that page in the cfdocument tags. The PDF does get created. My question here is, how can I generate the PDF without opening the page in a popup window? Is there a way to do that? I want to generate the PDF then display the coldfusion page with the data. I then want to have a button that will initiate the call to the docusign server and be able to send that pdf that I've stored on the server as part of the request. I don't know how to create the PDF without opening the page that is wrapped in the cfdocument tags which at this point ends up being a blank page.

The second issue is this.

I am using the code below to create a page break. It works perfectly except that a blank page does get created at the end of the document. Does anyone know of a method I can use to keep the blank page from being created?

<cfif AmountToPayOnNextCheck.recordcount gt rowcount>
		  <div style="page-break-after:always"></div>					
</cfif>

Open in new window

J CAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_agx_Commented:
Not sure about the blank page.

If I'm understanding correctly, you simply want to generate the pdf without ever displaying it? If so, it sounds like you just need to add the "filename" or "name" attribute to your <cfdocument> tags, so the pdf content is saved to a file, or variable, instead of displayed on screen. Then you can do with it wherever you need.

filename - Specifies the name of a file to contain the PDF or FlashPaper output.  If you omit the filename attribute, ColdFusion MX streams output to the browser.

name - Specifies the name of an existing variable into which the tag stores the PDF or FlashPaper output.

ie
<cfdocument  filename = "filename" ....>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
J CAuthor Commented:
That is what I've done and the document does save to my web app folder  but it's almost as if the document is trying to be displayed inside the popup and cannot be loaded because I end up with what appears to be a blank window.
0
_agx_Commented:
Unfortunately I don't have MX 7 to test with, but it sounds like you're doing a 2 step process. Can't you just generate the pdf in step 1, then use cflocation and redirect to the display page? That way, the blank page shouldn't matter because the user would be redirected and wouldn't see it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.