brk-code

PyPDF2 の API リファレンス

PyPDF2 (py-pdf/PyPDF2) の公開 API 155 件 —— クラス 55、関数 39、メソッド 61。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: py-pdf/PyPDF2

種別件数
クラス55
関数39
メソッド61

API 一覧

classmake_release.Change
Capture the data of a git commit.
funcmake_release.adjust_version_py(version:str) -> None
Adjust the __version__ string.
funcmake_release.get_author_mapping(line_count:int) -> dict[str, str]
Get the authors for each commit.
funcmake_release.get_changelog(changelog_path:str) -> str
Read the changelog.
funcmake_release.get_formatted_changes(git_tag:str) -> tuple[str, str]
Format the changes done since the last tag.
funcmake_release.get_git_commits_since_tag(git_tag:str) -> list[Change]
Get all commits since the last tag.
funcmake_release.get_most_recent_git_tag() -> str
Get the git tag most recently created.
funcmake_release.get_version_interactive(new_version:str, changes:str) -> str
Get the new __version__ interactively.
funcmake_release.is_semantic_version(version:str) -> bool
Check if the given version is a semantic version.
funcmake_release.main(changelog_path:str) -> None
Create a changelog.
funcmake_release.parse_commit_line(line:str, authors:dict[str, str]) -> Change
Parse the first line of a git commit message.
funcmake_release.print_instructions(new_version:str) -> None
Print release instructions.
funcmake_release.strip_header(md:str) -> str
Remove the 'CHANGELOG' header.
funcmake_release.version_bump(git_tag:str) -> str
Increase the patch version of the git tag by one.
funcmake_release.write_changelog(new_changelog:str, changelog_path:str) -> None
Write the changelog.
funcmake_release.write_commit_msg_file(new_version:str, commit_changes:str) -> None
Write a file that can be used as a commit message.
funcmake_release.write_release_msg_file(new_version:str, commit_changes:str, today:datetime) -> None
Write a file that can be used as a git tag message.
classpypdf._codecs._codecs.Codec
Abstract base class for all codecs.
methodpypdf._codecs._codecs.Codec.decode(data:bytes) -> bytes
Decode the input data.
methodpypdf._codecs._codecs.Codec.encode(data:bytes) -> bytes
Encode the input data.
classpypdf._codecs._codecs.LzwCodec
Lempel-Ziv-Welch (LZW) adaptive compression codec.
methodpypdf._codecs._codecs.LzwCodec.encode(data:bytes) -> bytes
Encode data using the LZW compression algorithm.
classpypdf._doc_common.PdfDocCommon
Common functions from PdfWriter and PdfReader objects.
methodpypdf._doc_common.PdfDocCommon.attachment_list() -> Generator[EmbeddedFile, None, None]
Iterable of attachment objects.
methodpypdf._doc_common.PdfDocCommon.attachments() -> Mapping[str, list[bytes]]
Mapping of attachment filenames to their content.
methodpypdf._doc_common.PdfDocCommon.decode_permissions(permissions_code:int) -> NoReturn
Take the permissions as an integer, return the allowed access.
methodpypdf._doc_common.PdfDocCommon.get_destination_page_number(destination:Destination) -> Optional[int]
Retrieve page number of a given Destination object.
methodpypdf._doc_common.PdfDocCommon.get_form_text_fields(full_qualified_name:bool=False) -> dict[str, Any]
Retrieve form fields from the document with textual data.
methodpypdf._doc_common.PdfDocCommon.get_num_pages() -> int
Calculate the number of pages in this PDF file.
methodpypdf._doc_common.PdfDocCommon.get_page(page_number:int) -> PageObject
Retrieve a page by number from this PDF file.
methodpypdf._doc_common.PdfDocCommon.get_page_number(page:PageObject) -> Optional[int]
Retrieve page number of a given PageObject.
methodpypdf._doc_common.PdfDocCommon.get_pages_showing_field(field:Union[Field, PdfObject, IndirectObject]) -> list[PageObject]
Provides list of pages where the field is called.
methodpypdf._doc_common.PdfDocCommon.page_labels() -> list[str]
A list of labels for the pages in this document.
methodpypdf._doc_common.PdfDocCommon.page_layout() -> Optional[str]
Get the page layout currently being used.
methodpypdf._doc_common.PdfDocCommon.page_mode() -> Optional[PagemodeType]
Get the page mode currently being used.
methodpypdf._doc_common.PdfDocCommon.remove_page(page:Union[int, PageObject, IndirectObject], clean:bool=False) -> None
Remove page from pages list.
methodpypdf._doc_common.PdfDocCommon.threads() -> Optional[ArrayObject]
Read-only property for the list of threads.
methodpypdf._font.Font.can_encode(text:str) -> bool
Check whether the font is able to encode a text string.
methodpypdf._font.Font.get_text_width(text:str='') -> float
Sum of character widths specified in PDF font for the supplied text.
classpypdf._page.ImageFile
Image within the PDF file.
methodpypdf._page.ImageFile.replace(new_image:Image, **kwargs:Any) -> None
Replace the image with a new PIL image.
classpypdf._page.PageObject
PageObject represents a single page within a PDF file.
methodpypdf._page.PageObject.add_transformation(ctm:Union[Transformation, CompressedTransformationMatrix], expand:bool=False) -> None
Apply a transformation matrix to the page.
methodpypdf._page.PageObject.create_blank_page(pdf:Optional[PdfCommonDocProtocol]=None, width:Union[float, Decimal, None]=None, height:Union[float, Decimal, None]=None) -> 'PageObject'
Return a new blank page.
methodpypdf._page.PageObject.get_contents() -> Optional[ContentStream]
Access the page contents.
methodpypdf._page.PageObject.hash_bin() -> int
Used to detect modified object.
methodpypdf._page.PageObject.images() -> VirtualListImages
Read-only property emulating a list of images on a page.
methodpypdf._page.PageObject.inline_images() -> Optional[dict[str, ImageFile]]
Return only inline images from the page.
methodpypdf._page.PageObject.merge_page(page2:'PageObject', expand:bool=False, over:bool=True) -> None
Merge the content streams of two pages into one.
methodpypdf._page.PageObject.rotate(angle:int) -> 'PageObject'
Rotate a page clockwise by increments of 90 degrees.
methodpypdf._page.PageObject.rotation() -> int
The visual rotation of the page.
classpypdf._page.Transformation
Represent a 2D transformation.
methodpypdf._page.Transformation.rotate(rotation:float) -> 'Transformation'
Rotate the contents of a page.
methodpypdf._page.Transformation.transform(m:'Transformation') -> 'Transformation'
Apply one transformation to another.
methodpypdf._page.Transformation.translate(tx:float=0, ty:float=0) -> 'Transformation'
Translate the contents of a page.
classpypdf._page.VirtualListImages
Provides access to images referenced within a page.
funcpypdf._page_labels.index2label(reader:PdfCommonDocProtocol, index:int) -> str
See 7.9.7 "Number Trees".
funcpypdf._page_labels.nums_insert(key:NumberObject, value:DictionaryObject, nums:ArrayObject) -> None
Insert a key, value pair in a Nums array.
classpypdf._reader.PdfReader
Initialize a PdfReader object.
methodpypdf._reader.PdfReader.add_form_topname(name:str) -> Optional[DictionaryObject]
Add a top level form that groups all form fields below it.
methodpypdf._reader.PdfReader.close() -> None
Close the stream if opened in __init__ and clear memory.
methodpypdf._reader.PdfReader.pdf_header() -> str
The first 8 bytes of the file.
methodpypdf._reader.PdfReader.read(stream:StreamType) -> None
Read and process the PDF stream, extracting necessary data.
methodpypdf._reader.PdfReader.rename_form_topname(name:str) -> Optional[DictionaryObject]
Rename top level form field that all form fields below it.
methodpypdf._reader.PdfReader.root_object() -> DictionaryObject
Provide access to "/Root".
methodpypdf._reader.PdfReader.xmp_metadata() -> Optional[XmpInformation]
XMP (Extensible Metadata Platform) data.
funcpypdf._text_extraction._layout_mode._fixed_width_page.resolve_font(fonts:dict[str, Font], name:str) -> Font
Resolve a Tf font name to a layout mode Font.
classpypdf._text_extraction._text_extractor.TextExtraction
A class to handle PDF text extraction operations.
funcpypdf._utils.check_if_whitespace_only(value:bytes) -> bool
Check if the given value consists of whitespace characters only.
funcpypdf._utils.deprecate_no_replacement(name:str, removed_in:str) -> None
Issue a warning that a feature will be removed without replacement.
funcpypdf._utils.format_iso8824_date(dt:datetime) -> str
Convert a datetime object to PDF date string format.
funcpypdf._utils.is_char_neutral(char:str, custom_special_characters:str='') -> bool
Check if a character is part of neutral character ranges
funcpypdf._utils.is_char_rtl(char:str, custom_rtl_min:str='', custom_rtl_max:str='') -> bool
Check if a character is part of RTL character ranges
funcpypdf._utils.logger_error(message:str, *source:str, **values:Any) -> None
Use this instead of logger.error directly.
funcpypdf._utils.logger_warning(message:str, *source:str, **values:Any) -> None
Use this instead of logger.warning directly.
funcpypdf._utils.mark_location(stream:StreamType) -> None
Create text file showing current location in context.
funcpypdf._utils.read_non_whitespace(stream:BinaryStreamType) -> bytes
Find and read the next non-whitespace character (ignores whitespace).
funcpypdf._utils.read_previous_line(stream:StreamType) -> bytes
Given a byte stream with current position X, return the previous line.
funcpypdf._utils.read_until_whitespace(stream:StreamType, max_bytes:Optional[int]=None) -> bytes
Read non-whitespace characters and return them.
funcpypdf._utils.rename_kwargs(func_name:str, kwargs:dict[str, Any], aliases:dict[str, str], fail:bool=False) -> None
Helper function to deprecate arguments.
classpypdf.annotations._markup_annotations.FreeText
A FreeText annotation
classpypdf.annotations._markup_annotations.MarkupAnnotation
Base class for all markup annotations.
classpypdf.annotations._markup_annotations.Text
A text annotation.
classpypdf.constants.AnnotationDictionaryAttributes
Table 8.15 Entries common to all annotation dictionaries.
classpypdf.constants.AnnotationFlag
See §12.5.3 "Annotation Flags".
classpypdf.constants.BorderStyles
A class defining border styles used in PDF documents.
classpypdf.constants.CatalogDictionary
§7.7.2 of the 1.7 and 2.0 references.
classpypdf.constants.CcittFaxDecodeParameters
Table 4.5.
classpypdf.constants.CheckboxRadioButtonAttributes
Table 8.76 Field flags common to all field types.
classpypdf.constants.Core
Keywords that don't quite belong anywhere else.
classpypdf.constants.DocumentInformationAttributes
Table 10.2 Entries in the document information dictionary.
classpypdf.constants.FieldFlag
Table 8.70 Field flags common to all field types.
classpypdf.constants.FileSpecificationDictionaryEntries
Table 3.41 Entries in a file specification dictionary.
classpypdf.constants.FilterTypeAbbreviations
§8.9.7 of the 1.7 and 2.0 references.
classpypdf.constants.FilterTypes
§7.4 of the 1.7 and 2.0 references.
classpypdf.constants.GraphicsStateParameters
Table 58 – Entries in a Graphics State Parameter Dictionary
classpypdf.constants.ImageAttributes
§11.6.5 of the 1.7 and 2.0 references.
classpypdf.constants.LzwFilterParameters
Table 4.4.
classpypdf.constants.OutlineFontFlag
A class used as an enumerable flag for formatting an outline font.
classpypdf.constants.PageAttributes
§7.7.3.3 of the 1.7 and 2.0 reference.
classpypdf.constants.PageLabelStyle
Table 8.10 in the 1.7 reference.
classpypdf.constants.PageLayouts
Page 84, PDF 1.4 reference.
classpypdf.constants.PagesAttributes
§7.7.3.2 of the 1.7 and 2.0 reference.
classpypdf.constants.Resources
Table 3.30 Entries in a resource dictionary.
classpypdf.constants.StreamAttributes
Table 4.2.
classpypdf.constants.TypArguments
Table 8.2 of the PDF 1.7 reference.
classpypdf.constants.TypFitArguments
Table 8.2 of the PDF 1.7 reference.
classpypdf.constants.UserAccessPermissions
Table 3.20 User access permissions.
classpypdf.errors.DeprecationError
Raised when a deprecated feature is used.
classpypdf.errors.EmptyFileError
Raised when a PDF file is empty or has no content.
classpypdf.errors.EmptyImageDataError
Raised when trying to process an image that has no data.
classpypdf.errors.LimitReachedError
Raised when a limit is reached.
classpypdf.errors.PageSizeNotDefinedError
Raised when the page size of a PDF document is not defined.
classpypdf.errors.PdfReadError
Raised when there is an issue reading a PDF file.
classpypdf.errors.PyPdfError
Base class for all exceptions raised by pypdf.
classpypdf.errors.XmpDocumentError
Raised when the XMP XML document context is invalid or missing.
classpypdf.filters.ASCII85Decode
Decodes string ASCII85-encoded data into a byte format.
methodpypdf.filters.ASCII85Decode.decode(data:Union[str, bytes], decode_parms:Optional[DictionaryObject]=None, **kwargs:Any) -> bytes
Decode an Ascii85 encoded data stream.
classpypdf.filters.CCITTFaxDecode
§7.4.6, CCITTFaxDecode filter (ISO 32000).
classpypdf.filters.CCITTParameters
§7.4.6, optional parameters for the CCITTFaxDecode filter.
funcpypdf.filters.decode_stream_data(stream:StreamObject) -> bytes
Decode the stream data based on the specified filters.
funcpypdf.filters.decompress(data:bytes) -> bytes
Decompress the given data using zlib.
methodpypdf.generic._base.PdfObject.get_object() -> Optional['PdfObject']
Resolve indirect references.
methodpypdf.generic._base.PdfObject.hash_bin() -> int
Used to detect modified object.
classpypdf.generic._base.TextStringObject
A string object that has been decoded into a real unicode string.
methodpypdf.generic._base.TextStringObject.clone(pdf_dest:Any, force_duplicate:bool=False, ignore_fields:Optional[Sequence[Union[str, int]]]=()) -> 'TextStringObject'
Clone object into pdf_dest.
methodpypdf.generic._base.TextStringObject.hash_bin() -> int
Used to detect modified object.
funcpypdf.generic._base.is_null_or_none(x:Any) -> TypeGuard[Union[NullObject, IndirectObject, None]]
Returns: True if x is None or NullObject.
classpypdf.generic._data_structures.Destination
A class representing a destination within a PDF file.
methodpypdf.generic._data_structures.Destination.font_format() -> Optional[OutlineFontFlag]
Read-only property accessing the font type.
methodpypdf.generic._data_structures.Destination.outline_count() -> Optional[int]
Read-only property accessing the outline count.
methodpypdf.generic._data_structures.Destination.title() -> Optional[str]
Read-only property accessing the destination title.
methodpypdf.generic._data_structures.Destination.typ() -> Optional[str]
Read-only property accessing the destination type.
methodpypdf.generic._data_structures.Destination.zoom() -> Optional[int]
Read-only property accessing the zoom factor.
classpypdf.generic._data_structures.Field
A class representing a field dictionary.
methodpypdf.generic._data_structures.Field.kids() -> Optional['ArrayObject']
Read-only property accessing the kids of this field.
methodpypdf.generic._data_structures.Field.name() -> Optional[str]
Read-only property accessing the name of this field.
methodpypdf.generic._data_structures.Field.value() -> Optional[Any]
Read-only property accessing the value of this field.
classpypdf.generic._files.EmbeddedFile
Container holding the information on an embedded file.
methodpypdf.generic._files.EmbeddedFile.checksum() -> bytes | None
Retrieve the MD5 checksum of the (uncompressed) file.
methodpypdf.generic._files.EmbeddedFile.content() -> bytes
Retrieve the actual file content.
methodpypdf.generic._files.EmbeddedFile.creation_date() -> datetime.datetime | None
Retrieve the file creation datetime.
methodpypdf.generic._files.EmbeddedFile.delete() -> None
Delete the file from the document.
methodpypdf.generic._files.EmbeddedFile.description() -> str | None
Retrieve the description.
methodpypdf.generic._files.EmbeddedFile.size() -> int | None
Retrieve the size of the uncompressed file in bytes.
methodpypdf.generic._files.EmbeddedFile.subtype() -> str | None
Retrieve the subtype.
funcpypdf.generic._image_inline.extract_inline__ascii85_decode(stream:StreamType) -> bytes
Extract A85 stream from inline image.
funcpypdf.generic._image_inline.extract_inline__ascii_hex_decode(stream:StreamType) -> bytes
Extract HexEncoded stream from inline image.
funcpypdf.generic._image_inline.extract_inline__dct_decode(stream:BinaryStreamType) -> bytes
Extract DCT (JPEG) stream from inline image.
funcpypdf.generic._image_inline.extract_inline__run_length_decode(stream:StreamType) -> bytes
Extract RL (RunLengthDecode) stream from inline image.
funcpypdf.generic._image_inline.extract_inline_default(stream:StreamType) -> bytes
Legacy method, used by default
classpypdf.generic._rectangle.RectangleObject
This class is used to represent *page boxes* in pypdf.
classpypdf.pagerange.PageRange
A slice-like representation of a range of page indices.
methodpypdf.pagerange.PageRange.to_slice() -> slice
Return the slice equivalent of this page range.
methodpypdf.pagerange.PageRange.valid(input:Any) -> bool
True if input is a valid initializer for a PageRange.

この情報について

掲載しているシグネチャは py-pdf/PyPDF2 の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る