tracker issue : CF-4109053

select a category, or use search below
(searches all categories and all time range)
Title:

Merging PDF variables fails in cfscript

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/NotWorthEffort

Reporter/Name(from Bugbase): Geoffrey Demoulin / Geoffrey Demoulin (Geoffrey Demoulin)

Created: 01/20/2016

Components: Document Management

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Most users will encounter

Locale/System: English / Windows 8.1/64bit

Vote Count: 0

Problem Description:

When trying to merge pdfs variables generated with cfhtmltopdf in cfscript, an exception is thrown.

Steps to Reproduce:

<cfscript>
    cfhtmltopdf(name="test", orientation="landscape", pagetype="custom", unit="cm", pageHeight="15.0", pageWidth="10.2", margintop="0.5", marginbottom="0.5", marginleft="0.4", marginright="0.4"){
        writeOutput("hi");
    }
			
    pdfService = new pdf();
    pdfService.addParam(source="test"); // Fails
    pdfService.merge( name="label" );
    WriteDump(var=label, abort=true);
</cfscript>

Actual Result:

Get an exception: 
The file or directory (C:\ColdFusion11\cfusion\CustomTags\com\adobe\coldfusion\test) specified in the source attribute in the CFPDFPARAM tag does not exist. 

Expected Result:

the variable "label" contains the pdf binary data.

Any Workarounds:

Use the script tag invocation instead of the "new pdf()" method:

<cfscript>
    cfhtmltopdf(name="test", orientation="landscape", pagetype="custom", unit="cm", pageHeight="15.0", pageWidth="10.2", margintop="0.5", marginbottom="0.5", marginleft="0.4", marginright="0.4"){
        writeOutput("hi");
    }
			
    cfpdf(action="merge", name="label"){
        cfpdfparam(source="test");
    }
    WriteDump(var=label, abort=true);
</cfscript>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4109053

External Customer Info:
External Company:  
External Customer Name: Geoffrey Demoulin
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

CFC based solution was added to provide script support for CFPDF Tag features. We are planing to deprecate the cfc based script syntax support. Now we have support for all the PDF tags in script, Its advised to use them instead of using cfc based approach as that will be more feature rich and performance. Solving this issue now will require some language api changes, which is not worth the effort.
Comment by Mayur J.
4873 | May 04, 2016 03:06:18 AM GMT