Skip to content

Commit

Permalink
(#103) Change Text attribute in producer Information to Literal
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciofx committed Jan 12, 2024
1 parent 8630275 commit 65550f0
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.github.fabriciofx.cactoos.pdf.indirect.DefaultIndirect;
import com.github.fabriciofx.cactoos.pdf.type.Dictionary;
import com.github.fabriciofx.cactoos.pdf.type.Literal;
import com.github.fabriciofx.cactoos.pdf.type.Text;

/**
* Document Information Dictionary.
Expand Down Expand Up @@ -370,7 +369,7 @@ public Information(final Id id) {
id.increment(),
0,
new Dictionary()
.add("Producer", new Text("cactoos-pdf"))
.add("Producer", new Literal("cactoos-pdf"))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void empty() throws Exception {
new Joined(
" ",
"1 0 obj\n<<",
"/Producer cactoos-pdf",
"/Producer (cactoos-pdf)",
">>\nendobj\n"
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void buildDocumentWithRotatePage() {
new Joined(
"\n",
"%PDF-1.3\n%���������",
"7 0 obj\n<< /Producer cactoos-pdf >>\nendobj",
"7 0 obj\n<< /Producer (cactoos-pdf) >>\nendobj",
"6 0 obj\n<< /Type /Catalog /Pages 5 0 R >>\nendobj",
"5 0 obj\n<< /Type /Pages /Kids [4 0 R] /Count 1 /MediaBox [0 0 595.28 841.89] >>\nendobj",
"4 0 obj\n<< /Type /Page /Resources 2 0 R /Contents [3 0 R] /Parent 5 0 R /Rotate 90 >>\nendobj",
Expand Down Expand Up @@ -145,7 +145,7 @@ void buildTwoPagesDocument() {
new Joined(
"\n",
"%PDF-1.3\n%���������",
"10 0 obj\n<< /Producer cactoos-pdf >>\nendobj",
"10 0 obj\n<< /Producer (cactoos-pdf) >>\nendobj",
"9 0 obj\n<< /Type /Catalog /Pages 8 0 R >>\nendobj",
"8 0 obj\n<< /Type /Pages /Kids [4 0 R 7 0 R] /Count 2 /MediaBox [0 0 595.28 841.89] >>\nendobj",
"4 0 obj\n<< /Type /Page /Resources 2 0 R /Contents [3 0 R] /Parent 8 0 R >>\nendobj",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void buildDocumentWithRotatePage() {
new Joined(
"\n",
"%PDF-1.3\n%���������",
"7 0 obj\n<< /Producer cactoos-pdf >>\nendobj",
"7 0 obj\n<< /Producer (cactoos-pdf) >>\nendobj",
"6 0 obj\n<< /Type /Catalog /Pages 5 0 R >>\nendobj",
"5 0 obj\n<< /Type /Pages /Kids [4 0 R] /Count 1 /MediaBox [0 0 595.28 841.89] >>\nendobj",
"4 0 obj\n<< /Type /Page /Resources 2 0 R /Contents [3 0 R] /Parent 5 0 R /Rotate 90 >>\nendobj",
Expand Down
Binary file modified src/test/resources/document/fonts.pdf
Binary file not shown.
Binary file modified src/test/resources/document/hello-world.pdf
Binary file not shown.
Binary file modified src/test/resources/document/image-png.pdf
Binary file not shown.
Binary file modified src/test/resources/document/rotate.pdf
Binary file not shown.
Binary file modified src/test/resources/document/text-20k.pdf
Binary file not shown.
Binary file modified src/test/resources/document/two-fonts.pdf
Binary file not shown.

0 comments on commit 65550f0

Please sign in to comment.