Converting into RTF - fo:block-container ignored

2013-04-04 Thread Norman Brügmann
Hi all,

I have a problem converting the element fo:block-container into a RTF-File. The
element is ignored and only the nested fo:block elements are converted.
Everything is fine converting into pdf. I didn't get a solution or hint with the
help of google or in the archive, so I hope somebody can help me.

Here is a snippet:

...
  < fo:flow flow-name= "xsl-region-body" >
    < fo:block > HUHU < /fo:block >
    < fo:block-container absolute-position= "absolute" top= "5mm" left=
"49.50mm" width= "35mm" height= "274.5mm" padding-start= "7.00pt" padding-end=
"7.00pt" border-left-style= "solid" border-left-width= "0.50pt" border-color=
"#00A5EA" >
  < fo:block font-family= "Arial" font-style= "normal" font-weight= "normal"
font-size= "8.00pt" text-align= "left" color= "black" > Bereich < /fo:block >
  < fo:block font-family= "Arial" font-style= "normal" font-weight= "normal"
font-size= "8.00pt" text-align= "left" color= "black" > Vertrieb/Produktion <
/fo:block >
    < /fo:block-container >
  < /fo:flow >
...

Do I have a mistake in there which i can't figure out so far?

Thank you very much.
        
Best Regards

Norman

corrupt PDF file

2013-04-04 Thread eelboy

Hi,

I am using FOP for the first time to generate PDF files using an XML 
source file, and an accompanying XSL-FO stylesheet.  From the command 
line I can issue this command and generate the PDF just fine:


./fop -xml /some/file.xml -xsl /some/file.xsl -pdf ~/new.pdf

However, in my java application the same source files create a PDF which 
will not open (one program says it is corrupt, and another says it is 
encrypted).  I also see they are slightly different in size. I'm 
probably not setting this up correctly.  Any help would be appreciated - 
thanks!


Quick java excerpt:

OutputStream out = new BufferedOutputStream(new FileOutputStream(new 
File(pdfFileName)));


Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);

TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new 
StreamSource(xslFileName));


Source xml = new StreamSource(new File(xmlFileName));

Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(xml, res);



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: corrupt PDF file - disregard

2013-04-04 Thread eelboy

Doh! Sorry -- just forgot to close the output stream - works like a charm.
Edward

On 04/04/2013 03:31 PM, eelboy wrote:

Hi,

I am using FOP for the first time to generate PDF files using an XML 
source file, and an accompanying XSL-FO stylesheet.  From the command 
line I can issue this command and generate the PDF just fine:


./fop -xml /some/file.xml -xsl /some/file.xsl -pdf ~/new.pdf

However, in my java application the same source files create a PDF 
which will not open (one program says it is corrupt, and another says 
it is encrypted).  I also see they are slightly different in size. I'm 
probably not setting this up correctly.  Any help would be appreciated 
- thanks!


Quick java excerpt:

OutputStream out = new BufferedOutputStream(new FileOutputStream(new 
File(pdfFileName)));


Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);

TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new 
StreamSource(xslFileName));


Source xml = new StreamSource(new File(xmlFileName));

Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(xml, res);



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Error with missing glyphs in font.

2013-04-04 Thread Nathan Davis
Hello all,
I've been chasing an issue with FOP for a little while and hit a bit of 
a wall. 
I've added a new font to the list of fonts we can use when rendering a 
PDF.  However no matter what character I enter, FOP gives me an error for every 
single letter.  For example, with the letter E it says 'WARNING: Glyph "e" 
(0x65, e) not available in font "Code128".'
There are lots of posts where people are trying to pass in non-english 
language, but in this case I'm passing in standard roman letters and numbers.  
Nothing fancy.  

In searching this error message I've found the recommendation to add 
the font to fop.xconf as described here: 
http://xmlgraphics.apache.org/fop/trunk/fonts.html#truetype-collections-metrics 
 but I still get the error. 
The font I'm trying to get working here is a bar code font I downloaded 
from this site: http://www.jtbarton.com/Barcodes/Code128.aspx and I've opened 
up the font with a true type editor.  There's nothing unusual there.  Just a 
pretty standard font and looking at the character map, I can see an entry for 
0x65 that matches correctly and looks just like any other font.  So I'm really 
at a loss.  Any suggestions where to look next?

Also, just an fyi, I know there's the option to add Barcode4j as an 
extension to FOP.  However since I'm using a system that has FOP embedded into 
it, it's impossible for us to add any extensions to FOP.  I've been down that 
road with the vendor and we're stuck with using a barcode font and manually 
calculating the checksum.  


Thank you,

-Nathan Davis

This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to which 
they are addressed. If you have received this email in error 
please notify the system manager. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any 
damage caused by any virus transmitted by this email.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Error with missing glyphs in font.

2013-04-04 Thread Glenn Adams
Keep in mind that character codes in FOP files always represent Unicode
code points, not glyph codes. You should check the font's CMAP to see what
Unicode codepoints it assigns to its glyphs. They will probably be in the
PUA [1], i.e., from 0xE000 to 0xF8FF. Then you will need to use these codes
in your FOP source file, e.g., by using numeric character references, like
฀ etc.

You should not be specifying or using an external font metrics file.

[1] http://en.wikipedia.org/wiki/Private_Use_(Unicode)

On Thu, Apr 4, 2013 at 3:23 PM, Nathan Davis  wrote:

> Hello all,
> I've been chasing an issue with FOP for a little while and hit a
> bit of a wall.
> I've added a new font to the list of fonts we can use when
> rendering a PDF.  However no matter what character I enter, FOP gives me an
> error for every single letter.  For example, with the letter E it says
> 'WARNING: Glyph "e" (0x65, e) not available in font "Code128".'
> There are lots of posts where people are trying to pass in
> non-english language, but in this case I'm passing in standard roman
> letters and numbers.  Nothing fancy.
>
> In searching this error message I've found the recommendation to
> add the font to fop.xconf as described here:
> http://xmlgraphics.apache.org/fop/trunk/fonts.html#truetype-collections-metrics
>  but I still get the error.
> The font I'm trying to get working here is a bar code font I
> downloaded from this site: http://www.jtbarton.com/Barcodes/Code128.aspxand 
> I've opened up the font with a true type editor.  There's nothing
> unusual there.  Just a pretty standard font and looking at the character
> map, I can see an entry for 0x65 that matches correctly and looks just like
> any other font.  So I'm really at a loss.  Any suggestions where to look
> next?
>
> Also, just an fyi, I know there's the option to add Barcode4j as
> an extension to FOP.  However since I'm using a system that has FOP
> embedded into it, it's impossible for us to add any extensions to FOP.
>  I've been down that road with the vendor and we're stuck with using a
> barcode font and manually calculating the checksum.
>
>
> Thank you,
>
> -Nathan Davis
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to which
> they are addressed. If you have received this email in error
> please notify the system manager. Please note that any views or
> opinions presented in this email are solely those of the author
> and do not necessarily represent those of the company. Finally,
> the recipient should check this email and any attachments for the
> presence of viruses. The company accepts no liability for any
> damage caused by any virus transmitted by this email.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>