Title: RE: [iText-questions] Document Summary in PDF

Works for me and I don't see anything wrong with your code.

Best Regards,
Paulo Soares

    -----Original Message-----
    From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Yazdani, Flora

    Sent:   Tuesday, February 10, 2004 17:44
    To:     '[EMAIL PROTECTED]'
    Subject:        [iText-questions] Document Summary in PDF

    Hi,
    I am trying to add to Information to the Title section of Document Summary.� This code is not producing the desired output although the PDF output file looks fine, the summary does not show any information (Blank).� Can someone give me any guidance on that please.� Here is part of the code related to this issue, thanks:

    ������ try {
    ����������� //Create a temp file to hold the pdf document tree
    ����������� l_file = File.createTempFile("ServiceObj", ".pdf", c_workingDirectory);


    ����������� //Create a new document
    ����������� c_document = new Document(Constants.STANDARD_PAGE_SIZE.rotate());


    ����������� //Create a writer to store the contents of the document to.
    ����������� c_writer = PdfWriter.getInstance(c_document, new FileOutputStream(l_file.getAbsolutePath()));


    ����������� //register with the writer that instance of this class is listening to page events.
    ����������� c_writer.setPageEvent(this);


    ����������� //Add information to be displayed in the document summary
    ����������� c_document.addTitle("MyTitle");
    ����������� c_document.addSubject("");
    ����������� c_document.addKeywords("");
    ����������� c_document.addCreator("Service Management System)");
    ����������� c_document.addAuthor("");


    ����������� processHeaderFooter(true); //displays the header part
    ����������� processHeaderFooter(false); //displays the footer part


    ����������� //Open the document so we can write to it
    ����������� c_document.open();


    ����������� //get the content of the PDF file once and use it all over, since multiple calls returns the same thing.
    ����������� c_contentByte = c_writer.getDirectContent();
    ����������� c_PDFtemplate = c_contentByte.createTemplate(50, 50);
    ����������� processContent();


    ����������� c_PDFtemplate.beginText();
    ����������� c_PDFtemplate.setFontAndSize(c_baseNormal, 10);
    ����������� c_PDFtemplate.showText(String.valueOf(c_writer.getPageNumber()));
    ����������� c_PDFtemplate.endText();


    ����������� //Close the document
    ����������� c_document.close();

Reply via email to