Skip to content

Updates from original repo - #4

Draft
kunaldi wants to merge 83 commits into
Arealai:masterfrom
py-pdf:master
Draft

Updates from original repo#4
kunaldi wants to merge 83 commits into
Arealai:masterfrom
py-pdf:master

Conversation

@kunaldi

Copy link
Copy Markdown

Our repo has been diverged from forked-original repo.

Do not merge them, this is for reviewing only.

Could be mergeable if all commits seem healthy after a deep review

asearsand others added 30 commits November 3, 2021 07:15
When the license is explicitly included in `MANIFEST.in` it gets bundled with the source build.
Also add .pre-commit-config.yaml
Previously the function .extractText() reads the text in the PDF and returns without any spaces.
In this fix the pdf.py file has been modified to add " " (space) in between two words
Here is an example below:-
Original Sentence : "The quick brown fox jumps over the lazy dog"
Previous Output : "Thequickbrownfoxjumpsoverthelazydog"
After the fix : "The quick brown fox jumps over the lazy dog"
Also: Adjust ground truth "crazyones" example text
This happens when the library is used with `-Werror`, since `\c` is not a valid Python escape sequence.
The default value of sys.stderr will be None in this case, so care
should be taken to avoid causing an AttributeError when trying to show
an otherwise nonfatal warning.
The constructor expects the page argument to be a reference to a page, rather than the integer index of the page in the document.
fixed a typo and added in a new feature for adding a title to the PDF metadata
Co-authored-by: __ROLLER__ <techangel428@gmail.com>
Co-authored-by: Martin Thoma <info@martin-thoma.de>
…3.3) (#458)
* Simplify tox config
* Drop Python 3.3 and add Python 3.6 and PyPy
MartinThomaand others added 28 commits April 9, 2022 13:26
Add Scripts (including `pdfcat`), Resources, Tests, and Sample_Code back to
PyPDF2. It was removed by accident in 1.27.0, but might get removed with 2.0.0
See #718 for discussion
…trict mode (#618)
An extra /Prev key in the trailer with the value 0 means the PDF is broken according to the specification.
However, we can make PyPDF2 robust against this type of broken PDF.
Closes#530
In test_writer.py, make sure tmp file is closed before removing it
Also: reStructured Text to Markdown conversion
Found issue where not closing file descriptors in Windows caused access issues whilst trying to rename generated PDF in the same program flow. Linux did not have an issue. On windows, its required to explicitly close the 'output' file.
* Update generic.py
修复BUG:Name Object 遇到GBK编码时会抛出PyPDF2.utils.PdfReadError: Illegal character in Name Object异常
* Update utils.py
修复BUG:遇到中文时latin-1无法编码抛出UnicodeEncodeError: 'latin-1' codec can't encode characters in position 8-9: ordinal not in range(256)异常
Chinese character can not use 'latin-1' encode
…row Exception in non-strict mode (#198)
- If obj is None we can't write anything to the stream
- Using self.strict to raise the exception, it could be useful to keep the use of this for some kind of PDFs.
Only distribute it in the source
Closes#727
BUG: Off-by-one
FIX: Set 2**32-1 inclusive
Closes#312
Credits to Michael Sander (speedplane) who
included it here:
#333
Everything in the Sample_Code folder is now in the docs: https://pypdf2.readthedocs.io/en/latest/
BUG: Two tests with the same name existed
MAINT: Move _xobj_to_image from Scrips (image extractor) into PyPDF2. This reduces the overall code size and could be useful for others. I make it private for the moment as I'm uncertain if it should be in PyPDF2
- PKG: Make Tests not a subpackage (#728)
- BUG: Fix ASCII85Decode.decode assertion (#729)
- BUG: Error in Chinese character encoding (#463)
- BUG: Code duplication in Scripts/2-up.py
- ROBUST: Guard 'obj.writeToStream' with 'if obj is not None'
- ROBUST: Ignore a /Prev entry with the value 0 in the trailer
- MAINT: Remove Sample_Code (#726)
- TST: Close file handle in test_writer (#722)
- TST: Fix test_get_images (#730)
- DEV: Make tox use pytest and add more Python versions (#721)
- DOC: Many (#720, #723-725, #469)
It's not fixed, but at least we can test it now easily. We still get:
ValueError: invalid literal for int() with base 10
@MartinThoma
MartinThoma deleted the branch Arealai:masterApril 12, 2022 05:17
@MartinThoma
MartinThoma deleted the master branch April 12, 2022 05:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@kunaldi@asears@MartinThoma@debragail@JeffFessler@timgates42@medic17@DavidMetcalfe@pmlandwehr@timitos@inboxsgk@niklasb@colatkinson@marramgrass@Imperat@possnfiffer@vstoykov@mohamedali-zorgati1997@uranusjr@exiledkingcc