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

This does not work when my PDF starts with "%PDF-1.4". "%PDF-" should be checked #60

Closed
msincuba opened this issue Dec 18, 2017 · 2 comments

Comments

@msincuba
Copy link

int idx = str.indexOf("%FDF-1.2");

@tlxtellef
Copy link
Member

tlxtellef commented Dec 20, 2017

The first line of an FDF file is a header, originally intended to identify the version of the PDF specification to which the file conforms. However, for historical reasons, this version number is now frozen and must read
%FDF-1.2

Page 712 of PDF 1.7

@GitMensch
Copy link
Contributor

To create a back-reference: rtfarte/OpenPDF#22 (it seems the PR never contained any change to the tokenizer, just pull the changes from this repo).

To extend what @tlxtellef said: the manual goes on with saying that if a newer version than 1.2 is used an entry in the FDF catalog (not header) should be made (page 714):

KEY: Version, TYPE: name, VALUE: (Optional; since PDF 1.4) The version of the PDF specification to which this FDF file conforms (for example, 1.4) if later than the version specified in the file's header.

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

No branches or pull requests

3 participants