tracker issue : CF-4127100

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

[ANeff] ER for: Complete CF's near-complete VFS support

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

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

Created: 03/10/2016

Components: Document Management

Versions: 2016

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Alpha_v12 /

Priority/Frequency: Major / Unknown

Locale/System: English / Win All

Vote Count: 0

Related ticket 4060772 is for Pre-CF12. This ticket here is b/c I couldn't file this ticket in the public tracker b/c the information below is NDA.

cfpdf/cfpdfparam/cfpdfform have near-complete VFS support. This ER is to complete the VFS support for these, for the cfpdf actions added in Raijin, which will then complete CF's VFS support.

Steps to reproduce:

1) Download attached CFDocumentWithComment.pdf and CFHTMLToPDFWithComment.pdf
2) Create the "temp" and "result" subfolders
3) Run the following and see errors are thrown as described in each example

Actual result: each throws an error
Expected result: none should thrown an error

<!--- setup --->
<cfscript>
  //resets the temporary directories
  function resetTemp() {
	  if(directoryExists(expandPath("./temp"))) {
		  directoryDelete(expandPath("./temp"), true);
	  }
	  directoryCreate(expandPath("./temp"));
	  if(directoryExists("ram://temp")) {
		  directoryDelete("ram://temp", true);
	  }
	  directoryCreate("ram://temp");
  }
  //resets the result directory
  function resetResult() {
	  if(directoryExists(expandPath("./result"))) {
		  directoryDelete(expandPath("./result"), true);
	  }
	  directoryCreate(expandPath("./result"));
  }
  //generates a cfdocument comment file and a cfhtmltopdf comment file
  function generateCommentFiles() {
	  cfpdf(action="export", type="comment", source=expandPath('./CFDocumentWithComment.pdf'), exportto=expandPath('./MyCommentCFDocument.xfdf'), overwrite=true);
	  cfpdf(action="export", type="comment", source=expandPath('./CFHTMLToPDFWithComment.pdf'), exportto=expandPath('./MyCommentCFHTMLToPDF.xfdf'), overwrite=true);
  }
  //generates a cfdocument metadata file and a cfhtmltopdf metadata file
  function generateMetadataFiles() {
	  cfdocument(format="pdf", filename=expandPath('./temp/MyPDFTempCFDocument.pdf'), overwrite="true") {writeOutput("my temporary cfdocument PDF");};
	  cfpdf(action="export", type="metadata", source=expandPath('./temp/MyPDFTempCFDocument.pdf'), exportto=expandPath('./MyMetadataCFDocument.xmp'), overwrite=true);
	  cfhtmltopdf(destination=expandPath('./temp/MyPDFTempCFHTMLToPDF.pdf'), overwrite="true") {writeOutput("my temporary cfhtmltopdf PDF");};
	  cfpdf(action="export", type="metadata", source=expandPath('./temp/MyPDFTempCFHTMLToPDF.pdf'), exportto=expandPath('./MyMetadataCFHTMLToPDF.xmp'), overwrite=true);
  }
  
  generateCommentFiles();
  generateMetadataFiles();
  resetTemp();
  resetResult();
</cfscript>

<!--- action="sanitize" --->
<cfscript>
  theHTML = '<img src="http://wwwimages.adobe.com/content/dam/Adobe/images/shared/product-totems/80x80/totem-coldfusion-11-80x80.png.adimg.mw.80.png">';
  
  try {
	  cfdocument(format="pdf", filename="ram://temp/myPDF.pdf", overwrite=true) {writeOutput(theHTML);};
	  cfpdf(action="sanitize", source="ram://temp/myPDF.pdf");//throws: coldfusion.pdf.PDFDocOperation$PDFOperationException: An error occurred during SANITIZE operation in the cfpdf tag.
	  writeOutput("YES");
  }
  catch(any e) {writeOutput("NO");}
  
  resetTemp();
  
  try {
	  cfhtmltopdf(destination="ram://temp/myPDF.pdf", overwrite=true) {writeOutput(theHTML);};
	  cfpdf(action="sanitize", source="ram://temp/myPDF.pdf");//throws: coldfusion.pdf.PDFDocOperation$PDFOperationException: An error occurred during SANITIZE operation in the cfpdf tag.
	  writeOutput("YES");
  }
  catch(any e) {writeOutput("NO");}
  
  resetTemp();
</cfscript>

<!--- action="export" type="comment" --->
<cfscript>
  cfpdf(action="write", source=expandPath('./CFDocumentWithComment.pdf'), destination="ram://temp/MyPDF.pdf", overwrite=true);
  cfpdf(action="export", type="comment", source="ram://temp/MyPDF.pdf", exportto="ram://temp/MyMetadata05.xfdf", overwrite="true");//throws suppressed exception: java.io.FileNotFoundException: ram:///temp/MyPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
  writeOutput(fileExists("ram://temp/MyMetadata05.xfdf"));//returns NO (bad)
  
  resetTemp();
  
  cfpdf(action="write", source=expandPath('./CFHTMLToPDFWithComment.pdf'), destination="ram://temp/MyPDF.pdf", overwrite=true);
  cfpdf(action="export", type="comment", source="ram://temp/MyPDF.pdf", exportto="ram://temp/MyMetadata06.xfdf", overwrite="true");//throws suppressed exception: java.io.FileNotFoundException: ram:///temp/MyPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
  writeOutput(fileExists("ram://temp/MyMetadata06.xfdf"));//returns NO (bad)
  
  resetTemp();
</cfscript>

<!--- action="import" type="comment" --->
<cfscript>
  cfdocument(format="pdf", filename="ram://temp/myPDF.pdf") {writeOutput("my PDF");};
  fileWrite("ram://temp/MyCommentCFDocument.xfdf", fileRead(expandPath('./MyCommentCFDocument.xfdf')));
  try {
	  cfpdf(action="import", type="comment", source="ram://temp/myPDF.pdf", importfrom="ram://temp/MyCommentCFDocument.xfdf", destination=expandPath('./temp/MyPDF.pdf'), overwrite="true");//throws: java.io.FileNotFoundException: ram:///temp/myPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
	  cfpdf(action="export", type="comment", source=expandPath('./temp/MyPDF.pdf'), exportto=expandPath('./result/MyComment09.xfdf'), overwrite=true);
  }
  catch(any e) {}
  writeOutput(fileExists(expandPath('./result/MyComment09.xfdf')));
  
  resetTemp();
  
  cfhtmltopdf(destination="ram://temp/myPDF.pdf") {writeOutput("my PDF");};
  fileWrite("ram://temp/MyCommentCFHTMLToPDF.xfdf", fileRead(expandPath('./MyCommentCFHTMLToPDF.xfdf')));
  try {
	  cfpdf(action="import", type="comment", source="ram://temp/myPDF.pdf", importfrom="ram://temp/MyCommentCFHTMLToPDF.xfdf", destination=expandPath('./temp/MyPDF.pdf'), overwrite="true");//java.io.FileNotFoundException: ram:///temp/myPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
	  cfpdf(action="export", type="comment", source=expandPath('./temp/MyPDF.pdf'), exportto=expandPath('./result/MyComment10.xfdf'), overwrite=true);
  }
  catch(any e) {}
  writeOutput(fileExists(expandPath('./result/MyComment10.xfdf')));
  
  resetTemp();
</cfscript>

<!--- action="export" type="metadata" --->
<cfscript>
  //export metadata from cfdocument ram://
  cfdocument(format="pdf", filename="ram://temp/MyPDF.pdf", overwrite="true") {writeOutput("my PDF");};
  cfpdf(action="export", type="metadata", source="ram://temp/MyPDF.pdf", exportto="ram://temp/MyMetadata05.xmp", overwrite="true");//throws suppressed exception: java.io.FileNotFoundException: ram:///temp/MyPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
  writeOutput(fileExists("ram://temp/MyMetadata05.xmp"));//returns NO (bad)
  
  resetTemp();
  
  //export metadata from cfhtmltopdf ram://
  cfhtmltopdf(destination="ram://temp/MyPDF.pdf", overwrite="true") {writeOutput("my PDF");};
  cfpdf(action="export", type="metadata", source="ram://temp/MyPDF.pdf", exportto="ram://temp/MyMetadata06.xmp", overwrite="true");//throws suppressed exception: java.io.FileNotFoundException: ram:///temp/MyPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
  writeOutput(fileExists("ram://temp/MyMetadata06.xmp"));//returns NO (bad)
  
  resetTemp();
</cfscript>

<!--- action="import" type="metadata" --->
<cfscript>
  cfdocument(format="pdf", filename="ram://temp/myPDF.pdf") {writeOutput("my PDF");};
  fileWrite("ram://temp/MyMetadataCFDocument.xmp", fileRead(expandPath('./MyMetadataCFDocument.xmp')));
  try {
	  cfpdf(action="import", type="metadata", source="ram://temp/myPDF.pdf", importfrom="ram://temp/MyMetadataCFDocument.xmp", destination=expandPath('./temp/MyPDF.pdf'), overwrite="true");//throws: java.io.FileNotFoundException: ram:///temp/myPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
	  cfpdf(action="export", type="metadata", source=expandPath('./temp/MyPDF.pdf'), exportto=expandPath('./result/MyMetadata09.xmp'), overwrite=true);
  }
  catch(any e) {}
  writeOutput(fileExists(expandPath('./result/MyMetadata09.xmp')));
  
  resetTemp();
  
  //try cfhtmltopdf ram:// as import source
  cfhtmltopdf(destination="ram://temp/myPDF.pdf") {writeOutput("my PDF");};
  fileWrite("ram://temp/MyMetadataCFHTMLToPDF.xmp", fileRead(expandPath('./MyMetadataCFHTMLToPDF.xmp')));
  try {
	  cfpdf(action="import", type="metadata", source="ram://temp/myPDF.pdf", importfrom="ram://temp/MyMetadataCFHTMLToPDF.xmp", destination=expandPath('./temp/MyPDF.pdf'), overwrite="true");//throws: java.io.FileNotFoundException: ram:///temp/myPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
	  cfpdf(action="export", type="metadata", source=expandPath('./temp/MyPDF.pdf'), exportto=expandPath('./result/MyMetadata10.xmp'), overwrite=true);
  }
  catch(any e) {}
  writeOutput(fileExists(expandPath('./result/MyMetadata10.xmp')));
  
  resetTemp();
</cfscript>

<!--- action="archive" --->
<cfscript>
  try {
	  cfdocument(format="pdf", filename="ram://temp/MyPDF.pdf", overwrite=true) {writeOutput("my PDF");}
	  cfpdf(action="archive", source="ram://temp/MyPDF.pdf");//throws: Error: java.io.FileNotFoundException: ram:\temp\MyPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
	  writeOutput("YES");
  }
  catch(any e) {writeOutput("NO");};
  
  resetTemp();
  
  try {
	  cfhtmltopdf(destination="ram://temp/MyPDF.pdf", overwrite=true) {writeOutput("my PDF");}
	  cfpdf(action="archive", source="ram://temp/MyPDF.pdf");//throws: java.io.FileNotFoundException: ram:\temp\MyPDF.pdf (The filename, directory name, or volume label syntax is incorrect)
	  writeOutput("YES");
  }
  catch(any e) {writeOutput("NO");};
  
  resetTemp();
</cfscript>

<!--- action="addattachments" --->
<cfscript>
  try {
	  cfdocument(format="pdf", filename="ram://temp/myPDF.pdf") {writeOutput("my PDF");};
	  cfdocument(format="pdf", filename="ram://temp/myPDFAttachment.pdf") {writeOutput("my PDF attachment");};
	  cfpdf(action="addattachments", source="ram://temp/myPDF.pdf", destination=expandPath('./result/MyPDF07.pdf'), overwrite=true) {//throws: java.io.IOException: Null ByteReader parameter
		  cfpdfparam(source="ram://temp/myPDFAttachment.pdf", filename="MyPDFAttachment.pdf", encoding="UTF-8") {};

	  };
	  writeOutput(fileExists(expandPath('./result/MyPDF07.pdf')));
  }
  catch(any e) {writeOutput("NO");}
  
  resetTemp();
  
  try {
	  cfhtmltopdf(destination="ram://temp/myPDF.pdf") {writeOutput("my PDF");};
	  cfhtmltopdf(destination="ram://temp/myPDFAttachment.pdf") {writeOutput("my PDF");};
	  cfpdf(action="addattachments", source="ram://temp/myPDF.pdf", destination=expandPath('./result/MyPDF08.pdf'), overwrite=true) {//throws: java.io.IOException: Null ByteReader parameter
		  cfpdfparam(source="ram://temp/myPDFAttachment.pdf", filename="MyPDFAttachment.pdf", encoding="UTF-8") {};
	  };
	  writeOutput(fileExists(expandPath('./result/MyPDF08.pdf')));
  }
  catch(any e) {writeOutput("NO");}
</cfscript>

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

Watson Bug ID:	4127100

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email: adobelabs@itisdesign.com

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Priority newValue: 3 oldValue: 0 oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2016-02-16 05:00:22.0 action: updated fieldName: Fix By Milestone newValue: Alpha oldValue: Gold Master oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-12-02 11:19:51.0 action: updated fieldName: Fix By Product Milestone newValue: Alpha oldValue: Gold Master oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-12-02 11:19:51.0 action: updated fieldName: Dev Assigned newValue: mjain oldValue: vadiraja oprid: bihani recordName: RQ_DEFECT timpestamp: 2015-12-02 06:10:23.0 action: updated fieldName: Owner newValue: mjain oldValue: bihani oprid: bihani recordName: RQ_DEFECT timpestamp: 2015-12-02 06:10:23.0 action: updated fieldName: Fix By Product Milestone newValue: Gold Master oldValue: Blank oprid: bihani recordName: RQ_DEFECT timpestamp: 2015-12-02 06:10:23.0 action: updated fieldName: Reason newValue: Investigate oldValue: Blank oprid: bihani recordName: RQ_DEFECT timpestamp: 2015-12-02 06:10:23.0 action: updated fieldName: Fix By Milestone newValue: Gold Master oldValue: Blank oprid: bihani recordName: RQ_DEFECT timpestamp: 2015-12-02 06:10:23.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: bihani recordName: RQ_DEFECT timpestamp: 2015-12-02 06:10:23.0 action: updated fieldName: QE Assigned newValue: bihani oldValue: suchsing oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-10-27 13:48:14.0 action: updated fieldName: Owner newValue: bihani oldValue: suchsing oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-10-27 13:48:14.0 action: updated fieldName: Dev Assigned newValue: vadiraja oldValue: uogra oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-09-29 14:28:58.0 action: bulk updated fieldName: Owner newValue: suchsing oldValue: poojain oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-09-28 06:37:38.0 action: bulk updated fieldName: QE Assigned newValue: suchsing oldValue: poojain oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-09-28 06:37:38.0
Comment by CFwatson U.
3307 | March 10, 2016 02:03:44 AM GMT
Added By:rukumar Note Added: DDX operations can only work with absolute disk path. For supporting VFiles for DDX operations, they should be written to a temp location and after processing, the temp file should be written back to the VFS. Can be taken up in the updater. Date Added :2015-12-02 11:19:51.0 Added By:bihani Note Added: This will complete VFS support for cfpdf/cfpdfparam/cfpdfform and so looks important. Date Added :2015-12-02 06:10:24.0
Comment by CFwatson U.
3308 | March 10, 2016 02:04:59 AM GMT
Added By: PreRelease User User Name:Aaron Neff Note Added: Forum thread for this ticket is: http://prerelease.adobe.com/r/?fe8cd6aee89847a1bdccb19838cc6744 Please follow-up in that thread, not here in this ticket. Thanks!, -Aaron Date Added :2015-10-24 05:15:26.0 Added By: PreRelease User User Name:Aaron Neff Note Added: Entered Feature. Date Added :2015-09-22 04:53:20.0
Comment by CFwatson U.
3309 | March 10, 2016 02:09:41 AM GMT
Added By:nimsharm Note Added: Hi Rick, I have couple of question: 1. Are you getting this error message by simply clicking on Server Update > Updates link? If yes, then please share ColdFusion's settings summary and ColdFusion logs available at <cf_install_root/cfusion/logs>. 2. Are you facing this issue after installing an update? If yes, then please do not apply any update because we have not released any update of alpha build as of now. Date Added :2015-07-27 04:17:10.0 Added By: PreRelease User User Name:Rick Mason Note Added: Entered Bug. Two bugs and I haven't even written a line of code yet, when it said alpha you weren't kidding! Date Added :2015-07-25 21:30:43.0
Comment by CFwatson U.
3310 | March 10, 2016 02:30:17 AM GMT
Ignore the comment below that starts with Added by :nimsharm.
Comment by Suchika S.
3311 | March 10, 2016 02:34:57 AM GMT