<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
<title>pdftk-java activity</title>
<link href="https://gitlab.com/pdftk-java/pdftk.atom" rel="self" type="application/atom+xml"/>
<link href="https://gitlab.com/pdftk-java/pdftk" rel="alternate" type="text/html"/>
<id>https://gitlab.com/pdftk-java/pdftk</id>
<updated>2026-08-24T13:20:55Z</updated>
<entry>
  <id>tag:gitlab.com,2026-08-24:5849994780</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/merge_requests/35"/>
  <title>Xlance closed merge request !35: I added new scale function, symmetrical and non symmetrical scale, options to... at pdftk-java / pdftk-java</title>
  <updated>2026-08-24T13:20:55Z</updated>
  <media:thumbnail width="40" height="40" url="https://gitlab.com/uploads/-/system/user/avatar/40411780/avatar.png?v=1786108465"/>
  <author>
    <username>xlanceV</username>
    <name>Xlance</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-2:81" dir="auto">I added new scale function, symmetrical and non symmetrical scale, options to scale paper and scale contents independantly, and to align to page (top left, center, center right ... etc)&#x000A;Please update main repository with new code. Only few files were changed/upgraded</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2026-07-17:5691561156</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/merge_requests/35"/>
  <title>Xlance opened merge request !35: I added new scale function, symmetrical and non symmetrical scale, options to... at pdftk-java / pdftk-java</title>
  <updated>2026-07-17T13:00:37Z</updated>
  <media:thumbnail width="40" height="40" url="https://gitlab.com/uploads/-/system/user/avatar/40411780/avatar.png?v=1786108465"/>
  <author>
    <username>xlanceV</username>
    <name>Xlance</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-2:81" dir="auto">I added new scale function, symmetrical and non symmetrical scale, options to scale paper and scale contents independantly, and to align to page (top left, center, center right ... etc)&#x000A;Please update main repository with new code. Only few files were changed/upgraded</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2026-04-21:5345746574</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/187"/>
  <title>mgrdbis opened issue #187: dump_data_utf8 produces localized numeric values (commas) that break update_info_utf8 parsing for page dimensions at pdftk-java / ...</title>
  <updated>2026-04-21T11:46:30Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/c4132e322148233372cbb071d77cd178b801baec67ead842e1ae6f0f28ddae81?s=80&amp;d=identicon"/>
  <author>
    <username>mgrdbis</username>
    <name>mgrdbis</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:149" dir="auto">Description: <code data-sourcepos="1:14-1:29">dump_data_utf8</code> outputs numeric values with thousands separators (commas), which makes the output incompatible with <code data-sourcepos="1:131-1:148">update_info_utf8</code>.</p>&#x000A;<p data-sourcepos="3:1-3:47" dir="auto">This is particularly visible in fields such as:</p>&#x000A;<ul data-sourcepos="5:1-6:21" dir="auto">&#x000A;<li data-sourcepos="5:1-5:15">PageMediaRect</li>&#x000A;<li data-sourcepos="6:1-6:21">PageMediaDimensions</li>&#x000A;</ul>&#x000A;<p data-sourcepos="8:1-8:19" dir="auto">Steps to reproduce:</p>&#x000A;<ol data-sourcepos="10:1-12:69" dir="auto">&#x000A;<li data-sourcepos="10:1-10:59">Run: pdftk helloworld.pdf dump_data_utf8 output data.txt</li>&#x000A;<li data-sourcepos="11:1-11:74">Observe commas in numeric values in PageMediaRect / PageMediaDimensions</li>&#x000A;<li data-sourcepos="12:1-12:69">Run: pdftk helloworld.pdf update_info_utf8 data.txt output out.pdf</li>&#x000A;</ol>&#x000A;<p data-sourcepos="14:1-14:18" dir="auto">Expected behavior:</p>&#x000A;<ul data-sourcepos="16:1-17:53" dir="auto">&#x000A;<li data-sourcepos="16:1-16:88">dump_data_utf8 should output machine-readable numeric values (no thousands separators)</li>&#x000A;<li data-sourcepos="17:1-17:53">OR update_info_utf8 should accept localized numbers</li>&#x000A;</ul>&#x000A;<p data-sourcepos="19:1-19:16" dir="auto">Actual behavior:</p>&#x000A;<ul data-sourcepos="21:1-21:70" dir="auto">&#x000A;<li data-sourcepos="21:1-21:70">update_info_utf8 fails or misparses numeric values containing commas</li>&#x000A;</ul>&#x000A;<p data-sourcepos="23:1-23:151" dir="auto">Notes: This appears to be locale-dependent (LC_NUMERIC / LANG). It breaks the expected round-trip workflow between dump_data_utf8 and update_info_utf8.</p>&#x000A;<p data-sourcepos="25:1-25:74" dir="auto"><a data-sourcepos="25:1-25:74" href="https://gitlab.com/-/project/5024297/uploads/48b21a0530a1c2c1402a051dfc51d7c7/helloworld.pdf" data-canonical-src="/uploads/48b21a0530a1c2c1402a051dfc51d7c7/helloworld.pdf" data-link="true" class="gfm">helloworld.pdf</a></p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2026-02-19:5123156951</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/186"/>
  <title>Albert Nash opened issue #186: Dates in the Info dictionary are written as UTF-16BE instead of ASCII/PDFDocEncoding, causing interoperability issues at pdftk...</title>
  <updated>2026-02-19T22:05:42Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/a911206282e15a936b29edd01ec2cc9454aedfb215d2096db8dc1c1bdb71e289?s=80&amp;d=identicon"/>
  <author>
    <username>AlbertNash0r</username>
    <name>Albert Nash</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:295" dir="auto">When updating Info-dictionary date fields using <code data-sourcepos="1:49-1:61">update_info</code> or <code data-sourcepos="1:66-1:83">update_info_utf8</code>, pdftk-java writes a date as a UTF-16BE text string with BOM instead of an ASCII string. This causes interoperability issues with ExifTool, which does not normalize this date into a standard human-readable form.</p>&#x000A;<p data-sourcepos="3:1-3:164" dir="auto">Since the PDF date format uses only printable ASCII characters, UTF-16BE encoding is unnecessary and leads to inconsistent encoding within the same Info dictionary.</p>&#x000A;<p data-sourcepos="5:1-5:202" dir="auto">To reproduce, grab <a data-sourcepos="5:20-5:55" href="https://pdfobject.com/pdf/sample.pdf" rel="nofollow noreferrer noopener" target="_blank">https://pdfobject.com/pdf/sample.pdf</a> and run <code data-sourcepos="5:65-5:202">pdftk sample.pdf update_info &lt;(echo -e "InfoBegin\nInfoKey: CreationDate\nInfoValue: D:199812231952-08'00'") output sample_with_date.pdf</code></p>&#x000A;<p data-sourcepos="7:1-7:175" dir="auto">ExifTool shows ModifyDate (which has not been changed) normalized and therefore somewhat human-readable but CreationDate as a raw PDF string, which is way less human-readable:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="9:1-13:3" data-canonical-lang="sh" class="code highlight js-syntax-highlight language-shell" v-pre="true"><code><span id="LC1" class="line" data-lang="shell"><span class="nv">$ </span>exiftool <span class="nt">-a</span> <span class="nt">-G</span> sample_with_date.pdf | <span class="nb">grep</span> <span class="s2">"PDF.*Date"</span></span>&#x000A;<span id="LC2" class="line" data-lang="shell"><span class="o">[</span>PDF] Modify Date : 2008:07:01 05:24:47Z</span>&#x000A;<span id="LC3" class="line" data-lang="shell"><span class="o">[</span>PDF] Create Date : D:199812231952-08<span class="s1">'00'</span></span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="15:1-15:70" dir="auto">According to mutool, CreationDate is written as a UTF-16BE hex string:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="17:1-21:3" data-canonical-lang="sh" class="code highlight js-syntax-highlight language-shell" v-pre="true"><code><span id="LC1" class="line" data-lang="shell"><span class="nv">$ </span>mutool show sample_with_date.pdf trailer/Info | <span class="nb">grep</span> <span class="s2">"Date"</span></span>&#x000A;<span id="LC2" class="line" data-lang="shell">  /ModDate <span class="o">(</span>D:20080701052447Z00<span class="s1">'00'</span><span class="o">)</span></span>&#x000A;<span id="LC3" class="line" data-lang="shell">  /CreationDate &lt;FEFF0044003A003100390039003800310032003200330031003900350032002D003000380027003000300027&gt;</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="23:1-23:80" dir="auto">A hex dump confirms the presence of the UTF-16BE byte-order mark and null bytes:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="25:1-34:3" data-canonical-lang="sh" class="code highlight js-syntax-highlight language-shell" v-pre="true"><code><span id="LC1" class="line" data-lang="shell"><span class="nv">$ </span>hexdump <span class="nt">-C</span> sample_with_date.pdf | <span class="nb">grep</span> <span class="nt">-A3</span> <span class="s2">"Dat"</span></span>&#x000A;<span id="LC2" class="line" data-lang="shell">000045c0  20 28 50 61 67 65 73 29  0a 2f 4d 6f 64 44 61 74  | <span class="o">(</span>Pages<span class="o">)</span>./ModDat|</span>&#x000A;<span id="LC3" class="line" data-lang="shell">000045d0  65 20 28 44 3a 32 30 30  38 30 37 30 31 30 35 32  |e <span class="o">(</span>D:20080701052|</span>&#x000A;<span id="LC4" class="line" data-lang="shell">000045e0  34 34 37 5a 30 30 27 30  30 27 29 0a 2f 43 72 65  |447Z00<span class="s1">'00'</span><span class="o">)</span>./Cre|</span>&#x000A;<span id="LC5" class="line" data-lang="shell">000045f0  61 74 69 6f 6e 44 61 74  65 20 28 fe ff 00 44 00  |ationDate <span class="o">(</span>...D.|</span>&#x000A;<span id="LC6" class="line" data-lang="shell">00004600  3a 00 31 00 39 00 39 00  38 00 31 00 32 00 32 00  |:.1.9.9.8.1.2.2.|</span>&#x000A;<span id="LC7" class="line" data-lang="shell">00004610  33 00 31 00 39 00 35 00  32 00 2d 00 30 00 38 00  |3.1.9.5.2.-.0.8.|</span>&#x000A;<span id="LC8" class="line" data-lang="shell">00004620  27 00 30 00 30 00 27 29  0a 2f 50 72 6f 64 75 63  |<span class="s1">'.0.0.'</span><span class="o">)</span>./Produc|</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="36:1-36:178" dir="auto">Notice that the original ASCII <code data-sourcepos="36:32-36:67">/ModDate (D:20080701052447Z00'00')</code> is followed by a line feed, which is followed by <code data-sourcepos="36:118-36:178">/CreationDate (0xfe 0xff 0x00 0x44 0x00 0x3a 0x00 0x31 ...)</code></p>&#x000A;<p data-sourcepos="38:1-38:208" dir="auto">Instead, the updated CreationDate should be written as printable ASCII (PDFDocEncoding subset), consistent with the original ModifyDate and the PDF date string format: <code data-sourcepos="38:169-38:207">/CreationDate (D:199812231952-08'00')</code>.</p>&#x000A;<p data-sourcepos="40:1-40:75" dir="auto">PDF specifications define date strings as containing only ASCII characters:</p>&#x000A;<ul data-sourcepos="42:1-44:172" dir="auto">&#x000A;<li data-sourcepos="42:1-42:258">In PDF spec 1.3, <a data-sourcepos="42:20-42:100" href="https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.3.pdf" rel="nofollow noreferrer noopener" target="_blank">https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.3.pdf</a>, Table 3.21, a date is a string, and a string is specified at the beginning of § 3.2.3 as a series of bytes—unsigned integer values in the range 0 to 255.</li>&#x000A;<li data-sourcepos="43:1-43:136">In PDF spec 1.7, <a data-sourcepos="43:20-43:98" href="https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf" rel="nofollow noreferrer noopener" target="_blank">https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf</a>, Table 34, a date is an ASCII string.</li>&#x000A;<li data-sourcepos="44:1-44:172">In PDF spec 2.0, <a data-sourcepos="44:20-44:129" href="https://developer.adobe.com/document-services/docs/assets/5b15559b96303194340b99820d3a70fa/PDF_ISO_32000-2.pdf" rel="nofollow noreferrer noopener" target="_blank">https://developer.adobe.com/document-services/docs/assets/5b15559b96303194340b99820d3a70fa/PDF_ISO_32000-2.pdf</a>, Table 35, a date is also an ASCII string.</li>&#x000A;</ul>&#x000A;<p data-sourcepos="46:1-46:283" dir="auto">A reader might notice that § 7.9.4 in specs 1.7 and 2.0 say that the date is a “text string”, which, when interpreted as a data type rather than as plain English, may use UTF-16BE. However, this is unnecessary for date fields, since they contain only printable ASCII characters.</p>&#x000A;<p data-sourcepos="48:1-48:88" dir="auto">This bug affects interoperability, as the same Info dictionary contains mixed encodings:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="50:1-53:3" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">/ModDate (D:20080701052447Z00'00')  % ASCII</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">/CreationDate &lt;FEFF0044...&gt;         % UTF-16BE</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="55:1-55:549" dir="auto">Suggested fix: When writing Info-dictionary date fields, pdftk-java should write printable-ASCII strings (a PDFDocEncoding subset) instead of UTF-16BE when the string contains only printable ASCII characters. If a character outside the printable ASCII is present in an input date string, the string is not a valid PDF date (in which case the string might still represent a date, but not in English, e.g., “четверг, 19 февраля 2026 г., 23:02:57 МСК”, a case for an error/warning message or for a translation/conversion attempt).</p>&#x000A;<p data-sourcepos="57:1-57:71" dir="auto">I use pdftk-java 3.3.3 and openjdk 21.0.10 2026-01-20 on Debian trixie.</p>&#x000A;<p data-sourcepos="59:1-59:58" dir="auto">Downstream issue report: <a data-sourcepos="59:26-59:56" href="https://bugs.debian.org/1128417" rel="nofollow noreferrer noopener" target="_blank">https://bugs.debian.org/1128417</a> .</p>&#x000A;<p data-sourcepos="61:1-61:485" dir="auto">PS. More generally, also other fields from the Document Information Dictionary would profit from ASCII whenever the input is representable in ASCII. For example, <code data-sourcepos="61:163-61:309">pdftk sample.pdf update_info &lt;(echo -e "InfoBegin\nInfoKey: Title\nInfoValue: sample") output sample_with_title.pdf &amp;&amp; grep -a sample sample*.pdf</code> currently does not find sample_with_title.pdf but would do so if the rewritten title “sample” were stored as ASCII. Last but not least, a tiny bit of space would be saved.</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2026-01-24:5029348265</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/185"/>
  <title>Frank Heckenbach opened issue #185: Unhelpful error message &amp;quot;Unhandled Java Exception&amp;quot; at pdftk-java / pdftk-java</title>
  <updated>2026-01-24T14:27:33Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/571bed059b7ca916d32a84e5826bc0f75a5792a7e03c8f4314bbd487a912f8c7?s=80&amp;d=identicon"/>
  <author>
    <username>frankheckenbach</username>
    <name>Frank Heckenbach</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:98" dir="auto">I don't know if you care much about bad error messages, but since it's telling me to report it ...</p>&#x000A;<p data-sourcepos="3:1-3:230" dir="auto">After I had accidentally set wrong permissions in /etc, pdftk failed with an unhelpful error message. It contains a stack trace which doesn't help, but doesn't mention the affected file, so I had to use strace to find the problem.</p>&#x000A;<p data-sourcepos="5:1-5:13" dir="auto">To reproduce:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="7:1-36:3" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">% sudo chmod 700 /etc/java-21-openjdk/  # or whatever version</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">% pdftk A=/usr/share/texmf/doc/latex/preview/preview.pdf cat A output /tmp/foo.pdf  # file names and content don't matter</span>&#x000A;<span id="LC3" class="line" data-lang="plaintext">Unhandled Java Exception in create_output():</span>&#x000A;<span id="LC4" class="line" data-lang="plaintext">java.lang.InternalError: Error loading java.security file</span>&#x000A;<span id="LC5" class="line" data-lang="plaintext">        at java.base/java.security.Security.initialize(Security.java:105)</span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">        at java.base/java.security.Security.lambda$static$0(Security.java:84)</span>&#x000A;<span id="LC7" class="line" data-lang="plaintext">        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)</span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">        at java.base/java.security.Security.&lt;clinit&gt;(Security.java:83)</span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">        at java.base/sun.security.jca.ProviderList.&lt;init&gt;(ProviderList.java:179)</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">        at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:96)</span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">        at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:94)</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)</span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">        at java.base/sun.security.jca.ProviderList.fromSecurityProperties(ProviderList.java:93)</span>&#x000A;<span id="LC14" class="line" data-lang="plaintext">        at java.base/sun.security.jca.Providers.&lt;clinit&gt;(Providers.java:55)</span>&#x000A;<span id="LC15" class="line" data-lang="plaintext">        at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:156)</span>&#x000A;<span id="LC16" class="line" data-lang="plaintext">        at java.base/java.security.MessageDigest.getInstance(MessageDigest.java:185)</span>&#x000A;<span id="LC17" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfEncryption.createDocumentId(PdfEncryption.java:342)</span>&#x000A;<span id="LC18" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfWriter.close(PdfWriter.java:1370)</span>&#x000A;<span id="LC19" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfCopy.close(PdfCopy.java:783)</span>&#x000A;<span id="LC20" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfDocument.close(PdfDocument.java:963)</span>&#x000A;<span id="LC21" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.com.lowagie.text.Document.close(Document.java:532)</span>&#x000A;<span id="LC22" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.cat.create_output_cat(cat.java:481)</span>&#x000A;<span id="LC23" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.TK_Session.create_output(TK_Session.java:1451)</span>&#x000A;<span id="LC24" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.pdftk.main_noexit(pdftk.java:190)</span>&#x000A;<span id="LC25" class="line" data-lang="plaintext">        at com.gitlab.pdftk_java.pdftk.main(pdftk.java:161)</span>&#x000A;<span id="LC26" class="line" data-lang="plaintext">There was a problem with pdftk-java. Please report it at</span>&#x000A;<span id="LC27" class="line" data-lang="plaintext">https://gitlab.com/pdftk-java/pdftk/issues</span>&#x000A;<span id="LC28" class="line" data-lang="plaintext">including the message above, the version of pdftk-java (3.3.3), and if possible steps to reproduce the error.</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-11-16:4817480391</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/184"/>
  <title>timo-a opened issue #184: ClassCastException PRIndirectReference cannot be cast to PdfArray for Japanese characters at pdftk-java / pdftk-java</title>
  <updated>2025-11-16T21:27:39Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/58fcb0d70ce73b6e0e8aa0c7e06547bd69235d15e6015d4eafbf96de05448806?s=80&amp;d=identicon"/>
  <author>
    <username>timo-a</username>
    <name>timo-a</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:119" dir="auto">In the directory of the attached file <a data-sourcepos="1:39-1:110" href="https://gitlab.com/-/project/5024297/uploads/964dd6df8ddd34d4fe147205111f1a8c/100871529.pdf" data-canonical-src="/uploads/964dd6df8ddd34d4fe147205111f1a8c/100871529.pdf" data-link="true" class="gfm">100871529.pdf</a> execute:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="3:1-6:4" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">pdftk 100871529.pdf generate_fdf output data.fdf</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">pdftk 100871529.pdf fill_form data.fdf output filled.pdf</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="8:1-8:17" dir="auto">Error message is:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="9:1-23:4" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">Unhandled Java Exception in create_output():</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">java.lang.ClassCastException: class com.gitlab.pdftk_java.com.lowagie.text.pdf.PRIndirectReference cannot be cast to class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfArray (com.gitlab.pdftk_java.com.lowagie.text.pdf.PRIndirectReference and com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfArray are in unnamed module of loader 'app')</span>&#x000A;<span id="LC3" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.com.lowagie.text.pdf.AcroFields.getAppearance(AcroFields.java:763)</span>&#x000A;<span id="LC4" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.com.lowagie.text.pdf.AcroFields.getAppearance(AcroFields.java:800)</span>&#x000A;<span id="LC5" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.com.lowagie.text.pdf.AcroFields.setField(AcroFields.java:1357)</span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.com.lowagie.text.pdf.AcroFields.setFields(AcroFields.java:1234)</span>&#x000A;<span id="LC7" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.filter.create_output_filter(filter.java:320)</span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.TK_Session.create_output(TK_Session.java:1457)</span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.pdftk.main_noexit(pdftk.java:190)</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">	at com.gitlab.pdftk_java.pdftk.main(pdftk.java:161)</span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">There was a problem with pdftk-java. Please report it at</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">https://gitlab.com/pdftk-java/pdftk/issues</span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">including the message above, the version of pdftk-java (3.3.3), and if possible steps to reproduce the error.</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="25:1-25:172" dir="auto">By deleting stuff and running fill_form again data.fdf can be condensed to the attached <a data-sourcepos="25:89-25:172" href="https://gitlab.com/-/project/5024297/uploads/3c9f6bea0da4c6fccd90d7fee22ae945/data_dropdown11.fdf" data-canonical-src="/uploads/3c9f6bea0da4c6fccd90d7fee22ae945/data_dropdown11.fdf" data-link="true" class="gfm">data_dropdown11.fdf</a></p>&#x000A;<p data-sourcepos="27:1-27:48" dir="auto"><code data-sourcepos="27:1-27:25">cat data_dropdown11.fdf</code> displays it like this:</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="28:1-51:4" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">%FDF-1.2</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">%����</span>&#x000A;<span id="LC3" class="line" data-lang="plaintext">1 0 obj</span>&#x000A;<span id="LC4" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC5" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">/FDF </span>&#x000A;<span id="LC7" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">/Fields [</span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">/T (Dropdown11)</span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">/V (��-00$k0o0$j0g50��x0�0`N�0k0`0Q�^0M0~0Y Question No. 12 must be answered only by those who chose 5 in No. 11 above0�\r)</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">&gt;&gt;]</span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC14" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC15" class="line" data-lang="plaintext">endobj</span>&#x000A;<span id="LC16" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC17" class="line" data-lang="plaintext">trailer</span>&#x000A;<span id="LC18" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC19" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC20" class="line" data-lang="plaintext">/Root 1 0 R</span>&#x000A;<span id="LC21" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC22" class="line" data-lang="plaintext">%%EOF</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="52:1-54:258" dir="auto"><code data-sourcepos="52:1-52:6">nano</code> and <code data-sourcepos="52:12-52:18">emacs</code> add <code data-sourcepos="52:24-52:27">^@</code> before the ascii characters.&#x000A;The value here corresponds to the first option in the dropdown and is shown by default. The last choice, a single space character, doesn't contain any Japanese characters. But even when I try to put a space as the value, I get the same stack trace. This suggests that the problem isn't so much the Japanese in data.fdf but filling out the PDF.&#x000A;At this point it is not clear if the issue is with <code data-sourcepos="54:52-54:65">generate_fdf</code> or <code data-sourcepos="54:70-54:80">fill_form</code>. The generated data.fdf might be fundamentally faulty, maybe in the header, and cause problems with <code data-sourcepos="54:182-54:192">fill_form</code> no matter what you delete). However data.fdf can be condensed to</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="55:1-79:4" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">%FDF-1.2</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">%\342\343\317\323</span>&#x000A;<span id="LC3" class="line" data-lang="plaintext">1 0 obj</span>&#x000A;<span id="LC4" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC5" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">/FDF </span>&#x000A;<span id="LC7" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">/Fields [</span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">/T (Text2)</span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">/V ()</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">&gt;&gt;]</span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC14" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC15" class="line" data-lang="plaintext">endobj</span>&#x000A;<span id="LC16" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC17" class="line" data-lang="plaintext">trailer</span>&#x000A;<span id="LC18" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC19" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC20" class="line" data-lang="plaintext">/Root 1 0 R</span>&#x000A;<span id="LC21" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC22" class="line" data-lang="plaintext">%%EOF</span>&#x000A;<span id="LC23" class="line" data-lang="plaintext"></span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="80:1-80:195" dir="auto">which does work, suggesting that the output of <code data-sourcepos="80:48-80:61">generate_fdf</code> is not inherently faulty. Therefore I believe that the root cause is  <code data-sourcepos="80:133-80:143">fill_form</code> struggling with the Japanese characters of the PDF.</p>&#x000A;<p data-sourcepos="82:1-82:59" dir="auto"><strong data-sourcepos="82:1-82:21">Bonus observation</strong>: <code data-sourcepos="82:24-82:33">data.fdf</code> can also be condensed to</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="83:1-106:5" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">%FDF-1.2</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">%âãÏÓ</span>&#x000A;<span id="LC3" class="line" data-lang="plaintext">1 0 obj</span>&#x000A;<span id="LC4" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC5" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">/FDF </span>&#x000A;<span id="LC7" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">/Fields [</span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">/T (Dropdown16)</span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">/V (-)</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">&gt;&gt;]</span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC14" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC15" class="line" data-lang="plaintext">endobj</span>&#x000A;<span id="LC16" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC17" class="line" data-lang="plaintext">trailer</span>&#x000A;<span id="LC18" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC19" class="line" data-lang="plaintext">&lt;&lt;</span>&#x000A;<span id="LC20" class="line" data-lang="plaintext">/Root 1 0 R</span>&#x000A;<span id="LC21" class="line" data-lang="plaintext">&gt;&gt;</span>&#x000A;<span id="LC22" class="line" data-lang="plaintext">%%EOF</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="107:1-107:135" dir="auto">which causes the aforementioned stacktrace too. <code data-sourcepos="107:49-107:60">Dropdown16</code> does not have any Japanese options, so Im not sure what's going on here...</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-10-04:4681062262</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/183"/>
  <title>Dirk Hünniger opened issue #183: File:Misak-ı Millî Beyannamesi.pdf at pdftk-java / pdftk-java</title>
  <updated>2025-10-04T11:47:16Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/83d401ee0cfa9ec447ab65aa624936ceab0d46246b86bbb74876dd7ba96f21a9?s=80&amp;d=identicon"/>
  <author>
    <username>dirk.hunniger</username>
    <name>Dirk Hünniger</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:6" dir="auto">Hello,</p>&#x000A;<p data-sourcepos="3:1-3:57" dir="auto">I tried to process the following PDF file from Wikipedia:</p>&#x000A;<p data-sourcepos="5:1-5:91" dir="auto"><a data-sourcepos="5:1-5:91" href="https://upload.wikimedia.org/wikipedia/commons/f/fa/Misak-%C4%B1_Mill%C3%AE_Beyannamesi.pdf" rel="nofollow noreferrer noopener" target="_blank">https://upload.wikimedia.org/wikipedia/commons/f/fa/Misak-%C4%B1_Mill%C3%AE_Beyannamesi.pdf</a></p>&#x000A;<p data-sourcepos="7:1-7:58" dir="auto">I saved the file on my local disk under the filename 9.pdf</p>&#x000A;<p data-sourcepos="9:1-9:21" dir="auto">The I ran the command</p>&#x000A;<p data-sourcepos="11:1-11:26" dir="auto">pdftk 9.pdf output tmp.pdf</p>&#x000A;<p data-sourcepos="13:1-13:28" dir="auto">And got the following error:</p>&#x000A;<p data-sourcepos="15:1-15:1009" dir="auto">1 dirk@dirk-ThinkCentre-M75q-Gen-5:<span data-escaped-char="" data-sourcepos="15:36-15:37">~</span>/tur/document/images$ pdftk 9.pdf output tmp.pdf Unhandled Java Exception in create_output(): java.lang.ClassCastException: class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfLiteral cannot be cast to class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfDictionary (com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfLiteral and com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfDictionary are in unnamed module of loader 'app') at com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfStamperImp.close(PdfStamperImp.java:251) at com.gitlab.pdftk_java.filter.create_output_filter(filter.java:490) at com.gitlab.pdftk_java.TK_Session.create_output(TK_Session.java:1457) at com.gitlab.pdftk_java.pdftk.main_noexit(pdftk.java:190) at com.gitlab.pdftk_java.pdftk.main(pdftk.java:161) There was a problem with pdftk-java. Please report it at <a data-sourcepos="15:858-15:899" href="https://gitlab.com/pdftk-java/pdftk/issues">https://gitlab.com/pdftk-java/pdftk/issues</a> including the message above, the version of pdftk-java (3.3.3), and if possible steps to reproduce the error.</p>&#x000A;<p data-sourcepos="17:1-17:25" dir="auto">I am running Ubuntu 24.04</p>&#x000A;<p data-sourcepos="19:1-19:64" dir="auto">dirk@dirk-ThinkCentre-M75q-Gen-5:<span data-escaped-char="" data-sourcepos="19:34-19:35">~</span>/tur/document/main$ uname -r</p>&#x000A;<p data-sourcepos="21:1-21:17" dir="auto">6.14.0-33-generic</p>&#x000A;<p data-sourcepos="23:1-23:531" dir="auto">dirk@dirk-ThinkCentre-M75q-Gen-5:<span data-escaped-char="" data-sourcepos="23:34-23:35">~</span>/tur/document/main$ pdftk --version pdftk port to java 3.3.3 a Handy Tool for Manipulating PDF Documents Copyright (c) 2017-2018 Marc Vinyals - <a data-sourcepos="23:180-23:214" href="https://gitlab.com/pdftk-java/pdftk">https://gitlab.com/pdftk-java/pdftk</a> Copyright (c) 2003-2013 Steward and Lee, LLC. pdftk includes a modified version of the iText library. Copyright (c) 1999-2009 Bruno Lowagie, Paulo Soares, et al. This is free software; see the source code for copying conditions. There is NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>&#x000A;<p data-sourcepos="25:1-25:152" dir="auto">I am doing a mass testing of my mediawiki2latex project on the English Wikipedia and the error came up during this testing. When processing the article:</p>&#x000A;<p data-sourcepos="27:1-27:83" dir="auto"><a data-sourcepos="27:1-27:83" href="https://en.wikipedia.org/wiki/United_Kingdom_during_the_Turkish_War_of_Independence" rel="nofollow noreferrer noopener" target="_blank">https://en.wikipedia.org/wiki/United_Kingdom_during_the_Turkish_War_of_Independence</a></p>&#x000A;<p data-sourcepos="29:1-29:20" dir="auto">Yours Dirk Hünniger</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-09-16:4623222302</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/182"/>
  <title>Daeho Ro opened issue #182: Gradle v9 support at pdftk-java / pdftk-java</title>
  <updated>2025-09-16T15:36:03Z</updated>
  <media:thumbnail width="40" height="40" url="https://gitlab.com/uploads/-/system/user/avatar/22456900/avatar.png?v=1791098410"/>
  <author>
    <username>daeho-ro</username>
    <name>Daeho Ro</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:83" dir="auto">Hello, I think this project can support <code data-sourcepos="1:41-1:48">gradle</code> v9 but there is an error for now.</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="4:1-34:3" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">  Welcome to Gradle 9.0.0!</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC3" class="line" data-lang="plaintext">  Here are the highlights of this release:</span>&#x000A;<span id="LC4" class="line" data-lang="plaintext">   - Configuration Cache is the recommended execution mode</span>&#x000A;<span id="LC5" class="line" data-lang="plaintext">   - Gradle requires JVM 17 or higher to run</span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">   - Build scripts use Kotlin 2.2 and Groovy 4.0</span>&#x000A;<span id="LC7" class="line" data-lang="plaintext">   - Improved Kotlin DSL script compilation avoidance</span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">  For more details see https://docs.gradle.org/9.0.0/release-notes.html</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">  To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.0.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">  Daemon will be stopped at the end of the build </span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC14" class="line" data-lang="plaintext">  FAILURE: Build failed with an exception.</span>&#x000A;<span id="LC15" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC16" class="line" data-lang="plaintext">  * Where:</span>&#x000A;<span id="LC17" class="line" data-lang="plaintext">  Build file '/private/tmp/pdftk-java-20250916-8795-l66o4n/pdftk-v3.3.3/build.gradle' line: 5</span>&#x000A;<span id="LC18" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC19" class="line" data-lang="plaintext">  * What went wrong:</span>&#x000A;<span id="LC20" class="line" data-lang="plaintext">  An exception occurred applying plugin request [id: 'com.github.johnrengelman.shadow', version: '7.1.2']</span>&#x000A;<span id="LC21" class="line" data-lang="plaintext">  &gt; Failed to apply plugin class 'com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin'.</span>&#x000A;<span id="LC22" class="line" data-lang="plaintext">     &gt; Could not get unknown property 'convention' for root project 'pdftk' of type org.gradle.api.Project.</span>&#x000A;<span id="LC23" class="line" data-lang="plaintext">  </span>&#x000A;<span id="LC24" class="line" data-lang="plaintext">  * Try:</span>&#x000A;<span id="LC25" class="line" data-lang="plaintext">  &gt; Run with --stacktrace option to get the stack trace.</span>&#x000A;<span id="LC26" class="line" data-lang="plaintext">  &gt; Run with --info or --debug option to get more log output.</span>&#x000A;<span id="LC27" class="line" data-lang="plaintext">  &gt; Run with --scan to generate a Build Scan (Powered by Develocity).</span>&#x000A;<span id="LC28" class="line" data-lang="plaintext">  &gt; Get more help at https://help.gradle.org.</span>&#x000A;<span id="LC29" class="line" data-lang="plaintext">  </span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>&#x000A;<p data-sourcepos="36:1-36:7" dir="auto">Thanks,</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-09-14:4616416508</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/178"/>
  <title>PunyPony closed issue #178: CVE-2025-48924 at pdftk-java / pdftk-java</title>
  <updated>2025-09-14T18:21:01Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/ac9236c3dd1ffde64e7c77aa512d81e37e7000e000640dc021ae24508d98b269?s=80&amp;d=identicon"/>
  <author>
    <username>PunyPony</username>
    <name>PunyPony</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:7" dir="auto">Hello,</p>&#x000A;<p data-sourcepos="3:1-4:51" dir="auto">apache-commons-lang3 need to be updated to at least 3.18.&#x000A;<a data-sourcepos="4:1-4:51" href="https://bugzilla.redhat.com/show_bug.cgi?id=2379554" rel="nofollow noreferrer noopener" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=2379554</a></p>&#x000A;<p data-sourcepos="6:1-6:7" dir="auto">Thanks,</p>&#x000A;<p data-sourcepos="8:1-8:7" dir="auto">Regards</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-08-30:4573275841</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/87#note_2720410233"/>
  <title>Robert Phair commented on issue #87 at pdftk-java / pdftk-java</title>
  <updated>2025-08-30T18:26:47Z</updated>
  <media:thumbnail width="40" height="40" url="https://gitlab.com/uploads/-/system/user/avatar/3112672/avatar.png?v=1756578066"/>
  <author>
    <username>rphair</username>
    <name>Robert Phair</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:252" dir="auto">I am probably "missing out" but still so far I've only used <code data-sourcepos="1:61-1:66">qpdf</code> for decryption of encrypted PDFs.  The second-nature syntax of <code data-sourcepos="1:131-1:137">pdftk</code> after years of using it... having created many shell aliases for common <code data-sourcepos="1:211-1:217">pdftk</code> tasks... has kept me holding on.</p>
<p data-sourcepos="3:1-3:187" dir="auto">Given the AES256 problem I would be interested migrating fully to <code data-sourcepos="3:67-3:72">qpdf</code> if there were a good guide how to translate syntax from one to the other: but still I'll hope for a solution here.</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-08-26:4557625104</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/181"/>
  <title>Sybe opened issue #181: ClassCastException when processing PDF at pdftk-java / pdftk-java</title>
  <updated>2025-08-26T05:30:30Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/e09bbee505aec14653bffb27a513d5e2d5f574cf54ccd1bd1145bd6b6fd39ad6?s=80&amp;d=identicon"/>
  <author>
    <username>Sybe</username>
    <name>Sybe</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:193" dir="auto">We get a class cast exception when processing a pdf file. The file we process is a user file, with personal data, so we cannot upload that here. We hope the stacktrace also tells you something.</p>&#x000A;<div class="gl-relative markdown-code-block js-markdown-code"><pre data-sourcepos="3:1-21:3" class="code highlight js-syntax-highlight language-plaintext" v-pre="true"><code><span id="LC1" class="line" data-lang="plaintext">Prepared transformation with external tool failed (Command 'timeout -k5 900 pdftk '/tmp/RackMultipart20250825-6-n2cj5j' output '/tmp/20250825-6-eloyn9'' returned 2. Expected 0</span>&#x000A;<span id="LC2" class="line" data-lang="plaintext">Here is the command output: STDOUT:</span>&#x000A;<span id="LC3" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC4" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC5" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC6" class="line" data-lang="plaintext">STDERR:</span>&#x000A;<span id="LC7" class="line" data-lang="plaintext"></span>&#x000A;<span id="LC8" class="line" data-lang="plaintext">Unhandled Java Exception in create_output():</span>&#x000A;<span id="LC9" class="line" data-lang="plaintext">java.lang.ClassCastException: class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfDictionary cannot be cast to class com.gitlab.pdftk_java.com.lowagie.text.pdf.PRIndirectReference (com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfDictionary and com.gitlab.pdftk_java.com.lowagie.text.pdf.PRIndirectReference are in unnamed module of loader 'app')</span>&#x000A;<span id="LC10" class="line" data-lang="plaintext">  at com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfStamperImp.close(PdfStamperImp.java:194)</span>&#x000A;<span id="LC11" class="line" data-lang="plaintext">  at com.gitlab.pdftk_java.filter.create_output_filter(filter.java:490)</span>&#x000A;<span id="LC12" class="line" data-lang="plaintext">  at com.gitlab.pdftk_java.TK_Session.create_output(TK_Session.java:1457)</span>&#x000A;<span id="LC13" class="line" data-lang="plaintext">  at com.gitlab.pdftk_java.pdftk.main_noexit(pdftk.java:190)</span>&#x000A;<span id="LC14" class="line" data-lang="plaintext">  at com.gitlab.pdftk_java.pdftk.main(pdftk.java:161)</span>&#x000A;<span id="LC15" class="line" data-lang="plaintext">There was a problem with pdftk-java. Please report it at</span>&#x000A;<span id="LC16" class="line" data-lang="plaintext">https://gitlab.com/pdftk-java/pdftk/issues</span>&#x000A;<span id="LC17" class="line" data-lang="plaintext">including the message above, the version of pdftk-java (3.3.3), and if possible steps to reproduce the error.)</span></code></pre><copy-code></copy-code><insert-code-snippet></insert-code-snippet></div>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-08-22:4548958327</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/87#note_2702884645"/>
  <title>Brian commented on issue #87 at pdftk-java / pdftk-java</title>
  <updated>2025-08-22T09:05:31Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/62044ed3083bcd1fef299fb044eb4ae9e43eacbfb25dd828e82530d0b90a9073?s=80&amp;d=identicon"/>
  <author>
    <username>flavourdare</username>
    <name>Brian</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:188" dir="auto">Hi, <a href="https://gitlab.com/marcvinyals" title="Marc Vinyals" class="gfm gfm-project_member js-user-link" data-user="943473" data-original="@marcvinyals" data-container="body" data-placement="top" data-reference-type="user">@marcvinyals</a> still no plans to do this in pdftk-java? For the people who are using qpdf, are you replacing pdftk-java completely with qpdf, or do you just use it for certain functions?</p>
<p data-sourcepos="3:1-3:6" dir="auto">thanks</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-08-08:4508232588</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/180"/>
  <title>kausal381 opened issue #180: trailer not found.; Original message: xref subsection not found at file pointer 120 at pdftk-java / pdftk-java</title>
  <updated>2025-08-08T09:27:47Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/7ffb0cbd75593834cfcffc47a2b167648e2541a068de9abb23fde880e8b81718?s=80&amp;d=identicon"/>
  <author>
    <username>kausal381</username>
    <name>kausal381</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-9:42" dir="auto">termux 119 beta 3 amdroid 15&#x000A;<a data-sourcepos="2:1-2:95" href="https://drive.google.com/file/d/1nhLz8T-OsiR24Em_1ssYzUpMkraddVNo/view?usp=sharing" rel="nofollow noreferrer noopener" target="_blank">file link</a>&#x000A;stamp gives the exact same error&#x000A;.../p/n $ pdftk chem.pdf background wm.pdf output watermarked.pdf&#x000A;Error: Invalid PDF: Rebuild failed: trailer not found.; Original message: xref subsection not found at file pointer 120&#x000A;Error: Failed to open input PDF file:&#x000A;chem.pdf&#x000A;Errors encountered.  No output created.&#x000A;Done.  Input errors, so no output created.</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-08-03:4491004224</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/179"/>
  <title>Tristan Miller opened issue #179: Support logical page numbers (page labels) in commands at pdftk-java / pdftk-java</title>
  <updated>2025-08-03T22:25:20Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/7ab767e644ea711c3012b4455e26c802b7c5a73b043a9c5ae4d97409f7268389?s=80&amp;d=identicon"/>
  <author>
    <username>Logological</username>
    <name>Tristan Miller</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:851" dir="auto">In a PDF, each page is identified by a unique "page index" expressing the page's position from the beginning of the document.  This corresponds to what we think of as a physical page number (except we start counting physical pages at 1, whereas PDF page indices start at 0).  But PDF pages can also be associated with an independent "page label" serving as a logical page number.  This is commonly done to have separate numbering for the front matter (e.g., i, ii, iii, iv, v, etc.) and/or appendices (e.g., A-1, A-2, A-3, …, B-1, B-2, B-3, etc.).  Many PDF viewers will display both the physical and logical page numbers, and when prompting users for page numbers may default to interpreting them as logical rather than physical numbers.  Page labels are documented in §12.4.2 of the <a data-sourcepos="1:789-1:850" href="https://www.adobe.com/go/pdfreference" rel="nofollow noreferrer noopener" target="_blank">PDF 1.7 specification</a>.</p>&#x000A;<p data-sourcepos="3:1-3:571" dir="auto">As far as I can tell, the page numbers passed to various pdftk-java commands are always interpreted as physical page numbers.  It would be nice if there were some way of telling pdftk-java to interpret any given page number as a logical page number, such as with a new qualifier character.  This way, if I want to extract (say) a book's appendix page labelled A-127, I don't need to open it in a PDF viewer first to find out its physical page number, or to remember that the book has 28 pages of front matter and 1775 pages of main matter and then do the math in my head.</p>&#x000A;<p data-sourcepos="5:1-5:565" dir="auto">One possible problem is that logical page numbers are not guaranteed to be unique, though I think PDFs with duplicate page labels are fairly rare.  The simplest solution would probably be for pdftk-java to always interpret the "begin logical page number" of a page range as the first physical page with the corresponding page label in the PDF document, and the "end logical page number" as the first physical page after the "begin (logical) page number" with the corresponding page label.  This behaviour should probably be documented to avoid unexpected surprises.</p>&#x000A;<p data-sourcepos="7:1-7:305" dir="auto">Another possible problem is that page labels can contain arbitrary strings, including the hyphens and spaces that pdftk-java uses to delimit page ranges and arguments.  pdftk-java would need to specify some way that these characters occurring in logical page numbers should be escaped on the command line.</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-07-25:4467191850</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/work_items/178"/>
  <title>PunyPony opened issue #178: CVE-2025-48924 at pdftk-java / pdftk-java</title>
  <updated>2025-07-25T13:15:00Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/ac9236c3dd1ffde64e7c77aa512d81e37e7000e000640dc021ae24508d98b269?s=80&amp;d=identicon"/>
  <author>
    <username>PunyPony</username>
    <name>PunyPony</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:7" dir="auto">Hello,</p>&#x000A;<p data-sourcepos="3:1-4:51" dir="auto">apache-commons-lang3 need to be updated to at least 3.18.&#x000A;<a data-sourcepos="4:1-4:51" href="https://bugzilla.redhat.com/show_bug.cgi?id=2379554" rel="nofollow noreferrer noopener" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=2379554</a></p>&#x000A;<p data-sourcepos="6:1-6:7" dir="auto">Thanks,</p>&#x000A;<p data-sourcepos="8:1-8:7" dir="auto">Regards</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-07-17:4443207736</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/177#note_2633583796"/>
  <title>Mike Scherenberg commented on issue #177 at pdftk-java / pdftk-java</title>
  <updated>2025-07-17T13:18:53Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/6be224e2e68426a96f95b431003edf1232624b688d3867cbf6c2d2264dafa7b0?s=80&amp;d=identicon"/>
  <author>
    <username>mscherenberg</username>
    <name>Mike Scherenberg</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:123" dir="auto">just a note - it automatically updated again and broke. Had to downgrade again, then ran this command to lock the version.</p>
<p data-sourcepos="3:1-3:26" dir="auto">yum versionlock add tzdata</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-07-17:4441252550</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/177#note_2632332949"/>
  <title>David Ringlein commented on issue #177 at pdftk-java / pdftk-java</title>
  <updated>2025-07-17T00:45:13Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/50cc04672a068954336c27ab78e4e0b9bd2367a7157bfb8d66b50944ce3d111e?s=80&amp;d=identicon"/>
  <author>
    <username>DPR22</username>
    <name>David Ringlein</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:49" dir="auto">We are good as well, thank you guys for the help!</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-07-17:4441205082</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/177#note_2632302111"/>
  <title>Damon Hopkins commented on issue #177 at pdftk-java / pdftk-java</title>
  <updated>2025-07-17T00:03:29Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/814c4c43447bfa7d4853c7555068bedb3fe9b3dddd82bc9f4f1b99bc58113960?s=80&amp;d=identicon"/>
  <author>
    <username>sailingstones</username>
    <name>Damon Hopkins</name>
    <email></email>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:97" dir="auto">Thanks guys! I ran <code data-sourcepos="1:20-1:97">sudo yum downgrade tzdata-2024a-1.el7.noarch tzdata-java-2024a-1.el7.noarch </code></p>
<p data-sourcepos="3:1-3:78" dir="auto">Also installed version lock and ran <code data-sourcepos="3:37-3:78">sudo yum versionlock tzdata tzdata-java.</code></p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-07-16:4439484423</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/177#note_2630978591"/>
  <title>Mike Scherenberg commented on issue #177 at pdftk-java / pdftk-java</title>
  <updated>2025-07-16T12:59:33Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/6be224e2e68426a96f95b431003edf1232624b688d3867cbf6c2d2264dafa7b0?s=80&amp;d=identicon"/>
  <author>
    <username>mscherenberg</username>
    <name>Mike Scherenberg</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:108" dir="auto">thank you for this information. For those that don't have the older version in their repo, here's what I ran</p>
<p data-sourcepos="3:1-4:39" dir="auto">#Removed the new version
sudo rpm -e --nodeps tzdata tzdata-java</p>
<p data-sourcepos="6:1-8:97" dir="auto">#Downloaded the older versions
wget <a data-sourcepos="7:6-7:92" href="https://vault.centos.org/7.9.2009/updates/x86_64/Packages/tzdata-2024a-1.el7.noarch.rpm" rel="nofollow noreferrer noopener" target="_blank">https://vault.centos.org/7.9.2009/updates/x86_64/Packages/tzdata-2024a-1.el7.noarch.rpm</a>
wget <a data-sourcepos="8:6-8:97" href="https://vault.centos.org/7.9.2009/updates/x86_64/Packages/tzdata-java-2024a-1.el7.noarch.rpm" rel="nofollow noreferrer noopener" target="_blank">https://vault.centos.org/7.9.2009/updates/x86_64/Packages/tzdata-java-2024a-1.el7.noarch.rpm</a></p>
<p data-sourcepos="10:1-11:91" dir="auto">#Installed
sudo rpm -Uvh --oldpackage tzdata-2024a-1.el7.noarch.rpm tzdata-java-2024a-1.el7.noarch.rpm</p>
<h1 data-sourcepos="13:1-13:9" dir="auto">Restart</h1>
<p data-sourcepos="14:1-14:28" dir="auto">sudo systemctl restart httpd</p>
<p data-sourcepos="16:1-16:16" dir="auto">Fixed the issue.</p>
</div>
  </summary>
</entry>
<entry>
  <id>tag:gitlab.com,2025-07-16:4437868617</id>
  <link href="https://gitlab.com/pdftk-java/pdftk/-/issues/177#note_2629815478"/>
  <title>Aviram Baranes commented on issue #177 at pdftk-java / pdftk-java</title>
  <updated>2025-07-16T04:20:54Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/e7f18ca56ca5df4055ee8ea6ade5accac84a5ded319af205b504a21984ae362a?s=80&amp;d=identicon"/>
  <author>
    <username>aviram7</username>
    <name>Aviram Baranes</name>
    <email/>
  </author>
  <summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p data-sourcepos="1:1-1:198" dir="auto">I had the same issue after years of everything working flawlessly. After a lot of debugging, I discovered that two packages (tzdata and tzdata-java) were automatically updated by yum three days ago.</p>
<p data-sourcepos="3:1-3:239" dir="auto">These packages provide the system timezone data that Java uses internally. The new version included updated timezone files that caused pdftk-java to crash when trying to read them (specifically when adding PDF metadata like creation date).</p>
<p data-sourcepos="5:1-10:1" dir="auto">Downgrading these packages immediately solved the problem:
<code data-sourcepos="6:1-10:3">sudo yum --disablerepo=centos7-els downgrade \ tzdata-2024a-1.el7.noarch \ tzdata-java-2024a-1.el7.noarch</code></p>
</div>
  </summary>
</entry>
</feed>
