Skip to content

Warnings from pdfbox are not suppressed #101

@HiromuHota

Description

@HiromuHota

Describe the bug

Warning messages from pdfbox are printed on the console even when verbose options (-v or -vv) are not given.

To Reproduce
Steps to reproduce the behavior:

  1. Run pdftotree tests/input/112823.pdf

Expected behavior

When running pdftotree without -v or -vv options, warning messages should be suppressed.

Error Logs/Screenshots

$ pdftotree tests/input/112823.pdf > /dev/null
Got stderr: Oct 26, 2020 1:48:33 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font YWBRVJ+PSOgrkdutchbs
Oct 26, 2020 1:48:33 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font RHAVJM+PSOsymclas

Got stderr: Oct 26, 2020 1:48:34 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font YWBRVJ+PSOgrkdutchbs
Oct 26, 2020 1:48:34 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font RHAVJM+PSOsymclas

Got stderr: Oct 26, 2020 1:48:35 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font YWBRVJ+PSOgrkdutchbs
Oct 26, 2020 1:48:35 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font RHAVJM+PSOsymclas

Got stderr: Oct 26, 2020 1:48:36 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font YWBRVJ+PSOgrkdutchbs

Got stderr: Oct 26, 2020 1:48:37 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont toUnicode
WARNING: No Unicode mapping for figure (34) in font BXHKZY+PSOwsthelvnps

Got stderr: Oct 26, 2020 1:48:38 PM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap
WARNING: Invalid ToUnicode CMap in font YWBRVJ+PSOgrkdutchbs
Oct 26, 2020 1:48:38 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont toUnicode
WARNING: No Unicode mapping for figure (34) in font BXHKZY+PSOwsthelvnps

Environment (please complete the following information):

  • OS: macOS 10.15.6
  • pdftotree Version: v0.5.0
  • pdfminer.six Version: N/A

Additional context
Add any other context about the problem here.

This can be controlled by tabula's build_options:
https://tabula-py.readthedocs.io/en/latest/tabula.html#tabula.io.build_options

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions