pdfcpu icon indicating copy to clipboard operation
pdfcpu copied to clipboard

Fedora: manage pdfcpu release upgrade process

Open jhinrichsen opened this issue 1 year ago • 6 comments

Linux, Fedora 41

I can successfully extract an embedded XML from a PDF using the CLI (pdfcpu attachments extract testdata/invoice_2.pdf).

When i try to use the API, it fails giving "--- FAIL: TestExtract (0.00s) main_test.go:49: Read: xRefTable failed: parseTrailerDict: PDF1.4 conformant reader: found incompatible version: 1.4"

I tried both model.Configuration.Validation strict and relaxed, and model.Configuration.Reader15 on and off to no avail.

Here's my attempt: https://gitlab.com/jhinrichsen/zugferd/-/jobs/8635875360.

Thanks in advance for taking time to look into this, i feel rude opening an issue just because i don't get it.

jhinrichsen avatar Dec 13 '24 14:12 jhinrichsen

Are you certain your CLI and API are the exaclty same version? I've had similar divergence issues where eventually I realised the two were not built from the same checkin.

mdmcconnell avatar Dec 16 '24 14:12 mdmcconnell

Yes, first doublecheck API vs. CLI version. Can you share an example for analysis?

hhrutter avatar Dec 16 '24 17:12 hhrutter

The CLI is standard Fedora 41 which reports "v0.3.13 dev". API is pdfcpu@latest "go: downloading github.com/pdfcpu/pdfcpu v0.9.1".

The two PDF that work for CLI but not for API are here: https://gitlab.com/jhinrichsen/zugferd/-/tree/main/testdata?ref_type=heads

I attached the two files for convenience. invoice_2.pdf invoice_1.pdf

jhinrichsen avatar Dec 17 '24 15:12 jhinrichsen

Extraction of attachments for these files works fine using the latest commit.

hhrutter avatar Dec 20 '24 11:12 hhrutter

Yay, works on my machine.

Anyway, thanks for your time and looking into this issue. Closing unresolved for me.

jhinrichsen avatar Dec 21 '24 17:12 jhinrichsen

I am sorry I do not have the time to ensure Linux distros always use the latest release. Maybe another valued pdfcpu user does 🙏🏻 ?

Meanwhile you can try to install pdfcpu using brew.

hhrutter avatar Dec 29 '24 20:12 hhrutter