Thanks Chris. Attached is the only example we have, and have knowingly seen. And we've been working with Japanese clients for years now.
Mark -----Original Message----- From: Chris Bowditch <[email protected]> Sent: 23 January 2026 14:44 To: [email protected] Subject: Re: Font names using multi-byte strings [EXTERNAL] Hi Mark, Are you able to attach your PDF so we can replicate this? Thanks, Chris On 15/01/2026 17:09, Mark Gibson wrote: > > Hi, > > I thought I’d just poll the community on this one, as I can’t see it > reported anywhere. > > We have a PDF that lists its fonts using Japanese characters (in this > case, it’s MS Gothic and MS PGothic, where “Gothic” actually is in > Japanese characters). > > When trying to import that image using fo:external-graphic > (fop-pdf-images.jar), we get an exception with the message “Only 8-bit > characters allowed by this implementation”. > > In reviewing FOP code, org.apache.fop.pdf.PDFName.toHex() throws this > exception if the character id is > 256. > > Does this mean FOP cannot handle cases where the names of PDF records > are not in simple ascii range? > > Caused by: java.lang.IllegalArgumentException: Only 8-bit characters > allowed by this implementation > > at org.apache.fop.pdf.PDFName.toHex(PDFName.java:78) > > at org.apache.fop.pdf.PDFName.escapeName(PDFName.java:64) > > at org.apache.fop.pdf.PDFName.<init>(PDFName.java:42) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.cloneForNewDocument(PDFClon > er.java:106) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.readCOSDictionary(PDFCloner > .java:154) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.cloneForNewDocument(PDFClon > er.java:104) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.readCOSObject(PDFCloner.jav > a:134) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.cloneForNewDocument(PDFClon > er.java:84) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.readCOSDictionary(PDFCloner > .java:154) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.cloneForNewDocument(PDFClon > er.java:104) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.readCOSDictionary(PDFCloner > .java:154) > > at > org.apache.fop.render.pdf.pdfbox.PDFCloner.cloneForNewDocument(PDFClon > er.java:104) > > at > org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.cloneForNewDocument(PDF > BoxAdapter.java:141) > > at > org.apache.fop.render.pdf.pdfbox.PDFBoxAdapter.createStreamFromPDFBoxP > age(PDFBoxAdapter.java:212) > > at > org.apache.fop.render.pdf.pdfbox.AbstractPDFBoxHandler.createStreamFor > PDF(AbstractPDFBoxHandler.java:111) > > at > org.apache.fop.render.pdf.pdfbox.PDFBoxImageHandler.handleImage(PDFBox > ImageHandler.java:77) > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
707685_876d5f93-a14f-4469-b588-a2b1044860b3.pdf
Description: 707685_876d5f93-a14f-4469-b588-a2b1044860b3.pdf
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
