On Wed, November 16, 2011 05:54, Siddhartha Rathi wrote:
>
> Hi All,
>
> I have written an agent in Ltus Notes in JAVA for creating and saving the
> PDF file. But when I am doing the same it is giving me no error but file
> is also not getting saved. Can some one help me what I must have done
> wrong I am also appending the code which I have used to save the file on
> server.
>
>             String path = "/local/notesdata/appln/Reports/" + strDate +
> ".pdf";
>             File PdfAtt = new File(path);
>
>             Document pdfDoc = new Document(PageSize.A4.rotate());
>             PdfWriter writer = PdfWriter.getInstance(pdfDoc, new
> FileOutputStream(path));
>
>             Document pdfDoc = new Document(PageSize.A4.rotate());
>             PdfWriter writer = PdfWriter.getInstance(pdfDoc, new
> FileOutputStream(path));
>
>             pdfDoc.open();
>
>             //-- my other code to fill up the PDF
>
>             pdfDoc.close();
>
> This code works absolutely fine on Windows server if in path I enter
> “C:\Lotus\Notes\Data\appln\Reports\" + strDate + ".pdf" but it is not
> giving any error nor it is getting saved on server when it is being run on
> the Linux server. Can somebody let me know what can be the issue here.

Doesn't sound like an iText problem to me.
Try this:


import java.io.*;

class FileWrite {
        private static final String PATH = 
"/local/notesdata/appln/Reports/out.txt";

        public static void main(String args[]) {
                try {
                        FileWriter fstream = new FileWriter(PATH);
                        BufferedWriter out = new BufferedWriter(fstream);
                        out.write("Hello Java");
                        out.close();
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }
}


I'm betting that this will give you either a FileNotFoundException or a
IOException. In that case it's not an iText problem and not even a Java
problem.

-- 
Amedee



------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to