-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add document ID to trailer for PDF-X spec compat
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require_relative "spec_helper" | ||
|
||
describe "PDF Document State" do | ||
before { @state = PDF::Core::DocumentState.new({}) } | ||
|
||
describe "initialization" do | ||
it { expect(@state.compress).to eq(false) } | ||
it { expect(@state.encrypt).to eq(false) } | ||
it { expect(@state.skip_encoding).to eq(false) } | ||
end | ||
|
||
describe "normalize_metadata" do | ||
it { expect(@state.store.info.data[:Creator]).to eq("Prawn") } | ||
it { expect(@state.store.info.data[:Producer]).to eq("Prawn") } | ||
end | ||
|
||
describe "default trailer" do | ||
it "should contain an ID entry with two values in trailer" do | ||
expect(@state.trailer[:ID].count).to eq(2) | ||
end | ||
end | ||
|
||
end |