tracker issue : CF-4200444

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

Either datafile XML or data XML contained in the PDF document is invalid.

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): David Swain / David Swain ()

Created: 12/27/2017

Components: Document Management, PDF manipulation

Versions: 2016,11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: ColdFusion 2016 Update 5 /

Priority/Frequency: Minor / All users will encounter

Locale/System: English / Windows 7 SP1 64-bit

Vote Count: 1

Problem Description: I am trying to use CFPDFFORM to read the data in PDF document from the IRS.  I can read other documents with no problem, but I can't seem to read the one that I need to read which is the 4506-T (2017).

Steps to Reproduce: use cfpdfform action="read" ...

Actual Result:

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator. 

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Either datafile XML or data XML contained in the PDF document is invalid.

 
The error occurred in C:/inetpub/wwwroot/MYSITE/views/portal/orders/reviewDocument.cfm: line 100
98 :     
99 : 
100 :   <cfpdfform action="read" source="#expandPath('../../assets/#variables.F4506TDocumentName#')#" xmldata="x" result="r">
101 :     </cfpdfform>
102 : <!---
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser  	Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Remote Address  	127.0.0.1
Referrer  	http://127.0.0.1/views/portal/main.cfm?view=orderDetail&orderid=101
Date/Time  	27-Dec-17 03:36 PM
Stack Trace
at cfreviewDocument2ecfm469546337.runPage(C:/inetpub/wwwroot/MYSITE/views/portal/orders/reviewDocument.cfm:100) at cfmain2ecfm1328513757.runPage(C:/inetpub/wwwroot/MYSITE/views/portal/main.cfm:15) 

coldfusion.pdf.XFDFXMLtoCFStruct$InvalidDataXMLException: Either datafile XML or data XML contained in the PDF document is invalid.
	at coldfusion.pdf.XFAXMLtoCFStruct.parseXMLtoCF(XFAXMLtoCFStruct.java:118)
	at coldfusion.tagext.lang.PDFFormTag.doEndTag(PDFFormTag.java:404)
	at cfreviewDocument2ecfm469546337.runPage(C:\inetpub\wwwroot\MYSITE\views\portal\orders\reviewDocument.cfm:100)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
	at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
	at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
	at cfmain2ecfm1328513757.runPage(C:\inetpub\wwwroot\MYSITE\views\portal\main.cfm:15)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
	at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:484)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:153)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:219)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:363)
	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:507)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Either datafile XML or data XML contained in the PDF document is invalid.

Expected Result: Not an error

Any Workarounds: I am able to read other pdf documents from the IRS, like the same 4506-T (2015) version.

Attachments:

  1. December 27, 2017 00:00:00: f4506t.pdf

Comments:

I was using chrome browser.
Comment by David S.
148 | December 27, 2017 08:49:11 PM GMT
Please feel free to download the attached document or get the one from the IRS, just search for 4506-T (2017). Use the cfPdfForm tag to read it and then try to dump the results. If you don't get an error, please post here. Thanks.
Comment by David S.
149 | December 27, 2017 09:17:50 PM GMT
Hi, Can you please share the f4506-t form for 2015 or whenever it used to work? It will help us debug the issue faster Thanks, Kailash
Comment by Kailash B.
150 | January 10, 2018 06:08:10 AM GMT
Hi, Any update on this? Thanks, Kailash
Comment by Kailash B.
151 | January 16, 2018 10:53:43 AM GMT
Hi David, You can see the XML data in the XFA PDF by using the following code: {code} <cfpdfform action="read" source="#expandPath('f4506-t-2015-09-00.pdf')#" xmldata="x"></cfpdfform> <cfdump var="#x#"> {code} The xmlData contains the meta information about the form. Will this solve the problem for you?
Comment by Mayur J.
27533 | April 16, 2018 01:45:13 PM GMT
@David - Can you confirm if the workaround suggested by Mayur would help here?
Comment by Vamseekrishna N.
29707 | September 17, 2018 08:45:31 AM GMT
My organization is upgrading from CF11 to CF2018 and we are experiencing this issue when trying to read in PDF Forms during testing. Forms that ccan be read in CF11 are throwing OP's error in CF2018.
Comment by Paul J.
31120 | August 13, 2019 01:17:56 PM GMT
I've atttached two forms: working and broke. Working is just a simple form with a text field created in LiveCycle Designer ES4 and saved as a "Adobe Static PDF Form". Broke is the working form with a Table Object added to the form. Running the below code the working pdf can be read and both it's result and XMLdata used. The broke.pdf throws the error and is unable to read the form unless the result="PDFInfo" is removed. If that is removed the XMLInfo can be used as a workaround. Which is confusing, since the thrown error is that the XML is invalid. <cfpdfform action="read" source="working.pdf" result="PDFInfo" XMLdata="XMLInfo"/> <cfdump var="#PDFInfo#" label="working-result"> <cfdump var="#XMLInfo#" label="working-xml"> <cfpdfform action="read" source="broke.pdf" result="PDFInfo" XMLdata="XMLInfo"/> <cfdump var="#PDFInfo#" label="broke-result"> <cfdump var="#XMLInfo#" label="broke-xml">
Comment by George A.
31642 | October 17, 2019 01:34:46 PM GMT