<commit_before>
#copyright ReportLab Inc. 2000
#see license.txt for license details
#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfbase/pdfdoc.py?cvsroot=reportlab
#$Header: /tmp/reportlab/reportlab/pdfbase/pdfdoc.py,v 1.62 2002/05/10 13:47:09 aaron_watters Exp $
__version__=''' $Id: pdfdoc.py,v 1.62 2002/05/10 13:47:09 aaron_watters Exp $ '''
__doc__="""
The module pdfdoc.py handles the 'outer structure' of PDF documents, ensuring that
all objects are properly cross-referenced and indexed to the nearest byte.  The
'inner structure' - the page descriptions - are presumed to be generated before
each page is saved.
pdfgen.py calls this and provides a 'canvas' object to handle page marking operators.
piddlePDF calls pdfgen and offers a high-level interface.

The classes within this generally mirror structures in the PDF file
and are not part of any public interface.  Instead, canvas and font
classes are made available elsewhere for users to manipulate.
"""

import string, types
from reportlab.pdfbase import pdfutils
from reportlab.pdfbase.pdfutils import LINEEND   # this constant needed in both
from reportlab import rl_config
from reportlab.lib.utils import import_zlib, PIL_Image, open_for_read

class PDFError(Exception):<commit_msg>Added Dinu's Jython 2.1 workaround<commit_after>
#copyright ReportLab Inc. 2000
#see license.txt for license details
#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfbase/pdfdoc.py?cvsroot=reportlab
#$Header: /tmp/reportlab/reportlab/pdfbase/pdfdoc.py,v 1.63 2002/05/24 09:24:10 rgbecker Exp $
__version__=''' $Id: pdfdoc.py,v 1.63 2002/05/24 09:24:10 rgbecker Exp $ '''
__doc__="""
The module pdfdoc.py handles the 'outer structure' of PDF documents, ensuring that
all objects are properly cross-referenced and indexed to the nearest byte.  The
'inner structure' - the page descriptions - are presumed to be generated before
each page is saved.
pdfgen.py calls this and provides a 'canvas' object to handle page marking operators.
piddlePDF calls pdfgen and offers a high-level interface.

The classes within this generally mirror structures in the PDF file
and are not part of any public interface.  Instead, canvas and font
classes are made available elsewhere for users to manipulate.
"""

import string, types
from reportlab.pdfbase import pdfutils
from reportlab.pdfbase.pdfutils import LINEEND   # this constant needed in both
from reportlab import rl_config
from reportlab.lib.utils import import_zlib, PIL_Image, open_for_read

from sys import platform, version_info
if platform[:4] == 'java' and version_info[:2] == (2, 1):
    def list(sequence):
        def f(x):
            return x
        return map(f, sequence)

class PDFError(Exception):
{'fraction_non_alphanumeric': 0.07938820101966497, 'fraction_numerical': 0.02986161689730517, 'mean_word_length': 4.819915254237288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '895994', 'n_tokens_mistral': 875, 'n_tokens_neox': 792, 'n_words': 320}