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

allignment is missing while reading pdf

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.7
    • Fix Version/s: None
    • Component/s: Text extraction
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: