Skip to content

Update Poppler 2026-03#451

Merged
StevenMaude merged 11 commits intomainfrom
poppler-update-2026-03
Mar 23, 2026
Merged

Update Poppler 2026-03#451
StevenMaude merged 11 commits intomainfrom
poppler-update-2026-03

Conversation

@StevenMaude
Copy link
Copy Markdown
Contributor

@StevenMaude StevenMaude commented Mar 16, 2026

This updates Poppler to 26.03.0.

Several fixes were needed for Poppler 26.01 and 26.02.

(An extra revert is needed from Poppler 26.01 to keep outputs consistent. This is for Poppler commit 8109826642bbc7080150fb18a43de36033b7995b.)

@StevenMaude
Copy link
Copy Markdown
Contributor Author

StevenMaude commented Mar 16, 2026

Poppler 26.01.0 gives the same outputs as previously, though believe it needs an extra revert.

@StevenMaude StevenMaude marked this pull request as draft March 16, 2026 19:19
@StevenMaude StevenMaude force-pushed the poppler-update-2026-03 branch 2 times, most recently from acf8452 to 77870dd Compare March 23, 2026 15:43
@StevenMaude StevenMaude marked this pull request as ready for review March 23, 2026 15:43
StevenMaude and others added 11 commits March 23, 2026 15:44
This wouldn't compile because `gmallocn` is no longer available.

We could add it by including `goo/gmem.h`.

Instead, we remove the need for creating `ucs4_out` at all.

This is reasonable since it turns out that:

* `TextStringToUCS4` copies data anyway.
* We're not overwriting the data in any case.
While we're modifying the code here.

Use a range-based loop to simplify the code.
Adapt to poppler API changes where raw double pointers and arrays
were replaced with std::array<double, 6>:

- setDefaultCTM: const double* -> const std::array<double, 6>&
- setSoftMaskFromImageMask: double* baseMatrix -> std::array<double, 6>&
- unsetSoftMaskFromImageMask: double* baseMatrix -> std::array<double, 6>&

These changes correspond to poppler commits:
- 99433381 (Convert a few more double * to std::array<double, 6>)
- d53d56bc (Turn baseMatrix into a std::array<double, 6>)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
These functions were removed from poppler's OutputDev base class
as they were unused. cvtUserToDev is retained as it still exists
in the base class.

This corresponds to poppler commit:
- 8d627b1b (Remove unused functions)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
The poppler API changed these parameters from raw Dict pointers to
const references, since the pointer is never null.

This corresponds to poppler commit:
- 0c73b998 (opiBegin/End: The pointer is never null so pass a const &)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
GfxState::getCTM() now returns const std::array<double, 6>& instead
of const double*. Update the Mat2x3 helper class to store a const
reference to the array instead of a raw pointer.

This corresponds to poppler commit:
- 99433381 (Convert a few more double * to std::array<double, 6>)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
TextPage no longer uses manual reference counting. The takeText()
method now returns std::unique_ptr<TextPage> instead of a raw
pointer, so the custom TextPageDecRef deleter and the associated
custom unique_ptr type are no longer needed.

This corresponds to poppler commit:
- 0a4419c6 (TextPage: stop manual refcount)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
PDFDoc now takes ownership of the BaseStream via std::unique_ptr
instead of a raw pointer. Update open_file to return
std::unique_ptr<BaseStream> and use std::move when passing it to
the PDFDoc constructor.

Also fix a pre-existing bug where file->size() was called after
file.release(), which would dereference a null unique_ptr. The
size is now captured before releasing ownership.

This corresponds to poppler commit:
- 7a73774b (Document some PDFDoc ownerships and the document stream)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
The reverseVideo parameter was removed from SplashOutputDev as
everyone was passing false. The parameter is simply dropped from
the constructor call.

This corresponds to poppler commit:
- 6ef3154e (Remove reverseVideo parameter)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@StevenMaude StevenMaude changed the title Update poppler 2026-03 Update Poppler 2026-03 Mar 23, 2026
@StevenMaude StevenMaude force-pushed the poppler-update-2026-03 branch from 77870dd to 672b2bf Compare March 23, 2026 15:47
@StevenMaude StevenMaude merged commit f9fc72e into main Mar 23, 2026
1 check passed
@StevenMaude StevenMaude deleted the poppler-update-2026-03 branch March 23, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant