1T3XT info wrote:
> 
> YARD wrote:
>>      document.add(new Paragraph("Hello", FontFactory.getFont("helvetica",
>> BaseFont.IDENTITY_H, BaseFont.EMBEDDED)))
> 
>> FYI: It works fine in Windows and AIX environments.
> 
> It's not supposed to work: IDENTITY_H demands a font that can be 
> embedded. "Helvitica" uses Helvetica.afm and can't be embedded (unless 
> you provide a font program).
> Your question is like: I've put some water in the fridge and it isn't 
> boiling. Why not? Please read the documentation to find out the proper 
> use of fonts.
> -- 
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
> 
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations 
> Conference from O'Reilly Media. Velocity features a full day of 
> expert-led, hands-on workshops and two days of sessions from industry 
> leaders in dedicated Performance & Operations tracks. Use code vel09scf 
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> 

--------------------------------

thanks. Sorry for the wrong example code....
When i use the following simple example program from the turorial in
Windows, Ubuntu and AIX OS
it works perfectly fine in Windows and AIX but not Ubuntu. Error Message
("Error: null")

import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;

public class HelloWorld01 {

        public static final String RESULT = "hello01.pdf";

        public static void main(String[] args) {

                // step 1
                Document document = new Document();
                try {
                        // step 2
                        PdfWriter.getInstance(document, new
FileOutputStream(RESULT));
                        // step 3
                        document.open();
                        // step 4
                        document.add(new Paragraph("Hello World"));
                } catch (DocumentException de) {
                        System.err.println(de.getMessage());
                } catch (IOException ioe) {
                        System.err.println(ioe.getMessage());
                }
                // step 5
                document.close();
        }
}


For Ubuntu, i got the error message on run-time
"Error: null"
-- 
View this message in context: 
http://www.nabble.com/document.add-throws-null-on-run-time-tp23302404p23318451.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to