Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3905

allignment is missing while reading pdf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Bug
    • 2.0.7
    • None
    • Text extraction
    • None

    Description

      Hi Team,
      I am reading pdf using pdfbox-2.0.5.jar and writing in to xls format and .txt.

      problam:
      i am lossing allignment and text format in xls and txt.
      Can you please help on this.I am attaching pdf as well please help on this

      logic is given below

      File file = new File("C:/Users//Desktop//AcrobatDocument.pdf");
      FileInputStream fis = null;

      fis = new FileInputStream(file);

      String output =null;

      BufferedInputStream fileToParse = new BufferedInputStream(fis);
      PDDocument document = null;

      document = PDDocument.load(fileToParse);
      output = new PDFTextStripper().getText(document);
      syste,.out.println(output )
      }

      and output is printing like below:-


      061
      012
      016 022
      018 020
      024 048
      Payer’s name – Nom du payeur
      Statement of Pension, Retirement, Annuity, and Other Income

      Attachments

        1. AcrobatDocument.pdf
          352 kB
          tirumala

        Activity

          People

            Unassigned Unassigned
            tirumalarao02 tirumala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: