• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Including Fonts into PDF using ERPDFGeneration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including Fonts into PDF using ERPDFGeneration


  • Subject: Re: Including Fonts into PDF using ERPDFGeneration
  • From: Theodore Petrosky <email@hidden>
  • Date: Thu, 30 Jan 2014 07:41:09 -0500

actually the font name would be something like   Arial.ttf or Helvetica.ttf

the docs do say 'filename'.



On Jan 30, 2014, at 7:38 AM, Theodore Petrosky <email@hidden> wrote:

> the docs say:
>
> (optional) array of font filenames to include for PDF generation
>
> It doesn't say a dictionary.
>
> NSArray<String> fontsArray = NSArray<String>("Arial", "Helvetica");
>
> Is how I would do it according to the documentation. Of course, I generally just use JasperReports and convert fonts to .jar files and put them in the build path.Then I don't have to worry.
>
> Ted
>
> On Jan 30, 2014, at 7:13 AM, Christoph Wick <email@hidden> wrote:
>
>> Hi List,
>>
>> I try to include fonts into a PDF document using ERPDFGeneration. The documentation of ERPFDWrapper tells me that there is a binding called "fonts". The binding is described as "(optional) array of font filenames to include for PDF generation".
>>
>> OK so far. But whatever I set the "fonts" bindings to, I get an ClassCastException that a String cannot be casted to NSArray<String>. Stacktrace below.
>>
>> I've looked into the code and I found line 120 in FlyingSaucerImpl.java:
>>
>> 	NSArray<String> fonts = (NSArray<String>) configuration.objectForKey("fonts");
>>
>> So, what's the correct syntax of the bindings value string to be converted into an NSArray of Strings? I've tried ['Font 1', 'Font2'] as well as {'Font 1', 'Font2'}, but that all doesn't work.
>>
>> Thx,
>> C.U.CW
>>
>>
>> Stacktrace:
>>
>> Error:	java.lang.ClassCastException: java.lang.String cannot be cast to com.webobjects.foundation.NSArray
>> Reason:	java.lang.String cannot be cast to com.webobjects.foundation.NSArray
>> Stack trace:
>> File	Line#	Method	Package
>> FlyingSaucerImpl.java	120	fontsFromConfiguration	er.pdf.builder
>> FlyingSaucerImpl.java	91	setSource	er.pdf.builder
>> ERPDFUtilities.java	132	htmlAsPdf	er.pdf
>> ERPDFWrapper.java	89	responseAsPdf	er.pdf
>> ERPDFWrapper.java	66	appendToResponse	er.pdf
>> WOComponent.java	1122	appendToResponse	com.webobjects.appserver
>> ERXComponent.java	195	appendToResponse	er.extensions.components
>> WOSession.java	1385	appendToResponse	com.webobjects.appserver
>> WOApplication.java	1794	appendToResponse	com.webobjects.appserver
>> ERXApplication.java	2005	appendToResponse	er.extensions.appserver
>> ERXComponentRequestHandler.java	190	_dispatchWithPreparedPage	er.extensions.appserver
>> ERXComponentRequestHandler.java	235	_dispatchWithPreparedSession	er.extensions.appserver
>> ERXComponentRequestHandler.java	268	_dispatchWithPreparedApplication	er.extensions.appserver
>> ERXComponentRequestHandler.java	302	_handleRequest	er.extensions.appserver
>> ERXComponentRequestHandler.java	378	handleRequest	er.extensions.appserver
>> WOApplication.java	1687	dispatchRequest	com.webobjects.appserver
>> ERXApplication.java	2109	dispatchRequestImmediately	er.extensions.appserver
>> ERXApplication.java	2074	dispatchRequest	er.extensions.appserver
>> WOWorkerThread.java	144	runOnce	com.webobjects.appserver._private
>> WOWorkerThread.java	226	run	com.webobjects.appserver._private
>> Thread.java	722	run	java.lang
>>
>>
>> --
>> Christoph Wick - Diplom Informatiker, Managing Director
>> i4innovation GmbH, Professor-Neu-Allee 39, 53225 Bonn, Germany
>>
>> T +49 2 28 28 62 97 93
>> M +49 1 51 22 65 78 90
>> F +49 2 28 28 62 97 99
>> M email@hidden
>> W www.i4innovation.de
>> Skype: christoph_wick
>>
>> Geschäftsführer: Thomas Heep, Christoph Wick
>> Sitz der Gesellschaft: Bonn | Amtsgericht Bonn HRB 18548 | USt-IdNr.: DE276502600
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Including Fonts into PDF using ERPDFGeneration (From: Christoph Wick <email@hidden>)
 >Re: Including Fonts into PDF using ERPDFGeneration (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: Including Fonts into PDF using ERPDFGeneration
  • Next by Date: Doing database creation before EOF gets involved ?
  • Previous by thread: Re: Including Fonts into PDF using ERPDFGeneration
  • Next by thread: Doing database creation before EOF gets involved ?
  • Index(es):
    • Date
    • Thread