tracker issue : CF-4051090

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

[ANeff] Bug for: cfpdf read=>setinfo=>getinfo throws PDFInvalidSourceException

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 09/08/2015

Components: Document Management

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

cfpdf action="read" followed by action="setinfo" followed by action="getinfo" throws PDFInvalidSourceException

Repro:

This works b/c no action="read" (outputs "MyTitle"):

<cfdocument format="pdf" name="myPDF">my page</cfdocument>
<cfpdf action="setinfo" source="myPDF" info="#{title='MyTitle'}#">
<cfpdf action="getinfo" source="myPDF" name="myPDFInfo">
<cfdump var="#myPDFInfo.title#">

This works b/c no action="setinfo" (outputs "[empty string]"):

<cfdocument format="pdf" filename="#expandPath('./MyPDF.pdf')#" overwrite="true">my page</cfdocument>
<cfpdf action="read" source="#expandPath('./MyPDF.pdf')#" name="myPDF">
<cfpdf action="getinfo" source="myPDF" name="myPDFInfo">
<cfdump var="#myPDFInfo.title#">

This fails b/c action="read" followed by action="setinfo"

<cfdocument format="pdf" filename="#expandPath('./MyPDF.pdf')#" overwrite="true">my page</cfdocument>
<cfpdf action="read" source="#expandPath('./MyPDF.pdf')#" name="myPDF">
<cfpdf action="setinfo" source="myPDF" info="#{title='my title'}#">
<cfpdf action="getinfo" source="myPDF" name="myPDFInfo">
<cfdump var="#myPDFInfo.title#">

Actual result: "PDFInvalidSourceException: Opetation could not be completed." "Cause: An error occurred while reading source for the cfpdf tag."
Expected result: "my title" output

Two bugs:
1) In the error message, "Opetation" should be "Operation"
2) PDFInvalidSourceException should not be thrown

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

Watson Bug ID:	4051090

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:  
External Test Config: Verified in ColdFusion 11 Update 5 (build 11,0,05,293506).

Attachments:

Comments:

We have to save the action setinfo in a attribute like name or destination. If any action performed on source pdf variable the source variable stream is consumed and it becomes empty. The solution to this is to save the action state in name attribute as suggested below. Usage suggestion: <cfdocument format="pdf" filename="#expandPath('./MyPDF.pdf')#" overwrite="true">my page</cfdocument> <cfpdf action="read" source="#expandPath('./MyPDF.pdf')#" name="myPDF"> <cfpdf action="setinfo" source="myPDF" info="#{title='my title'}#" name="myPDF"> <cfpdf action="getinfo" source="myPDF" name="myPDFInfo"> <cfdump var="#myPDFInfo.title#">
Comment by Poonam J.
5983 | August 04, 2016 09:17:33 PM GMT
@Aaron : is the issue resolved now? Workaround is mentioned below.
Comment by Poonam J.
5984 | August 07, 2016 11:23:36 PM GMT
Did not hear back from customer. Closing this track.
Comment by Poonam J.
5985 | August 08, 2016 09:01:33 PM GMT
Hi Adobe (and Poonam), Busy summer =) I've been out-of-town the last 2 weeks. I'll be out-of-town again for a few more days, and again next weekend. Sorry for the delay on this and other tickets. I will try to look into tickets as soon as possible. I'll start catching-up on tickets this month :) Thanks!, -Aaron
Comment by External U.
5986 | August 09, 2016 01:20:24 PM GMT