Hi, I am just not able to embed fonts into my PDF images while using PDFTranscoder. As a result, the PDF's are quite large.
I created a config file with the font declarations and used the Config builder to configure the transcoder. But it does not embed the fonts. I could be doing something wrong; but I don't know what. I tried to remove the <fonts> tag in the config file; but even that did not help. What is interesting is that when I tried to convert my SVG (with embedded fonts) into a PDF using the batik-rasterizer.jar utility, it actually gave me a PDF with embedded fonts. In this case, I hadn't even provided any font information. What is the reason for this? Also, if this *phenomenon* can be banked on, can I try and use the batik-rasterizer utility from within my application? Is there any semi-stable release of FOP since 0.20.5 where the "xml:space" attribute is respected and which is ready for use in applications. It need not have all features that are there in the current version - I just want that attribute to be respected. If such a release does not exist, is there any code snippet that recognizes the "xml:space" attribute which I can plug into the 0.20.5 code and rebuild the fop.jar file? Wish you a Merry Christmas. Thanks, Saptarshi. -----Original Message----- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, December 24, 2004 12:54 PM To: [EMAIL PROTECTED] Subject: Re: Handling multiple spaces On 24.12.2004 06:36:14 Saptarshi Sen wrote: > Hi, > I got the problem regarding the NoClassDefFoundErrors. The new jars > weren't mentioned in my Manifest file. Now that I look at this a second time I realize that you mean that you've solved the problem. D'Oh. > I was able to generate PDF's from my > application using the PDF transcoder. However, they do not have the fonts > embedded and hence are quite large. > > I had a few questions regarding font embedding. > 1. Can I use the same font metrics files(xml) with Batik that I used > for FOP? Yes, I think so. If there are any problems just recreate the font metrics using the PFMReader and TTFReader from FOP's CVS HEAD. But there shouldn't really be any differences. > 2. The SVG that I generate (using Corda PopChart) has fonts embedded > within it. Say, I was using TradeGothic CondEighteen, it appears in my SVG > as: > > <!ENTITY s2 "font-family:'CF TradeGothic > CondEighteen';font-size:7;fill:#000000;pointer-events:none;"> (Note the 'CF > ' prepended to the font name). > > The font definition is like: > <defs> > <font horiz-adv-x="1168"> > <font-face font-family="CF TradeGothic > CondEighteen" units-per-em="1024" panose-1="0 0 4 0 0 0 0 0 0 0" ascent="950" > descent="-216"/> > .......... > </font> > </defs> > (Again, the font is named as 'CF TradeGothic CondEighteen'). > > Am I correct in saying that the 'CF ' part is supposed to be internal > to the SVG file and not to be used outside it? The font in the metrics file > is called 'TradeGothic CondEighteen' (which is what it should be). I've seen that there are sometimes multiple names for a single font which can lead to a certain amount of confusion. > Now, if I were to use the PDFTranscoder to convert the SVG to PDF, do > I need to replace all the 'CF TradeGothic CondEighteen' with 'TradeGothic > CondEighteen'? I've seen behaviour like this before but until today haven't investigated, yet. Simply use the same names in your font configuration XML so the font gets detected. You can define aliases (i.e. font-triplets) there. > Also, while converting from SVG to PDF, are the font > definitions <defs><font ...>......</font></defs> taken into consideration? I > mean, does PDFTranscoder use the font definition? (When I was using FOP to do > this conversion, I used to form the FO file from the SVG file. In that, I > used to keep only the SVG part and strip the definitions. I also used to > replace the 'CF TradeGothic CondEighteen' with 'TradeGothic CondEighteen'. Do > I need to the same/similar thing here?) FOP's :-) PDFTranscoder cannot use these embedded SVG fonts. They are handled by Batik. There's a todo item where these embedded fonts should be converted to Type3 fonts but that's not implemented, yet. I suggest you do the same stripping you've done for FOP. > I am attaching a typical SVG file that is generated by PopChart. Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
----------------------------------------------------------------------------------------------------------------------------- Disclaimer ----------------------------------------------------------------------------------------------------------------------------- "This message(including attachment if any)is confidential and may be privileged.Before opening attachments please check them for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside.If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission." -----------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]