RE: Embedding fonts - works from command line FOP but not in Coco on 2
Removing the embed-font attribute results in an error. Removing the entire font tag is making the Serializer ignore the font altogether, thus embedding default font. Thanks Satih -Original Message- From: Jeremias Maerki [SMTP:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 1:03 PM To: [EMAIL PROTECTED] Subject:Re: Embedding fonts - works from command line FOP but not in Coco on 2 The user config file is getting loaded (seen this in the log file). But for some reason, the font is not getting embedded. I have a question on the way fonts are treated in FOP. Other pdf generators allow us to specify whether fonts need to be embedded or referenced in the pdf file. If referenced, the font file should be available to Acrobat Reader on the rendering machine. If embedded, the font file will be part of the pdf file. Is this possible with FOP? If this is possible, my requirement will be met. Well, in that case you just have to remove the embed-file attribute of the font entry in user-config.xml. That's it. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding fonts - works from command line FOP but not in Coco on 2
Removing the embed-font attribute results in an error. Removing the entire font tag is making the Serializer ignore the font altogether, thus embedding default font. Not embed-font, embed-file! And what error? What does your userconfig.xml look like? Don't remove the metrics-file attribute. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Embedding fonts - works from command line FOP but not in Coco on 2
Sorry for misquoting. I actually meant embed-file. And I didn't remove the metrics file. The following is how my user-config file looks like. The error I get is Could not load user-config.xml - error. User-config.xml: - configuration fonts font metrics-file=D:/giro/FG_OCRB1.TTF.xml kerning=yes font-triplet name=OCRB style=normal weight=normal/ /font /fonts /configuration Thanks Satish -Original Message- From: Jeremias Maerki [SMTP:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 4:26 PM To: [EMAIL PROTECTED] Subject:Re: Embedding fonts - works from command line FOP but not in Coco on 2 Removing the embed-font attribute results in an error. Removing the entire font tag is making the Serializer ignore the font altogether, thus embedding default font. Not embed-font, embed-file! And what error? What does your userconfig.xml look like? Don't remove the metrics-file attribute. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding fonts - works from command line FOP but not in Coco on 2
This looks good. I wonder where the string - error comes from. You've probably double-checked that the userconfig.xml can be loaded from where you're running Cocoon. I don't have any more ideas other than to debug it. Sorry. Does anybody else have an idea? Sorry for misquoting. I actually meant embed-file. And I didn't remove the metrics file. The following is how my user-config file looks like. The error I get is Could not load user-config.xml - error. User-config.xml: - configuration fonts font metrics-file=D:/giro/FG_OCRB1.TTF.xml kerning=yes font-triplet name=OCRB style=normal weight=normal/ /font /fonts /configuration Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Embedding fonts - works from command line FOP but not in Coco on 2
I managed to generate the PDF finally (without embedding the font). The font we referred to is OCR-B-1. But Acrobat Reader displays illegible characters. The font type listed under the Fonts information shows it as True Type (CID). I reckon CID fonts are not supported by FOP at this point of time (as stated by Satoshi Ishigami in a separate post). I managed to get the Font embedding to work in Cocoon after adding a line in org/apache/fop/configuration/ConfigurationParser (endElement method). Not sure whether this is a bug or not. But after adding this line, font embedding works in Cocoon. Maybe I'll post this in Cocoon list too. Thanks Satish --- public void endElement(String s, String s1, String s2) { if(s1.equals(entry)) { switch(datatype) { case 0: // '\0' store(role, key, value); break; case 1: // '\001' store(role, key, list); break; case 2: // '\002' store(role, key, map); break; } status = 0; role = standard; if(keyStack.size() 0) keyStack.removeElementAt(keyStack.size() - 1); if(keyStack.size() 0) key = (String)keyStack.elementAt(keyStack.size() - 1); else key = ; value = ; } else if(s1.equals(subentry)) { map.put(subkey, value); status -= 16; if(keyStack.size() 0) keyStack.removeElementAt(keyStack.size() - 1); if(keyStack.size() 0) key = (String)keyStack.elementAt(keyStack.size() - 1); else key = ; value = ; } else if(s1.equals(key)) { status -= 2; keyStack.addElement(key); } else if(s1.equals(list)) { status -= 8; value = ; } else if(s1.equals(value)) status -= 4; else if(s1.equals(fonts) fontList.size()!= 0) // Line Added store(standard, fonts, fontList); else if(s1.equals(font)) { fontInfo = new FontInfo(fontName, metricsFile, kerning, fontTriplets, embedFile); fontList.addElement(fontInfo); fontTriplets = null; metricsFile = null; embedFile = null; fontName = null; kerningAsString = ; } else { s1.equals(font-triplet); } } -Original Message- From: Jeremias Maerki [SMTP:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 6:21 PM To: [EMAIL PROTECTED] Subject:Re: Embedding fonts - works from command line FOP but not in Coco on 2 This looks good. I wonder where the string - error comes from. You've probably double-checked that the userconfig.xml can be loaded from where you're running Cocoon. I don't have any more ideas other than to debug it. Sorry. Does anybody else have an idea? Sorry for misquoting. I actually meant embed-file. And I didn't remove the metrics file. The following is how my user-config file looks like. The error I get is Could not load user-config.xml - error. User-config.xml: - configuration fonts font metrics-file=D:/giro/FG_OCRB1.TTF.xml kerning=yes font-triplet name=OCRB style=normal weight=normal/ /font /fonts /configuration Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Embedding fonts - works from command line FOP but not in Coco on 2
I think I jumped the gun too early on this. On further analysis, found that the root cause for this is different. There is a config.xml file in fop.jar which has null values for fonts tag. So, the fonts value defined in the user-config.xml file are getting overridden by the null values in the default config.xml file. Thus fonts are not getting embedded. Either the documentation has to be changed to mention this fact (so that the users can define fonts to be embedded in the config.xml of fop.jar or remove the tag here and use an external user-config.xml) or the code has to be fixed to append the values parsed from both the config files. This is only when Cocoon is used. Otherwise (standalone FOP), it works fine. Thanks Satish -Original Message- From: Satish_Gunda [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 9:57 AM To: [EMAIL PROTECTED] Subject:RE: Embedding fonts - works from command line FOP but not in Coco on 2 I managed to generate the PDF finally (without embedding the font). The font we referred to is OCR-B-1. But Acrobat Reader displays illegible characters. The font type listed under the Fonts information shows it as True Type (CID). I reckon CID fonts are not supported by FOP at this point of time (as stated by Satoshi Ishigami in a separate post). I managed to get the Font embedding to work in Cocoon after adding a line in org/apache/fop/configuration/ConfigurationParser (endElement method). Not sure whether this is a bug or not. But after adding this line, font embedding works in Cocoon. Maybe I'll post this in Cocoon list too. Thanks Satish --- public void endElement(String s, String s1, String s2) { if(s1.equals(entry)) { switch(datatype) { case 0: // '\0' store(role, key, value); break; case 1: // '\001' store(role, key, list); break; case 2: // '\002' store(role, key, map); break; } status = 0; role = standard; if(keyStack.size() 0) keyStack.removeElementAt(keyStack.size() - 1); if(keyStack.size() 0) key = (String)keyStack.elementAt(keyStack.size() - 1); else key = ; value = ; } else if(s1.equals(subentry)) { map.put(subkey, value); status -= 16; if(keyStack.size() 0) keyStack.removeElementAt(keyStack.size() - 1); if(keyStack.size() 0) key = (String)keyStack.elementAt(keyStack.size() - 1); else key = ; value = ; } else if(s1.equals(key)) { status -= 2; keyStack.addElement(key); } else if(s1.equals(list)) { status -= 8; value = ; } else if(s1.equals(value)) status -= 4; else if(s1.equals(fonts) fontList.size()!= 0) // Line Added store(standard, fonts, fontList); else if(s1.equals(font)) { fontInfo = new FontInfo(fontName, metricsFile, kerning, fontTriplets, embedFile); fontList.addElement(fontInfo); fontTriplets = null; metricsFile = null; embedFile = null; fontName = null; kerningAsString = ; } else { s1.equals(font-triplet); } } -Original Message- From: Jeremias Maerki [SMTP:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 6:21 PM To: [EMAIL PROTECTED] Subject:Re: Embedding fonts - works from command line FOP but not in Coco on 2 This looks good. I wonder where the string - error comes from. You've probably double-checked that the userconfig.xml can be loaded from where you're running Cocoon. I don't have any more ideas other than
RE: Embedding fonts - works from command line FOP but not in Coco on 2
The user config file is getting loaded (seen this in the log file). But for some reason, the font is not getting embedded. I have a question on the way fonts are treated in FOP. Other pdf generators allow us to specify whether fonts need to be embedded or referenced in the pdf file. If referenced, the font file should be available to Acrobat Reader on the rendering machine. If embedded, the font file will be part of the pdf file. Is this possible with FOP? If this is possible, my requirement will be met. Thanks, Satish -Original Message- From: Jeremias Maerki [SMTP:[EMAIL PROTECTED]] Sent: Saturday, February 16, 2002 11:25 PM To: [EMAIL PROTECTED] Subject:Re: Embedding fonts - works from command line FOP but not in Coco on 2 Well, I'm no Cocoon-user. I just happen to have looked at the source code once or twice. Try to modify the logging configuration of Cocoon so it displays debug messages from FOPSerializer.java. It may help you to find out what really happens (for example if the user config could be loaded or not). Of course, you can try to debug into FOPSerializer to see what happens. Good luck! On 16.02.2002 06:48:10 Satish_Gunda wrote: Thanks for your reply Jeremias ! We did specify the user-confg file as per the instructions; and coded both relative path (from the place the application has started the JVM) and also absolute path. Can you pls let me know if there is something else I'm missing? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding fonts - works from command line FOP but not in Coco on 2
The user config file is getting loaded (seen this in the log file). But for some reason, the font is not getting embedded. I have a question on the way fonts are treated in FOP. Other pdf generators allow us to specify whether fonts need to be embedded or referenced in the pdf file. If referenced, the font file should be available to Acrobat Reader on the rendering machine. If embedded, the font file will be part of the pdf file. Is this possible with FOP? If this is possible, my requirement will be met. Well, in that case you just have to remove the embed-file attribute of the font entry in user-config.xml. That's it. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding fonts - works from command line FOP but not in Coco on 2
Well, I'm no Cocoon-user. I just happen to have looked at the source code once or twice. Try to modify the logging configuration of Cocoon so it displays debug messages from FOPSerializer.java. It may help you to find out what really happens (for example if the user config could be loaded or not). Of course, you can try to debug into FOPSerializer to see what happens. Good luck! On 16.02.2002 06:48:10 Satish_Gunda wrote: Thanks for your reply Jeremias ! We did specify the user-confg file as per the instructions; and coded both relative path (from the place the application has started the JVM) and also absolute path. Can you pls let me know if there is something else I'm missing? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]