Files
pdfmajor/docs/search/search_index.json
T
2018-10-12 17:54:35 -04:00

1 line
12 KiB
JSON

{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"PDF-Major PDF-Major is a fork of PDFMiner.six . It is meant to be a more light-weight implementation that makes fewer assumptions on the data. Additionally, this version intends to be more up to date with recent versions of python and make liberal use of the typing capabilities of python for improved future maintainability. Why Another Fork? PDFMiner was designed to run in python 2.7>, PDFMiner.six was written to bring cross-version support for python 2 and 3. This versions intends to make use of the latest improvement in the python language while remaining fairly simple to develop with. Features Written entirely in Python. Parse, analyze, and convert PDF documents. PDF-1.7 specification support. (well, almost) CJK languages and vertical writing scripts support. Various font types (Type1, TrueType, Type3, and CID) support. Basic encryption (RC4) support. Font-Color extraction Shape fill and stroke color extraction Note : We took out the layout-analysis process in this version (there is no more LTTextHorizontal or LTTextVertical). While the mathematics behind the grouping process was sound, the coupling of the layout-analysis process with the parsing and interpretation process produced unfriendly-code. This feature could be brought back by extending the pdfmajor.layouts.PDFLayoutAnalyzer class, but at the current time is not supported. How to Install Source Install Python 3.6.4 or newer. clone this repo git clone https://github.com/asosnovsky/pdfmajor * install repo python setup.py install Terms and Conditions (This is so-called MIT/X License) Copyright (c) 2018-2019 Ariel Sosnovsky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","title":"Home"},{"location":"#pdf-major","text":"PDF-Major is a fork of PDFMiner.six . It is meant to be a more light-weight implementation that makes fewer assumptions on the data. Additionally, this version intends to be more up to date with recent versions of python and make liberal use of the typing capabilities of python for improved future maintainability.","title":"PDF-Major"},{"location":"#why-another-fork","text":"PDFMiner was designed to run in python 2.7>, PDFMiner.six was written to bring cross-version support for python 2 and 3. This versions intends to make use of the latest improvement in the python language while remaining fairly simple to develop with.","title":"Why Another Fork?"},{"location":"#features","text":"Written entirely in Python. Parse, analyze, and convert PDF documents. PDF-1.7 specification support. (well, almost) CJK languages and vertical writing scripts support. Various font types (Type1, TrueType, Type3, and CID) support. Basic encryption (RC4) support. Font-Color extraction Shape fill and stroke color extraction Note : We took out the layout-analysis process in this version (there is no more LTTextHorizontal or LTTextVertical). While the mathematics behind the grouping process was sound, the coupling of the layout-analysis process with the parsing and interpretation process produced unfriendly-code. This feature could be brought back by extending the pdfmajor.layouts.PDFLayoutAnalyzer class, but at the current time is not supported.","title":"Features"},{"location":"#how-to-install","text":"","title":"How to Install"},{"location":"#source","text":"Install Python 3.6.4 or newer. clone this repo git clone https://github.com/asosnovsky/pdfmajor * install repo python setup.py install","title":"Source"},{"location":"#terms-and-conditions","text":"(This is so-called MIT/X License) Copyright (c) 2018-2019 Ariel Sosnovsky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","title":"Terms and Conditions"},{"location":"api/","text":"API The library is constructed from 4 base modules: interpreter : contains low-level classes for extracting fundamental data-structures from the documents converters : contains high-level classes for conversion of the fundamental pdf structures to other formats imagewriter : contains a simple implementation for converting PDF Image Streams to png/bmp/img formats layouts : contains an abstraction layer for the data-structures found in the pdf interpreter WIP converters Contains high-level classes for conversion of the fundamental pdf structures to other formats. This library includes 4 high-level conversion classes: HTMLConverter JSONConverter XMLConverter TextConverter These classes all extend the PDFConverter . To use them simply call the static method parse_file . Example from pdfmajor.converters import HTMLConverter input_file = open('path/to/input/file.pdf', 'rb') output_file = open('path/to/output/file.html', 'wb') HTMLConverter.parse_file( input_file, output_file ) input_file.close() output_file.close() converters.convert_file(input_file, output_file, image_folder_path, codec, maxpages, password, caching, check_extractable, pagenos, out_type) A high-level abstraction for the conversion classes. input_file : TextIOWrapper output_file : TextIOWrapper image_folder_path : str defaults to None codec : str defaults to 'utf-8' maxpages : int defaults to 0 password : str defaults to None caching : bool defaults to True check_extractable : bool defaults to True pagenos : List[int] defaults to None out_type : str defaults to 'html' Example (converters.convert_file) from pdfmajor.converters import convert_file input_file = open('path/to/input/file.pdf', 'rb') output_file = open('path/to/output/file.html', 'wb') convert_file( input_file, output_file ) input_file.close() output_file.close() converters.PDFConverter Extends layouts.PDFLayoutAnalyzer . converters.PDFConverter.__init__(rsrcmgr, outfp, imagewriter, codec, pageno) rsrcmgr : PDFResourceManager outfp : TextIOWrapper imagewriter : ImageWriter codec : str defaults to 'utf-8' pageno : int defaults to 1 initialization function for the class converters.PDFConverter.parse_file(input_file, output_file, image_folder_path, codec, maxpages, password, caching, check_extractable, pagenos) returns the output file TextIOWrapper . input_file : TextIOWrapper output_file : TextIOWrapper image_folder_path : str defaults to None codec : str defaults to 'utf-8' maxpages : int defaults to 0 password : str defaults to None caching : bool defaults to True check_extractable : bool defaults to True pagenos : List[int] defaults to None imagewriter WIP layouts WIP","title":"API"},{"location":"api/#api","text":"The library is constructed from 4 base modules: interpreter : contains low-level classes for extracting fundamental data-structures from the documents converters : contains high-level classes for conversion of the fundamental pdf structures to other formats imagewriter : contains a simple implementation for converting PDF Image Streams to png/bmp/img formats layouts : contains an abstraction layer for the data-structures found in the pdf","title":"API"},{"location":"api/#interpreter","text":"WIP","title":"interpreter"},{"location":"api/#converters","text":"Contains high-level classes for conversion of the fundamental pdf structures to other formats. This library includes 4 high-level conversion classes: HTMLConverter JSONConverter XMLConverter TextConverter These classes all extend the PDFConverter . To use them simply call the static method parse_file .","title":"converters"},{"location":"api/#example","text":"from pdfmajor.converters import HTMLConverter input_file = open('path/to/input/file.pdf', 'rb') output_file = open('path/to/output/file.html', 'wb') HTMLConverter.parse_file( input_file, output_file ) input_file.close() output_file.close()","title":"Example"},{"location":"api/#convertersconvert_fileinput_file-output_file-image_folder_path-codec-maxpages-password-caching-check_extractable-pagenos-out_type","text":"A high-level abstraction for the conversion classes. input_file : TextIOWrapper output_file : TextIOWrapper image_folder_path : str defaults to None codec : str defaults to 'utf-8' maxpages : int defaults to 0 password : str defaults to None caching : bool defaults to True check_extractable : bool defaults to True pagenos : List[int] defaults to None out_type : str defaults to 'html'","title":"converters.convert_file(input_file, output_file, image_folder_path, codec, maxpages, password, caching, check_extractable, pagenos, out_type)"},{"location":"api/#example-convertersconvert_file","text":"from pdfmajor.converters import convert_file input_file = open('path/to/input/file.pdf', 'rb') output_file = open('path/to/output/file.html', 'wb') convert_file( input_file, output_file ) input_file.close() output_file.close()","title":"Example (converters.convert_file)"},{"location":"api/#converterspdfconverter","text":"Extends layouts.PDFLayoutAnalyzer .","title":"converters.PDFConverter"},{"location":"api/#converterspdfconverter9595init9595rsrcmgr-outfp-imagewriter-codec-pageno","text":"rsrcmgr : PDFResourceManager outfp : TextIOWrapper imagewriter : ImageWriter codec : str defaults to 'utf-8' pageno : int defaults to 1 initialization function for the class","title":"converters.PDFConverter.__init__(rsrcmgr, outfp, imagewriter, codec, pageno)"},{"location":"api/#converterspdfconverterparse_fileinput_file-output_file-image_folder_path-codec-maxpages-password-caching-check_extractable-pagenos","text":"returns the output file TextIOWrapper . input_file : TextIOWrapper output_file : TextIOWrapper image_folder_path : str defaults to None codec : str defaults to 'utf-8' maxpages : int defaults to 0 password : str defaults to None caching : bool defaults to True check_extractable : bool defaults to True pagenos : List[int] defaults to None","title":"converters.PDFConverter.parse_file(input_file, output_file, image_folder_path, codec, maxpages, password, caching, check_extractable, pagenos)"},{"location":"api/#imagewriter","text":"WIP","title":"imagewriter"},{"location":"api/#layouts","text":"WIP","title":"layouts"}]}