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

  • Home
  • SEARCH
  • 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 8505907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:27:01+00:00 2026-06-11T02:27:01+00:00

Please, suggest me some libraries that will help me print PDF files that contain

  • 0

Please, suggest me some libraries that will help me print PDF files that contain JBIG2 encoded images. PDFRenderer, PDFBox don’t help me. These libs can print simple PDF, but not PDF containing JBIG2 images. PDFRenderer tries to fix it (according to bug issue on PDFRedndrer’s bug tracker), but some pages still (especially where barcodes exist) don’t want to print.

P.S. I use javax.print API within applet

Thanks!

UPDATE: also tried ICEPdf, is too don’t want to work.

I came to the conclusion that all these libraries(PDFRenderer, ICEPdf, PDFBox) use JPedals jbig2 decoder. Bug (some pages didn’t print) come from this decoder library. The open source version of this decoder (which is used in PDFRenderer, ICEPdf, PDFBox) is no longer supported, but JPedal has a new commercial branch of the project, and they wrote that the bug has been fixed in new commercial release, which costs $9k.

Any ideas?

UPDATE 2: yesterday I tried to replace JPedal’s free library with other open-source jbig2-imageio libraries. But yet I don’t get any successful results, so I created a new topic on their project’s page (google-code’s forum – here ). Would be grateful for any help.

I also found some helpfull discussions on Apache PDFBox bug-tracker: here and here.

  • 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-11T02:27:03+00:00Added an answer on June 11, 2026 at 2:27 am

    There is a fork of the JPedal library by Borisvl located at

    https://github.com/Borisvl/JBIG2-Image-Decoder#readme

    which contains speed improvements and I believe it should also fix your bug.

    EDIT : The bug is related to simple range checking. Basically you need to prevent GetPixel from accessing x,y values outside of the bitmap extents.

    You need to make sure the following conditions are met before calling getPixel

    col >= 0 and col < bitmap.width
    row >= 0 and row < bitmap.height

    Here is some Delphi code with a couple of small range checks. I cannot test the Java code myself but you need to make changes to src/org/jpedal/jbig2/image/JBIG2Bitmap.java

    procedure TJBIG2Bitmap.combine(bitmap: TJBIG2Bitmap; x, y: Integer; combOp: Int64);
    ...
    ...
    var
    begin
      srcWidth := bitmap.width;
      srcHeight := bitmap.height;
      srcRow := 0;
      srcCol := 0;
    
      if (x < 0) then x := 0;
      if (y < 0) then y := 0;
    
      for row := y to Min(y + srcHeight - 1, Self.height - 1) do   // <<<<<<<<  HERE
      begin
        for col := x to x + srcWidth - 1 do
        begin
          srcPixel := bitmap.getPixel(srcCol, srcRow);
    

    Andrew.

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

Sidebar

Related Questions

Please suggest some free tools which will help me to get Lines-of-Code metrics for
Please suggest some website or some book that deals with these topics in really
Can anyone please suggest some logic behind a an application that syncs notes with
I am newbie in testing. Can you please suggest me some good tutorials of
Please suggest or change some suitlable title for this question as i am not
Can anyone please explain or suggest some good tutorial for the method of matrix
can some buddy please suggest how to disable view button on cgridview widget and
Could someone please suggest why this is happening... I’ve got some code to pretty
When Should i Use Method overloading in real time development,please suggest some links.
Please suggest some tutorial/cheatsheet for learning pointcut expression.

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.