Skip to content

jabkit pdf update --format=xmp reports success but does not modify existing PDFs #16087

Description

@wanling0000

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

Ubuntu 24.04.4 LTS

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

jabkit pdf update --format=xmp should write BibTeX metadata to an already existing linked PDF. Currently, it reports success for an existing PDF, but the PDF is not modified.

  1. From the repository root, prepare any existing PDF and a BibTeX entry linked to it.

The example below uses an existing test PDF from the repository, but any valid PDF should work.

mkdir -p build/tmp

cp jablib/src/test/resources/org/jabref/logic/importer/util/LNCS-minimal.pdf \
build/tmp/xmp-existing.pdf

PDF_PATH="$PWD/build/tmp/xmp-existing.pdf"
BIB_PATH="$PWD/build/tmp/xmp-existing.bib"

cat >| "$BIB_PATH" <<EOF
@Article{XmpExistingPdf,
author = {Doe, Jane},
title  = {XMP existing PDF test},
year   = {2026},
file   = {:$PDF_PATH:PDF}
}
EOF
  1. Record the checksum before running the command:
sha256sum "$PDF_PATH"

Example result:

33bde3cb4a48cdeb76fadadef4b2bbdd3bc773c338c16d77b0b23555062f82f4  .../build/tmp/xmp-existing.pdf
  1. Run pdf update --format=xmp:
./gradlew --rerun-tasks :jabkit:run --args="pdf update --porcelain --format=xmp --citation-key=XmpExistingPdf --input-format=bibtex --input=$BIB_PATH"
  1. Record the checksum again:
sha256sum "$PDF_PATH"

Expected behaviour:
The command should write XMP metadata to the linked existing PDF. The PDF should be modified, or the command should report that no metadata was written.

However, the checksum before and after running the command is identical:

33bde3cb4a48cdeb76fadadef4b2bbdd3bc773c338c16d77b0b23555062f82f4

This means the existing PDF was not modified.

Appendix

...

Log File
Paste an excerpt of your log file here

Metadata

Metadata

Assignees

Type

Fields

No fields configured for bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions