Header and footer in pdf

hi i want to include a header and footer in the pdf that i have generated using iText library.
Please help
also i want to change the font of the rows that i populate.

hi,
//changing the font of the rows populated
u can create Font instance like this:
Font fontName= new Font();
fontName.setSize(7.5f);
fontName.setStyle(fResDetails.BOLD);
fontName.setColor(255, 91, 91);
// In the following code you are adding a cell with name 'cellName' to the Table.Here table is an instance of the Table class.
PdfPCell cellName = new PdfPCell(new Phrase("columnHeader", fontName));
table.addCell(cellName );
cellName .setHorizontalAlignment(Element.ALIGN_LEFT);
cellName .setVerticalAlignment(Element.ALIGN_LEFT);

Similar Messages

  • Add Header and Footer in PDF-presenation, Photoshop CS3

    Hi
    How is it possible to make at Header and Footer in a PDF-Presentation generatet in Photoshop CS3 without placing it on every image. Is there a setting (I have not found it) where you can predefine this?
    Best regards/Jean

    hi,
    //changing the font of the rows populated
    u can create Font instance like this:
    Font fontName= new Font();
    fontName.setSize(7.5f);
    fontName.setStyle(fResDetails.BOLD);
    fontName.setColor(255, 91, 91);
    // In the following code you are adding a cell with name 'cellName' to the Table.Here table is an instance of the Table class.
    PdfPCell cellName = new PdfPCell(new Phrase("columnHeader", fontName));
    table.addCell(cellName );
    cellName .setHorizontalAlignment(Element.ALIGN_LEFT);
    cellName .setVerticalAlignment(Element.ALIGN_LEFT);

  • Header and footer in PDF files generated from Business Publisher

    Hi All,
    Is there any out of box feature to include Header and Footer of our choice in the Pdf file of Process Model generated from Business Publisher (from Print function in the publisher explorer)
    Thank you all in advance.
    regards,

    Hi Raja,
    Does this mean that you have been sucessful in generating the PDF from the BPublisher?
    If yes, could you please share how you achived this. Platform .. version ect. you have.
    I am trying to create the PDF , but my IE popup just ... well ... just disappears..
    thanks
    regards
    Sanjiv

  • Header and Footer for PDF with images using itext.jar

    HeaderFooter class was available in itext.jar ,I tried using this class with PDFtemplate and Phrase i am trying to put the image on the header and footer ,however the image comes perfectly for the first page ,its not applicable for the second or continuous page, is it possible to have the images in header and footer?
    Regards,
    Venkateswaran

    Questions about third-party APIs should be asked in the forum/newsgroup specific to that API. These forums are for questions relating to the API as provided by Sun.
    Go find an iText forum.

  • Header and Footer in PDF is lost when exporting application

    When generating an export script to migrate an application, headers and footer you include in your report definition are lost, that contents are not included in the script.
    Any workaround?
    Regards.

    Hi Raja,
    Does this mean that you have been sucessful in generating the PDF from the BPublisher?
    If yes, could you please share how you achived this. Platform .. version ect. you have.
    I am trying to create the PDF , but my IE popup just ... well ... just disappears..
    thanks
    regards
    Sanjiv

  • How to get Header and footer in PDF file from a report program

    I am generating spool from ALV GRID DISPLAY. Only the body of a report is coming in the SPOOL. I mean content of the TOP_UP_PAGE event is not coming in the SPOOL. Please suggest me.
    Coding I am pasting here.
    * Begin of modification(+) by I080845 ( Prasanta Maiti ) 12/23/2011 Defect# 17821
        IF sy-batch IS NOT INITIAL
    * Begin of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
        and i_final is NOT INITIAL.
    * End of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
    * The print parameters are retrived and validate
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
    *           ARCHIVE_TEXT          = c_check
    *           AR_OBJECT             = c_check
    *          ARCHIVE_REPORT         = c_check
    *          COVER_PAGE             = c_check
              in_archive_parameters  = v_arcpar
              in_parameters          = v_pripar
              destination            = 'LOCL'
              layout                 = 'X_65_512/2'"c_layout
              line_count             = '65'  "60
              line_size              = '1024'
              no_dialog              = c_check
            IMPORTING
              out_archive_parameters = v_arcpar
              out_parameters         = v_pripar
              valid                  = v_val
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    IF v_val  NE space AND sy-subrc = 0.
            v_pripar-prrel = space.
            v_pripar-primm = space.
            NEW-PAGE PRINT ON NEW-SECTION PARAMETERS v_pripar
            ARCHIVE PARAMETERS v_arcpar NO DIALOG.
            NEW-PAGE.
    **    displaying output in PDF
    *    PERFORM f_show_record.
    *   ALV Display
            PERFORM f_alv_display.
            NEW-PAGE PRINT OFF.
            CALL FUNCTION 'ABAP4_COMMIT_WORK'.
          ENDIF.
          IF NOT sy-spono IS INITIAL.
            "Declarations
            v_spool_id = sy-spono.
    * Checking the flag for too large spool
    *    IF v_too_large IS INITIAL.
            CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
              EXPORTING
                src_spoolid              = v_spool_id
                no_dialog                = space
              IMPORTING
                pdf_bytecount            = v_bytecount
              TABLES
                pdf                      = i_pdf
              EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
    Edited by: Thomas Zloch on Feb 10, 2012

    Hi,
    Try with ALV LIST DISPLAY. I dont thing so its possible with ALV GRID DISPLAY.

  • How do i add images in the header and footer to a PDF using iText

    Hi ,
    I want to add images to the header and footer of every page while i am genrating a pdf i have created a separate class called EndPage which i am instanceiating its default constructor in another class 's button action method.
    The above code genrates a PDF for me however it genrates a file with file size zero bytes and does not open it following is my sample code
    //**********Any Help would be appreciated
    Thank You
    public class My_Class
    public String pdf_action()
    EndPage ep=new EndPage();
    return null;
    }//My_class Ends
    class EndPage extends PdfPageEventHelper
    * Demonstrates the use of PageEvents.
    * @param args no arguments needed
    public EndPage()
    try {
    com.lowagie.text.Document document = new Document(PageSize.A4, 50, 50, 70, 70);
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("D://proposals/endpage.pdf"));
    writer.setPageEvent(new EndPage());
    document.open();
    String text = "Lots of text. ";
    for (int k = 0; k < 10; ++k)
    text += text;
    document.add(new Paragraph(text));
    document.close();
    catch (Exception de) {
    de.printStackTrace();
    public void onEndPage(PdfWriter writer, Document document) {
    try {
    Rectangle page = document.getPageSize();
    PdfPTable head = new PdfPTable(3);
    for (int k = 1; k <= 6; ++k)
    head.addCell("head " + k);
    head.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
    head.writeSelectedRows(0, -1, document.leftMargin(), page.height() - document.topMargin() + head.getTotalHeight(),
    writer.getDirectContent());
    PdfPTable foot = new PdfPTable(3);
    for (int k = 1; k <= 6; ++k)
    foot.addCell("foot " + k);
    foot.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
    foot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),
    writer.getDirectContent());
    catch (Exception e) {
    throw new ExceptionConverter(e);
    }

    Hi,
    Thanks for the quick response.
    The problem is that when I keep the logo as a watermark, the pdf is not adjusting itself to include the logo as header.
    But if I add a header text via Tools -> Headers and Footers, the pdf is adjusting itself so that the header text is at the beginning , not overlapping with the contents of pdf.
    But while using logo as watermark, some times overlapping of the pdf contents and logo is happening.
    Is there any way to add a logo in the Header and Footer via the option in Tools -> Headers and Footers
    Thanks,
    Vidhya

  • How to add header and footer image in pdf

    Hi,
    I want to add image in header and footer for the pdf generation.
    how I can add this? Following my xsl
    ?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration = "yes" />
    <xsl:template match="/">
    <fo:root>
    <fo:layout-master-set>
    <fo:simple-page-master master-name="my-page">
    <fo:region-body margin="1in"/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="my-page">
    <fo:flow flow-name="xsl-region-body">
    <fo:block >
    <xsl:apply-templates mode="dump" select="/session/entity/instance/attribute"/>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    <xsl:template match="*" mode="dump" priority="100">
    <fo:block >
                   <fo:block margin-left="1cm">
                        <xsl:for-each select="@question-text">
                        <xsl:value-of select="."/>=
                        </xsl:for-each>
                        <xsl:if test="string-length(normalize-space(text())) > 0">
                        <xsl:value-of select="text()"/>
                        </xsl:if>
                   </fo:block>
    <xsl:apply-templates mode="dump" select="*"/>
    </fo:block>
    </xsl:template>
    </xsl:stylesheet>
    Edited by: 848231 on Apr 6, 2011 1:42 AM

    Hi,
    Here is one way of putting an image in the header:
    <fo:layout-master-set>
        <fo:simple-page-master master-name="my-page">     
          <fo:region-body margin="1in"/>
          <fo:region-before extent="1in" background-color="silver" />
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="my-page">
         <fo:static-content flow-name="xsl-region-before">
             <fo:block height="150px" width="1024px" background-color="white" >
                 <fo:external-graphic src="http://localhost:9000/web-determinations9000/images/Header.jpg">
                 </fo:external-graphic>
            </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
        </fo:flow>
      </fo:page-sequence>One good XSL:FO refernce: http://www.learn-xsl-fo-tutorial.com
    Hope this helps.
    Thanks,
    Aakarsh
    Edited by: aakarsh on Apr 6, 2011 6:40 AM

  • Unsupported version Error while generating header and footer for the PDF

    hi
    I want to genrate header and footer for the PDF file however on the call of the EndPage class i got a Unsupported Version Error Unsupported major minor Version Error and Class loader Define class
    What has gone wrong ?.

    Can you provide more information about what you were trying to do? In particular, what does your code like like?
    Also, can you include the stack trace, and the complete error message?

  • How to set default Header and Footer properties for PDF

    Hi,
    Currently we are manually setting the 'PDF and Print Control' properties for each and every dashboard. We understand that print pdf properties are controlled by pdfstyle.fst file under $SAROOTDIR\web\app\res\s_oracle10\b_mozilla_4 but don't have the exact property names to include in header and footer section.
    By default, we want to include company logo, the saved name of the report/dashboard tab and created time in the header. And page# in the footer.
    Where can we set these and what properties names should be used in order for these to be set for every new request/dashboard that is created.
    Thanks and Regards

    Hi,
    I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
    You can do this in compound layout.
    Regards,
    Stefan

  • Error occured while genrating header and footer for the PDF

    Hi All ,
    I am getting a following error whenever i try to excecute the code to print header and footer while genrating a PDF what could be the reason.Any help would be greately appreciated. following is the error stack trace: i am excecuting it in the command prompt an using jdk1.5.0.1
    C:\Program Files\Sun\Creator2_1\java\Test>java EndPage
    Exception in thread "main" java.lang.UnsupportedClassVersionError: EndPage (Unsu
    pported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

    Looks like the EndPage class was compiled with a later version of Java (49.0 == Java 1.5) and you are trying to run it with older version of java.exe. Type
    java -version
    to verify.
    Also this forum is for Sun Java Studio Creator related questions. Please ask such questions on java tools forum.
    Sandip

  • How can I insert jpeg images into a PDF's Header and Footer?

    International Clients send me a lot of pdf price lists (hundreds).  I want to be able to easily add our letterhead header and footer jpegs to my Acrobat one time so that I can then have them easily placed and printed on each new original document I receive when I (re)print them as a new (compressed) pdf.   This will streamline my work so that when I send them out and they start circulating among Buyers they can clearly see that we are the US contact for XYZ Client?
    Thank you.

    If you add a background or water mark, as opposed to a footer/header, you can specify an image to use.
    You can also use JavaScript to add a custom toolbar button or menu item so that you can easily add the images to a documant, or even in a batch process, using a variety of methods. Post again if you'd like more information.

  • After udate to IOS 8 when I call up a pdf file for my lyrics it now had a header and footer that are blocking my words.  Can I get rid of the header and footer

    I have all my lyrics for my songs in iBooks on my Ipad.  Before updating to IOS8 when I called up a song only the lyrics came up.  Now after updating to IOS 8 there is a header and bottom(showing the page).  The header is cutting off my words and they are making my songs now appear on 2 pages instead of 1.  Is there anyway to get rid of the header and footer so only my lyrics show on the page?

    Tap the screen once and the header/footer disappears.  Tap again and it reappears.

  • Remove filename header and footer

    Hello! When you open a HTML file in Acrobat it puts the path to the filename in the header and footer automatically. How can I remove this?
    I went to Header/Footer and tried to update or remove, but it says there is no option. How do I do this?
    In another issue, Is there any plugin that will let me "press enter" to move the body of text downwards in the PDF, similar to Microsoft Word? I imported a bunch of company listings from a HTML document and I am trying to space them out 3 to a page and I need to shift the body of text down to the next page break. Is this possible with Acrobat or an affordable program/plugin?
    Kind Regards,
    Kevin

    Have you tried using the Touch Up Text tool for both of your issues?  Touch Up Text will not work in an automated way, but you can use it to manually edit existing text on the page.  Not sure about any plugins that remove headers/footers, although there might be a way in Acrobat's help files that outline how to prevent it from automatically embedding on converted HTML pages from web browsers.

  • Bypass Header and Footer in Excel output

    I have a Requirement like this
    I need to have the report output in the below three formats
    PDF,EXCEL,HTML
    But when we see the ouput in EXcel it should not have the Footer and Header Scetion ,
    remaining two output formats (PDF,HTML) must have the Footer and Header Section.
    Any one having any idea about this issue.
    Thanks in Advance.
    Have a Nice day.

    Hi @BIPuser.
    I said the same thing to them but they said no that is final option but we need only single template for all the outputs alos it should handle the bypassing of header and footer for excel output.
    Thanks for your reply, If i come across anything i will let u know.

Maybe you are looking for

  • Product Registration

    I have a bit of an issue that was created when I upgraded my PC to Windows 8 where the installation did not work correctly on the first attempt and had to do the whole thing again, but as a result all of my programs where removed so effectively meant

  • 'Structured' error handling and reentrancy

    The parentheses in the subject are due to the fact that I'm not using the Structured Error Handler reference library, but have rolled my own to do something similar but in the manner I want it to. I don't actually use the SEH (haven't even got it ins

  • Motion - suddenly cannot hear audio

    I must have clicked on something because I was hearing audio just fine & now I cannot. I cannot select the on box in the Audio tab. Here's a pix. I click and nothing happens. Box will not check. Was working fine. What did I do wrong Motion gurus? (I

  • Latest version of itunes does not support quicktime?  Cant play a tv show I bought last night from itunes store.

    Latest version on itunes does not support Quicktime......can't play TV show my wife bought last night on iTunes.  Help

  • Should We Assist with Class Assignments?

    My answer is no. What is yours? Here is a recent case: http://social.msdn.microsoft.com/Forums/en-US/158d60c8-5feb-4228-9a70-2cedfb97c6d0/print-a-dayname-without-using-date-functions?forum=sqlgetstarted Kalman Toth Database & OLAP Architect SELECT Vi