Problems Opening PDF Form on PC

Hello,

I get the following errors on PCs when trying to convert a PDF form stored in a BLOB. The PDF form was created using Acrobat 7 Pro on a Mac.

Sep 5, 2006 9:21:31 PM com.servoy.j2db.util.Debug error
SEVERE: Throwable
ExceptionConverter: java.io.UnsupportedEncodingException: MacRoman
	at sun.io.Converters.getConverterClass(Unknown Source)
	at sun.io.Converters.newConverter(Unknown Source)
	at sun.io.ByteToCharConverter.getConverter(Unknown Source)
	at java.lang.StringCoding.decode(Unknown Source)
	at java.lang.String.<init>(Unknown Source)
	at java.lang.String.<init>(Unknown Source)
	at com.lowagie.text.pdf.PdfEncodings.convertToString(Unknown Source)
	at com.lowagie.text.pdf.DocumentFont.fillEncoding(Unknown Source)
	at com.lowagie.text.pdf.DocumentFont.doType1TT(Unknown Source)
	at com.lowagie.text.pdf.DocumentFont.<init>(Unknown Source)
	at com.lowagie.text.pdf.AcroFields.getAppearance(Unknown Source)
	at com.lowagie.text.pdf.AcroFields.setField(Unknown Source)
	at com.lowagie.text.pdf.AcroFields.setField(Unknown Source)
	at com.servoy.r2.plugins.pdf_output.PDFProvider.js_convertPDFFormToPDFDocument(PDFProvider.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:334)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1254)
	at org.mozilla.javascript.gen.c52.call(fillApplication:43)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1254)
	at org.mozilla.javascript.gen.c13.call(viewAnthemForm:4)
	at com.servoy.j2db.scripting.f.executeFunction(Unknown Source)
	at com.servoy.j2db.FormController.a(Unknown Source)
	at com.servoy.j2db.FormController.executeFunction(Unknown Source)
	at com.servoy.j2db.FormController.actionPerformed(Unknown Source)
	at com.servoy.j2db.FormController$a.actionPerformed(Unknown Source)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

FWIW, this is my first attempt at creating a PDF form. What could be causing that encoding error? Fonts? I initially had a mix of Arial and Courier, then tried just Arial, but still no luck.

FWIW, I didn’t create the original (it’s a health insurance application), and simply adding one text field causes this problems listed above.

Any ideas on where I could begin troubleshooting this problem?

It looks like the pdf classes do not like the Mac encoding. I don’t see where in Acrobat you can set the encoding of the document however but that is where you have to look into. Mac and encoding has always been a tricky business until they moved to unicode, Macroman encoding sounds pre unicode to me.

Hi Jan,

I’ve browsed the Acrobat preferences and couldn’t find a way to switch the encoding options, either (It’s a vanilla installation). btw, my initial reaction of Acrobat is that things are hard to find LOL (have to dig through lots of menus/dialogs).

FWIW, I’ve at least discovered a workaround. When choosing the font for a text field, the popup menu is divided into three sections. The bottom section seems to be a typical listing of the installed fonts (I had initially chosen fonts from this section). The first section only contains a few fonts, but selecting one of these fonts solved my problems. Maybe these fonts are “safer” in some way.