Hello, I have a problem using class PDFString

My source code is:

 PdfString pdfString2 = new PdfString("Test");
 Document document = new Document(PageSize.A4, 80, 50, 30, 65);
 pdfString2.toPdf(PdfWriter.getInstance(document, new FileOutputStream("test.pdf")), new FileOutputStream("test.pdf"));

And it works, but I can not open the file generated

How do I have to use the method  "toPdf" to generate a PDF file from a string

Thank you very much. I realy appreciate your help

Patricia
       

Reply via email to