File: //usr/lib/python3/dist-packages/pdfminer/__pycache__/pdfpage.cpython-38.pyc
U
�R�]� � @ s� d dl Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
lmZ ddl
mZ ddl
mZ d dlZe �e�Zed
�Zed�ZG dd� de�ZdS )� N� )�settings)�LIT)�PDFObjectNotFound)�resolve1)� int_value)�
list_value)�
dict_value)� PDFParser)�PDFDocument)�PDFTextExtractionNotAllowedZPage�Pagesc @ sJ e Zd ZdZdd� Zdd� Zedddd g�Zed
d� �Z eddd��Z
dS )�PDFPagea! An object that holds the information about a page.
A PDFPage object is merely a convenience class that has a set
of keys and values, which describe the properties of a page
and point to its contents.
Attributes:
doc: a PDFDocument object.
pageid: any Python object that can uniquely identify the page.
attrs: a dictionary of page attributes.
contents: a list of PDFStream objects that represents the page content.
lastmod: the last modified time of the page.
resources: a list of resources used by the page.
mediabox: the physical size of the page.
cropbox: the crop rectangle of the page.
rotate: the page rotation (in degree).
annots: the page annotations.
beads: a chain that represents natural reading order.
c C s� || _ || _t|�| _t| j�d��| _t| j�dt� ��| _t| jd �| _ d| jkrjt| jd �| _
n| j | _
t| j�dd��d d | _| j�d�| _
| j�d �| _d
| jkr�t| jd
�}ng }t|t�s�|g}|| _dS )z�Initialize a page object.
doc: a PDFDocument object.
pageid: any Python object that can uniquely identify the page.
attrs: a dictionary of page attributes.
ZLastModified� Resources�MediaBox�CropBox�Rotater ih ZAnnots�BZContentsN)�doc�pageidr �attrsr �getZlastmod�dict� resources�mediaboxZcropboxr �rotateZannotsZbeads�
isinstance�list�contents)�selfr r r r � r �2/usr/lib/python3/dist-packages/pdfminer/pdfpage.py�__init__. s&