Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for %%EOF in the last 1024 bytes #75

Merged
merged 1 commit into from
Mar 4, 2014
Merged

Conversation

wolever
Copy link
Contributor

@wolever wolever commented Mar 4, 2014

With full Py3 compatibility.

See also: #34

With full Py3 compatibility.
@mstamy2
Copy link
Collaborator

mstamy2 commented Mar 4, 2014

Oops, I think I pushed a commit just prior (or perhaps right after) you submitted this. They're nearly identical, though perhaps yours is better because it checks to see if last1K has been reached within the search loop.

I figured all that was needed was to make use of the b_() method, but I didn't get around to it until I saw your comment at #34 a short while ago.

Sorry for the confusion - if you feel that the differences in your implementation are more suitable, then we'll use those instead.

@wolever
Copy link
Contributor Author

wolever commented Mar 4, 2014

ha d'oh!

I would argue that checking in the loop is better so we can fail quickly instead of reading the entire file… but I have no strong feelings about getting my particular commit in, so do whatever's best.

Thanks!

@mstamy2 mstamy2 merged commit f1d4882 into py-pdf:master Mar 4, 2014
@wolever wolever deleted the eof-fix branch March 4, 2014 23:45
polyglot-jones pushed a commit to polyglot-jones/PyPDF2 that referenced this pull request Aug 11, 2020
* Local imports

imports made local to have concurrent versions in parallel & upgrade version

* Fix Reading Files

fix regression since 1.27.0 in encoded stream loading and extraction of XRefStm and Prev in trailer

* Lazy file/stream selection

Provide capability to provide the filename/stream only when calling write

* Add Clone capability

Provide capability to copy pages and objects from a reader into a writer. Provide also capability to copy a full reader into a writer

* Add PageLabel access functions

implement PageLabels functions both in Reader (get) and Writer (get/add/remove)

* Object Standardization

Create _rootObject in Reader to match Writer and also introduce a getIndirectionFunction on both Reader and Writer

* Enhance NamedDestinations functions

Extend NamedDestinations to work with PDF 1.1 and 1.2+ with both get/insert/remove functions
Also complete/fix some issues with outlines

* enhance pages api for writer

Provide capability to work with non flatten pages organisation for bot insertion,get and remove page

* Add comment capability

implements functions to add comments to a Page

* Remove Links / Annots

improve removeLinks into removeAnnots to be able to select which type of annots to remove
removeLinks kept for compatility

* add demo programs on comments

Add 2 tests programs for test and demo about comments (merging comments and Listing them in an excel sheet)
polyglot-jones pushed a commit to polyglot-jones/PyPDF2 that referenced this pull request Aug 11, 2020
polyglot-jones pushed a commit to polyglot-jones/PyPDF2 that referenced this pull request Aug 11, 2020
Sign up for free to 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.

2 participants