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

Print to PDF printer results in large PDF + text content is not selectable anymore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Bug
    • 2.0.24
    • None
    • Utilities
    • None

    Description

      When printing a PDF to Pdf Printer, the resulting PDF is much larger than the original (e.g. 140 KB original vs 955 KB printed with PDFBox to a PDF printer), furthermore the text content of the original can no longer be selected in a viewer (e.g. Acrrobat Reader), content seems to be rendered as image.

       

      Is there a chance to solve this? 

       

      The priting is called with the following code:

      int dpi = 600; // tested various values here, also 0

      PDDocument document = loadMyPdDocument();
      PDFPageable pdfPageable = new PDFPageable(document, Orientation.AUTO, false, dpi);
      PrinterJob.getPrinterJob().setPageable(pdfPageable);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ksondermann Katja Sondermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: