Displaying a PDF file with adf tags

hello,
can anyone give me some advice in how to display a pdf file with adf tags.
many thanks

http://technology.amis.nl/blog/?p=1182

Similar Messages

  • Using IFRAME in JSF to display a PDF file

    2 all,
    How do i display a PDF file inside a JSF page in a IFRAME tag?
    I store the PDF file location (like d:\images\pdf1.pdf) in my database. I cant give this location directly into the src attribute cos then the file will be rendered to only users who have access to that folder (the application is a internet application). IFRAME would be ideal as the display is very very neat (esp for pdf files).
    To get this working i tried the examples given in balusc blogs (on image servlet) but the problem is that my servlet is not getting called. Find below the web.xml and imageDisplay.jsp pages that i tried
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>WorkFlowTool</display-name>
    <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
    </context-param>
    <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
       <param-name>maxFileSize</param-name>
       <param-value>20m</param-value>
      </init-param>
    </filter>
    <filter>
      <display-name>SecurityCheckFilter</display-name>
      <filter-name>SecurityCheckFilter</filter-name>
      <filter-class>filters.SecurityCheckFilter</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.faces</url-pattern>
    </filter-mapping>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
      <filter-name>SecurityCheckFilter</filter-name>
      <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <listener>
      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
      <servlet-name>Image Servlet</servlet-name>
      <servlet-class>servlets.ImageServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>Image Servlet</servlet-name>
      <url-pattern>/imageServlet/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <session-config>
      <session-timeout>60</session-timeout>
    </session-config>
    <welcome-file-list>
      <welcome-file>/jsp/index.jsp</welcome-file>
    </welcome-file-list>
    <error-page>
      <error-code>500</error-code>
      <location>/jsp/error.jsp</location>
    </error-page>
    <resource-ref>
      <res-ref-name>jdbc/JDDS</res-ref-name>
      <res-type>java.lang.Object</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    </web-app>
    imageDisplay.jsp
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
    <f:loadBundle basename="messages" var="msg" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <LINK rel="stylesheet" type="text/css" href="../theme/Styles.css"
         title="Style">
    </HEAD>
    <body topmargin="0" leftmargin="0">
    <f:view>
         <h:form id="CaseLookUp">
              <h:dataTable value="#{pc_ImageDisplay.dataModel}" var="var">
                   <h:column id="one">
                        <f:facet name="header">
                             <h:outputText value="H1" id="HOne"/>
                        </f:facet>
                        <h:outputText value="#{var.caseID}" id="IDONE"/>
                   </h:column>
                   <h:column id="two">
                        <f:facet name="header">
                             <h:outputText value="H2" id="HTwo"/>
                        </f:facet>
                        <h:graphicImage value="imageServlet?file=#{var.PODocPath}" id="image"/>
                   </h:column>
              </h:dataTable>
         </h:form>
    </f:view>
    </body>
    </HTML>The image servlet is what i got from balusc's site (http://balusc.blogspot.com/2007/04/imageservlet.html).
    I dont know why my servlet is not getting called. Can someone help me with this pls?
    okay let me post the modified code for my image servlet here
    public class ImageServlet extends HttpServlet {
         private static final long serialVersionUID = 1L;
         public void doGet(HttpServletRequest request, HttpServletResponse response) {
            // Define base path somehow. You can define it as init-param of the servlet.
    //        String imageFilePath = "/images";
            // In a Windows environment with the Applicationserver running on the
            // c: volume, the above path is exactly the same as "c:\images".
            // In UNIX, it is just straightforward "/images".
            // If you have stored images in the WebContent of a WAR, for example in the
            // "/WEB-INF/images" folder, then you can retrieve the absolute path by:
            // String imageFilePath = getServletContext().getRealPath("/WEB-INF/images");
            // Get file name from request.
            String imageFileName = request.getParameter("file");
            System.out.println("Inside the image servlet ---->>>> " + imageFileName);
            // Check if file name is supplied to the request.
    //        if (imageFileName != null) {
    //            // Strip "../" and "..\" (avoid directory sniffing by hackers!).
    //            imageFileName = imageFileName.replaceAll("\\.+(\\\\|/)", "");
    //        } else {
    //            // Do your thing if the file name is not supplied to the request.
    //            // Throw an exception, or show default/warning image, or just ignore it.
    //            return;
            // Prepare file object.
            File imageFile = new File(imageFileName);
            // Check if file actually exists in filesystem.
            if (!imageFile.exists()) {
                // Do your thing if the file appears to be non-existing.
                // Throw an exception, or show default/warning image, or just ignore it.
                return;
            // Get content type by filename.
            String contentType = URLConnection.guessContentTypeFromName(imageFileName);
            // Check if file is actually an image (avoid download of other files by hackers!).
            // For all content types, see: http://www.w3schools.com/media/media_mimeref.asp
            if (contentType == null || !contentType.startsWith("image")) {
                // Do your thing if the file appears not being a real image.
                // Throw an exception, or show default/warning image, or just ignore it.
                return;
            // Prepare streams.
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                // Open image file.
                input = new BufferedInputStream(new FileInputStream(imageFile));
                int contentLength = input.available();
                // Init servlet response.
                response.reset();
                response.setContentLength(contentLength);
                response.setContentType(contentType);
                response.setHeader(
                    "Content-disposition", "inline; filename=\"" + imageFileName + "\"");
                output = new BufferedOutputStream(response.getOutputStream());
                // Write file contents to response.
                while (contentLength-- > 0) {
                    output.write(input.read());
                // Finalize task.
                output.flush();
            } catch (IOException e) {
                // Something went wrong?
                e.printStackTrace();
            } finally {
                // Gently close streams.
                if (input != null) {
                    try {
                        input.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
                if (output != null) {
                    try {
                        output.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
        }

    Thanks Balusc!!
    I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
    <h:form id="CaseLookUp">
         <%
         String path = request.getContextPath()+"";
         out.print(path);
         %>
    <iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
         </h:form>

  • Display a PDF file from local drive

    Hi,
    I would like to display a pdf file that is actually stored on the portal server hard drive.
    What I have tried to do is link an iFrame element to the url of the file: "D:
    MyFolder
    myFile.pdf"
    But it doesn't work. I have the following error when trying to do that:
    com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=D:/MyFolder/myFile.pdf
    Does this means that iFrame can only display http URLs ? What are the other ways to easily display pdf files ?? I'am stuck with that problem and can't find any other solution.
    I also tried with "servletResponse.getOutputStream().write(fileByteContent);" but the problem is that I am not in a PAR application, and I don't have the servletResponse element and don't know how to get it.
    Thanks for your help.
    Thibault Schalck

    Hi,
       You can not access the .pdf file using the nornal path (c:
    ), use the following code to open the pdf in ur iframe, this will work i used it in my application.
    String sFileName =
    strCampCodeVal"_"nReqIdVal+".pdf";
    String sFile =
    "C:
    SBLI
    BCP
    barcode_files
    "+sFileName;
    File fFile = new File(sFile);
         if ( fFile == null )
             System.out.println("System can not download the
                                     file at this time. Please try again later.");
                  return;
    //Checking the file for existence
         if ( !fFile.exists() || !fFile.canRead() )
             System.out.println("You have specified an
                       invalid file to download. Please check and try
                        again.");
             return;
    //set the content type its important , try with applicatio/pdf also
         res.setContentType("application/force-download");
    //seting the header
         res.setHeader("Content-disposition",
    "attachment;filename=" + sFileName);
         res.setHeader("Cache-control", "must-revalidate");
         ServletOutputStream sosCur = res.getOutputStream();;
    //reading the in and writing the stream
         BufferedInputStream bisFile = null;
              try
                   byte [] bBuffer = new byte[4096];
                   bisFile = new BufferedInputStream(new
                                                    FileInputStream(fFile));
                   int nBytes = -1;
                              while( (nBytes = bisFile.read(bBuffer, 0, 4096))!=-1 )
                       sosCur.write(bBuffer, 0, nBytes);
              catch(Exception ex){
    This will resove your issue.All the best..
    Regards..
    krishna..

  • Color Display for PDF Files Creative Cloud in Browser View

    I have noticed that there is a great difference in color display between a PDF and .ai/eps files. When viewed in the browser there seems to be no ICC taking affect for PDF files even though options to include the profiles, etc in output were selected. This makes it hard to use as a tool when showing clients proofs via the browser as they will never see proper color. I know color will vary between monitors but the difference is huge for some colors. Like a dark almost Navy Blue appearing like a vibrant pen ink blue. On a Mac when you use the quick spacebar preview the correct color shows for all versions of file type but in the browsers it shows the color incorrectly. Have tried this so far on the Mac in in Safari, Chrome and Firefox. Even Google Drive can display all the file types correctly with correct color although the way it shows eps files is a bit off. That I don't mind as I rarely save eps files anymore.
    Is there something I am missing or is this a defect in the browser display?
    The other possible option would be to flip my thinking and save everything as .ai files with PDF compatibility turned on and then have to tell clients that they should be able to open that ai file in Acrobat. At the moment I save everything as PDF files with Illustrator compatibility turned on.

    Can anyone throw light on this. I'm facing same problem.

  • Store and Display doc/pdf files in the database using Forms

    Hi all,
    How can i store and display doc/pdf files in the database using Forms 10g?.
    Arif

    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    [OraHome] with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
      and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
      [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
         cd [JacobStage]
         copy jacob.jar [OraHome]\forms\java\.
         copy jacob.dll [OraHome]\forms\webutil\.
      The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
      Open a DOS command prompt.
      Add [OraHome]\jdk\bin to the PATH:
         set PATH=[OraHome]\jdk\bin;%PATH%
      Sign the files, and check the output for success:
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
      you may skip this step. Otherwise,
      Create a schema to hold the WebUtil stored code, and privileges needed to
      connect and create a stored package. Schema name "WEBUTIL" is recommended
      for no reason other than consistency over the user base.
      Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
      out the EXIT statement, to be able to see whether the objects were created witout
      errors.
      Start SQL*Plus as SYSTEM, and issue:
         CREATE USER webutil IDENTIFIED BY [password]
         DEFAULT TABLESPACE users
         TEMPORARY TABLESPACE temp;
         GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
         CONNECT webutil/[password]@[connectstring]
         @[OraHome]\forms\create_webutil_db.sql
         -- Inspect SQL*Plus output for errors, and then
         CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
      Reconnect as SYSTEM, and issue:
         grant execute on webutil_db to public;
    5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
      to the CLASSPATH entry.
    6) Start the OC4J instance
    7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
      Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
      It is important to generate the PLX, to avoid the FRM-40039 discussed in
      Note 303682.1
      If the PLX is not generated, the Webutil.pll library would have to be attached with
      full path information to all forms wishing to use WebUtil. This is NOT recommended.
    8) Create a new FMB.
      Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
      There is no need to Subclass the WebutilConfig object.
      Attach the Webutil.pll Library, and remove the path.
      Add an ON-LOGON trigger with the code
             NULL;
      to avoid having to connect to an RDBMS (optional).
      Create a new button on a new canvas, with the code
             show_webutil_information (TRUE);
      in a WHEN-BUTTON-PRESSED trigger.
      Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
      the "Application Server URL" is empty.
      Then append "?config=webutil" at the end, so you end up with a URL of the form
          http://server:port/forms/frmservlet?config=webutil
    10) Run your form.sarah

  • Since I got OS10.8.2 Safari won't display online PDF files?

    Since I got OS10.8.2 Safari won't display online PDF files?
    Can anyone tell me what the problem is?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • How can I convert a PDF/A file into a PDF file with Acrobat Pro X?

    How can I convert a PDF/A file into a PDF file with Acrobat Pro X? I'd like to modifiy the file which I have only as a PDF/A.

    There's two answers if you want to modify the file:
    You can temporarily turn off PDF/A Mode in your preferences, so they don't open as read-only. The problem would be if you do something to the file that violated the PDF/A standard, so you should always run a Preflight check afterwards to make sure.
    If you want to remove the PDF/A header tag, use Preflight again - it's on the Print Production Panel in Acrobat X Pro (which may be hidden, use the options menu on the Tools Pane to show it). There's a profile called "Remove PDF/A information" - choose this and press Analyze and Fix. Nothing else about the file will be altered but when you save and reopen it all the editing tools will become active.

  • PDF File with Digital Signature

    I am opening a "PDF File with Digital Signature" using Adobe Acrobat Pro 9.
    File gets opened.
    Then i choose "Preflight: option for "Report PDF Syntax issues".
    The following message is displayed:
    "An error occured while parsing a contents stream. Unable  to analyze the PDF file."
    So whats the solution for this error?

    Hi,
    I have uploaded the file on the specified link:
    http://www.filefactory.com/file/b3g5h37/n/abc.pdf

  • IPAD3/IPAD2 :PDF files/ attachments  sent in an email  displayed inline ( embedded within the main email) in the message text on both my Ipad2 and Ipad three, however the same email displayed the PDF File icons/ attachment on both my Iphone and a friend's

    IPAD3/IPAD2 :PDF files/ attachments  sent in an email  displayed inline ( embedded within the main email) in the message text on both my Ipad2 and Ipad three, however the same email displayed the PDF File icons/ attachment on both my Iphone and a friend’s PC. How do i get both my IPAD devices to display the PDF icons/attachments? Bearing in mind if i open the same email over the internet the PDF Icons/attachments display OK!
    Has anyone come across this? Your advice/help would be most appreciated

    This happens to me all the time.
    If is a one page PDF it seems as though it comes over already open and inline in the body of the email. Multiple page PDF files show as the PDF icon.
    I can't find any official documentation of this - other than based on my own experience with PDF attachments in my various email accounts.
    Message was edited by: Demo

  • HT5701 Cannot download pdf files with Safari 6.0.4?

    Cannot download pdf files with Safari 6.0.4

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • I cannot open a pdf file with aole-mail. I can open pdf files from windows explorer. I have associated pdf with adobe reader. My operating system is window

    I cannot open a pdf file with aol e-mail. I went to preferences in Adobe Reader but did not know what to enter for Incoming IMAP and outgoing SMTP. I can open pdf files from windows explorer as  I have associated .pdf files with adobe reader. My operating system is windows 7.
    When I try to open the pdf file within aol e-mail I get a message: 'Your security settings do not allow this file to be downloaded'.  I have not changed my security settings (Tools, Internet Options, security).

    Or http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Writing a java program for generating .pdf file with the data of MS-Excel .

    Hi all,
    My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file.
    I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file:
    My Program is:
    * Created on Apr 13, 2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    package forums;
    import java.io.*;
    import java.awt.Color;
    import com.lowagie.text.*;
    import com.lowagie.text.pdf.*;
    import com.lowagie.text.Font.*;
    import com.lowagie.text.pdf.MultiColumnText;
    import com.lowagie.text.Phrase.*;
    import net.sf.hibernate.mapping.Array;
    import org.apache.poi.hssf.*;
    import org.apache.poi.poifs.filesystem.*;
    import org.apache.poi.hssf.usermodel.*;
    import com.lowagie.text.Phrase.*;
    import java.util.Iterator;
    * Generates a simple 'Hello World' PDF file.
    * @author blowagie
    public class pdfgenerator {
         * Generates a PDF file with the text 'Hello World'
         * @param args no arguments needed here
         public static void main(String[] args) {
              System.out.println("Hello World");
              Rectangle pageSize = new Rectangle(916, 1592);
                        pageSize.setBackgroundColor(new java.awt.Color(0xFF, 0xFF, 0xDE));
              // step 1: creation of a document-object
              //Document document = new Document(pageSize);
              Document document = new Document(pageSize, 132, 164, 108, 108);
              try {
                   // step 2:
                   // we create a writer that listens to the document
                   // and directs a PDF-stream to a file
                   PdfWriter writer =PdfWriter.getInstance(document,new FileOutputStream("c:\\weeklystatus.pdf"));
                   writer.setEncryption(PdfWriter.STRENGTH128BITS, "Hello", "World", PdfWriter.AllowCopy | PdfWriter.AllowPrinting);
    //               step 3: we open the document
                             document.open();
                   Paragraph paragraph = new Paragraph("",new Font(Font.TIMES_ROMAN, 13, Font.BOLDITALIC, new Color(0, 0, 255)));
                   POIFSFileSystem pofilesystem=new POIFSFileSystem(new FileInputStream("D:\\ESM\\plans\\weekly report(31-01..04-02).xls"));
                   HSSFWorkbook hbook=new HSSFWorkbook(pofilesystem);
                   HSSFSheet hsheet=hbook.getSheetAt(0);//.createSheet();
                   Iterator rows = hsheet.rowIterator();
                                  while( rows.hasNext() ) {
                                       Phrase phrase=new Phrase();
                                       HSSFRow row = (HSSFRow) rows.next();
                                       //System.out.println( "Row #" + row.getRowNum());
                                       // Iterate over each cell in the row and print out the cell's content
                                       Iterator cells = row.cellIterator();
                                       while( cells.hasNext() ) {
                                            HSSFCell cell = (HSSFCell) cells.next();
                                            //System.out.println( "Cell #" + cell.getCellNum() );
                                            switch ( cell.getCellType() ) {
                                                 case HSSFCell.CELL_TYPE_STRING:
                                                 String stringcell=cell.getStringCellValue ()+" ";
                                                 writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
                                                 phrase.add(stringcell);
                                            // document.add(new Phrase(string));
                                                      System.out.print( cell.getStringCellValue () );
                                                      break;
                                                 case HSSFCell.CELL_TYPE_FORMULA:
                                                           String stringdate=cell.getCellFormula()+" ";
                                                           writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
                                                           phrase.add(stringdate);
                                                 System.out.print( cell.getCellFormula() );
                                                           break;
                                                 case HSSFCell.CELL_TYPE_NUMERIC:
                                                 String string=String.valueOf(cell.getNumericCellValue())+" ";
                                                      writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
                                                      phrase.add(string);
                                                      System.out.print( cell.getNumericCellValue() );
                                                      break;
                                                 default:
                                                      //System.out.println( "unsuported sell type" );
                                                      break;
                                       document.add(new Paragraph(phrase));
                                       document.add(new Paragraph("\n \n \n"));
                   // step 4: we add a paragraph to the document
              } catch (DocumentException de) {
                   System.err.println(de.getMessage());
              } catch (IOException ioe) {
                   System.err.println(ioe.getMessage());
              // step 5: we close the document
              document.close();
    My Input from MS-Excel file is:
         Planning and Tracking Template for Interns                                                                 
         Name of the Intern     N.Kesavulu Reddy                                                            
         Project Name     Enterprise Sales and Marketing                                                            
         Description     Estimated Effort in Hrs     Planned/Replanned          Actual          Actual Effort in Hrs     Complexity     Priority     LOC written new & modified     % work completion     Status     Rework     Remarks
    S.No               Start Date     End Date     Start Date     End Date                                        
    1     setup the configuration          31/01/2005     1/2/2005     31/01/2005     1/2/2005                                        
    2     Deploying an application through Tapestry, Spring, Hibernate          2/2/2005     2/2/2005     2/2/2005     2/2/2005                                        
    3     Gone through Componentization and Cxprice application          3/2/2005     3/2/2005     3/2/2005     3/2/2005                                        
    4     Attend the sessions(tapestry,spring, hibernate), QBA          4/2/2005     4/2/2005     4/2/2005     4/2/2005                                        
         The o/p I'm gettint in .pdf file is:
    Planning and Tracking Template for Interns
    N.Kesavulu Reddy Name of the Intern
    Enterprise Sales and Marketing Project Name
    Remarks Rework Status % work completion LOC written new & modified Priority
    Complexity Actual Effort in Hrs Actual Planned/Replanned Estimated Effort in Hrs Description
    End Date Start Date End Date Start Date S.No
    38354.0 31/01/2005 38354.0 31/01/2005 setup the configuration 1.0
    38385.0 38385.0 38385.0 38385.0 Deploying an application through Tapestry, Spring, Hibernate
    2.0
    38413.0 38413.0 38413.0 38413.0 Gone through Componentization and Cxprice application
    3.0
    38444.0 38444.0 38444.0 38444.0 Attend the sessions(tapestry,spring, hibernate), QBA 4.0
                                       The issues i'm facing are:
    When it is reading a row from MS-Excel it is writing to the .pdf file from last cell to first cell.( 2 cell in 1 place, 1 cell in 2 place like if the row has two cells with data as : Name of the Intern: Kesavulu Reddy then it is writing to the .pdf file as Kesavulu Reddy Name of Intern)
    and the second issue is:
    It is not recognizing the date format..it is recognizing the date in first row only......
    Plz Tell me wht is the solution for this...
    Regards
    [email protected]

    Don't double post your question:
    http://forum.java.sun.com/thread.jspa?threadID=617605&messageID=3450899#3450899
    /Kaj

  • How to print an excel file (2010 version) with multiple tabs into a pdf file with bookmarks (acrobat 9). I was able to do this easily using excel (2007 version).

    Recently I got a new laptop, with excel 2010 version and acrobat 9 standard.
    I could no longer print (save as) an excel file with multiple tabs into a pdf file with bookmarks.
    My old computer has excel 2007 version and acrobat 9 standard.
    Print an excel file into pdf with bookmarks was a piece of cake.
    Both machine has the same add-in -- Acrobat PDFMaker Office COM addin
    Thanks if anyone could help me with this.
        Tom

    You need to upgrade Acrobat to a newer version.
    On Thu, Oct 30, 2014 at 4:12 PM, excel-pdf-bookmarks <

  • How do I create a single PDF file with multiple pages?

    Hi, I occasionally need merge several jpg images into a single pdf file with multiple pages (one Jpg per page). I have tried doing this on Preview, and by selecting all the pages I want to include in my document and trying to save to Pdf through the "Print" function, but every time it only saves the first page.
    Can anyone tell me if there is a way to save multple-page pdf files without having to purchase a specific program (i to this too infrequently to justify the cost)?
    Thanks very much,

    This works for me...
    Open first image in Preview View > Sidebar. Drag the other images into Sidebar, then select all.
    From File menu > print selected images. Choose PDF > Save as PDF
    -mj

  • How do i move a picture from one pdf-file to another already created pdf-file with adobe reader?

    How do I move a picture from one pdf-file to another, already created pdf-file, with adobe reader?

    Reader doesn't have editing capabilities.

Maybe you are looking for

  • How to use a MATLAB license with password peotection?

    I am using a MATLAB network license, which is password protected, so when I use a MATLAB script node LabVIEW can't load the proper MATLAB license and fails. How can I submit the username+password info to LabVIEW?

  • Downloading Nokia PC Suite

    How can I download Nokia PC Suite to my mobile to install into my Laptop?

  • Subnets on single switch problem

    Hi i recently completed a CCENT and am now moving onto to CCNA. I came across a network recently shown in the attachment that had a problem and i have a few questions and am trying to debug it. Any suggestions would be appreicated. Device a sends inf

  • Classpath for JNI call in NT4?

    ?I prepare MyClass for JNI call on iPlanet 6 running on NT. The corresponding DLL is put in WINNT\SYSTEM32. The classpath set in registry is updated too. But error "class not found. (no MyClass in java.library.path)" still occurs. Is there any work i

  • How do I place photos in specific places in the timeline

    I don't want to build my project linearly.  I want to place photos in certain places, but when I try to import any they always go to the start of the timeline. How do I put these photos where I want them, so they can become my guideposts in the timel