Error populating CFPDFForm - java.lang.NullPointerException: platform, locale and platform name must not be null

I hit my head against the wall, trying to figure out the cause of the error below.

enter image description here

All I do is very simple CFPDFFORM to fill out a PDF form.

<cfset source = expandPath("Customer.pdf")> <cfpdfform action="populate" source="#source#"> <cfpdfformparam name="Name" value="John Doe"> <cfpdfformparam name="Address" value="123 Test Cir"> <cfpdfformparam name="City" value="Some City"> <cfpdfformparam name="State" value="Some State"> <cfpdfformparam name="Zip" value="11111"> <cfpdfformparam name="Phone" value="123-456-7890"> </cfpdfform> 

I did a lot of searching and found very few people who spoke about this error. One page that I found, ColdFusion CFPDFFORM does not populate the PDF form fields . I tried to think about going through my fonts and looking for corrupt ones. I even used a program called Fix Fonts Folder ( http://fix-fonts-folder.en.softonic.com/ ), which was able to find some damaged fonts. But even then, I still get the error. So, I am desperately looking for an answer.

Just in case, I am running ColdFusion 10 Update 9 on Windows 7.

Thanks in advance.

+4
source share
4 answers

The reported error workaround resolved the issue. Thanks Miguel-F

Workaround: "remove all fonts installed with the same date as the applications for the application" announcement "6, or delete the advertisement" 6 "

+2
source

I wrote a script that will analyze all font files in c: \ windows \ fonts and report errors:

 <cfset fontobj = createobject("java","com.adobe.fontengine.fontmanagement.FontLoader")> <cfdirectory action="list" directory="c:\windows\fonts" name="fontdir"> <table border="1" style="border-collapse:collapse"> <tr> <th>Font Name:</th> <th>Error</th> </tr> <cfloop query="fontdir"> <cftry> <cfset loaded = fontobj.load(createobject("java","java.net.URL").init("file:///C|/windows/fonts/#fontdir.name#"))> <cfif arraylen(loaded) gt 0> <cfset dummy="#loaded[1].getPlatformFontDescription()[1].toString()#" > </cfif> <cfcatch> <cfif findnocase("platform",cfcatch.message)> <tr> <td><cfoutput>#fontdir.name#</cfoutput></td> <td><cfoutput>#cfcatch.message#</cfoutput></td> </tr> </cfif> </cfcatch> </cftry> </cfloop> </table> 
+6
source

I had the same problem right after installing CS6.0.

Platform:

  • CF9.0
  • Win 7
  • CS6 (obviously)

Through the cork and error, as mentioned above, and a few coldfusion reboots, I reduced it to the following font files that you can delete using the font manager by going to C: \ Windows \ Fonts : -

  • AdobeNaskh-Medium.otf
  • MyriadArabic-Bold.otf
  • MyriadArabic-BoldIt.otf
  • MyriadArabic-It.otf
  • MyriadArabic-Regular.otf

Hope this helps someone. It took me a few hours to fix this wiggle.

+4
source

there was the same problem.

My solution (which matches the above correct answer): Here is a list of fonts that Adobe installs using Creative Suite 6: http://www.adobe.com/type/browser/fontinstall/cs6installedfonts.html

  • Copy all of these fonts to a separate folder and remove them from the Windows / Fonts directory.
  • Check the CFPDFFORM bit and confirm its operation.
  • Manually add them back.

In my case, it turned out that none of these fonts was damaged on its own, although it probably was not installed like Windows. Reinstalling manually manually fixed the problem.

One more note: I deleted everything until MyriadPro (including it) constantly updated the page containing the CFPDFFORM bit until it worked. Therefore, for those who are trying to quickly solve the problem, I recommend starting with the MyriadPro family. It may turn out to be something that breaks things.

Hope this helps someone!

/////////////// UPDATED 02/07/2014 ///////////////////////////// //////////////////////////////////////

It turns out I cannot comment until a certain number of points have been received, so I can’t say how much the answer from Jesse Carleton (above) helped me.

Here is another step that solved my error:

  • It turns out that some of the installed Adobe fonts have name values ​​as null, so cfpdfform performs poorly. To find these files, use the script that Jesse Carleton created (again, he is higher in one of the answers)

  • At least in my case, all of these fonts had duplicate meanings (regular and _0). Normal values ​​were visible and easily removed using the Windows font manager. However, _0 were not visible.

  • Download software such as FontExpert2014 (or any other font manager, for that matter) and find the files that you could not see in the Windows font manager.

  • To check if all damaged fonts are removed, run the script from step 1 again. When you get an empty table, try the cfpdfform bit, which didn't work before, and everything should be fine.

* The software from step 3 was downloaded as an evaluation version and helped.

+2
source

All Articles