Skip to Content
0
Former Member
Aug 05, 2014 at 04:57 PM

Help me! Export to pdf from java (problem with font)

290 Views

I'm trying to export to pdf from a java application. When I run my application with a report that is designed with arial font works great but If my report has a different font (Code 128.ttf) my application doesn't work.



ERROR 58031[main] - com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:719) - detected an exception: java.lang.NullPointerException

at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106) at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106)

ago 05, 2014 11:56:22 AM javaapplication3.JavaApplication3 ImportarPDF

Grave: null

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237)

at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.ControlValueTable.if(SourceFile:58)

at javaapplication3.JavaApplication3.ImportarPDF(JavaApplication3.java:61)

at javaapplication3.JavaApplication3.main(JavaApplication3.java:48)

Caused by: java.lang.NullPointerException

at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.ControlValueTable.if(SourceFile:58)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.ControlValueTable.<init>(SourceFile:53)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.OpenTypeSubsetter.<init>(SourceFile:56)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.if(SourceFile:414)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.a(SourceFile:314)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.ControlValueTable.<init>(SourceFile:53)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.OpenTypeSubsetter.<init>(SourceFile:56)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.a(SourceFile:1540)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.PdfDocumentManager.if(SourceFile:350)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.PdfAdvancedDocumentModeller.do(SourceFile:348)

at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.finalizeExportJob(SourceFile:235)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:652)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1943)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.if(SourceFile:414)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.a(SourceFile:314)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.a(SourceFile:1540)

at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)

at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.PdfDocumentManager.if(SourceFile:350)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.PdfAdvancedDocumentModeller.do(SourceFile:348)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.finalizeExportJob(SourceFile:235)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:652)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586)

at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1943)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)

... 5 more

Exception in thread "main" java.lang.NullPointerException

at javaapplication3.JavaApplication3.ImportarPDF(JavaApplication3.java:83)

at javaapplication3.JavaApplication3.main(JavaApplication3.java:48)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)

at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)

at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

at javaapplication3.JavaApplication3.ImportarPDF(JavaApplication3.java:61)

at javaapplication3.JavaApplication3.main(JavaApplication3.java:48)