Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:19:36+00:00 2026-06-11T07:19:36+00:00

When I try to parse a pdf file with pdf box in java which

  • 0

When I try to parse a pdf file with pdf box in java which is generated with cups pdf, showing junk characters. But it works perfectly with common pdfs I checked font cups pdf shows FreeMono_00.ttf (but i didn’t se such a font anywhere) and working pdf shows ArialMT.

Anything I want to do differently for parsing the pdfs generated using cups-pdf.

below is the code I’m using for parsing.

parser = new PDFParser(new FileInputStream(File file));
parser.parse();
           COSDocument  cosDoc = parser.getDocument();
           PDFTextStripperpdfStripper = new PDFTextStripper();
          PDDocument  pdDoc = new PDDocument(cosDoc);
 String parsedText = pdfStripper.getText(pdDoc); 

output is getting like this
)LOH1DPHDVGW[W
6XEMHFWVXEMHFWVVDPSOH
0HVVDJHVHQGLQJGHWDLOVDORQJZLWKSULQWILOH
8VHU1DPH$EGXOUD]DN30
8VHU,’D#DFRP

just copy paste also gives like this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:19:38+00:00Added an answer on June 11, 2026 at 7:19 am

    I’m only repeating what I’ve read… I’m inexperienced here. If there were more mavens answering PDF/PDFBox questions, I’d wait for one to answer.

    I believe the font either doesn’t contain Unicode tables at all, or has been embedded in the document without Unicode tables. If the text seems to be a simple substitution cipher for a single given document, that would tend to confirm this.

    If the font is embedded, I think sometimes only an extract of the glyphs you are actually using is embedded. That’s likely here, since the font is not installed on the system (you said), and the original FreeMono font is large – over 4000 glyphs. In this case, I fear that the correspondence between character and glyph may be document-dependent – but I’m speculating.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a xml file which contains arabic characters.When i try to parse a
I try to parse a file in my DatabaseHandler class but Eclipse say: The
I try to parse html file and to generate pdf. I use code document.Open();
I want to parse a xml file in java which contains binary data: here
I try to parse encrypted &RQ history, but i really can't understand asm code.
I'm try to parse this xml, but c# keeps throwing an exception saying it
I have a JSON which I get from web application. I try this parse
I need to create a pdf file from the HTML provided from database which
I Try to parse a Json feed with IOS 5. My Json File is
I have this little script that generate a table in a .pdf file, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.