How do I impl. embedded fonts, two-up pages and newlines?

Here should go questions about transforming XML with XSLT and FOP.
abbendix
Posts: 2
Joined: Mon Jan 15, 2007 6:48 pm

How do I impl. embedded fonts, two-up pages and newlines?

Post by abbendix »

Hello, I ´ve just begin to make creating PDFs with Fop, nFop (C#) actually and have some problems I can´t resolve or find solutions on the internet!

1. How do I embedded extarnal fonts ine the C# code-behind?
2. How do I create two-up pages? I.e. have two pages on one page side-by-side. Is it possible in the xsl:fo?
3. How do I replace the input value for a newline (\n) into a PDF newline. I read somewhere that you can use the fo:block tag to simulate a newline but its not a good way I thing if you have a text with hundreds of \n!!!

pls, I there any experts out there:)


best regards
//Albin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

You can embed external fonts in the result if the FO engine that you use supports that. FOP supports it and you can set this in the FOP configuration file.


Regards,
Sorin
abbendix
Posts: 2
Joined: Mon Jan 15, 2007 6:48 pm

Post by abbendix »

Hello,
Yes I now FOP supports embedded fonts! But I can´t find a way to implement it in my application! I'm using C# and ApacheFop.Net.dll, i.e. Apache fop 0.93 version. I've googling aroud whole internet after samples but without result. Please help me to embed a external font.

--- code ---

org.apache.fop.fonts.apps.TTFReader font = new org.apache.fop.fonts.apps.TTFReader();
font.loadTTF(@"C:\WINNT\Fonts\myType.ttf","myType.ttf");
" how do I making this work?"

Driver driver = new Driver(source,output);
driver.setRenderer(Driver.RENDER_PDF);
driver.run();
output.close();

--- code ---


best regard
//Albin
Post Reply