Skip to content

Comments

Add mergepdf microservice [minor]#501

Merged
aOelschlager merged 17 commits intomainfrom
alpaca-94
Dec 9, 2025
Merged

Add mergepdf microservice [minor]#501
aOelschlager merged 17 commits intomainfrom
alpaca-94

Conversation

@joecorall
Copy link
Contributor

@joecorall joecorall commented Nov 25, 2025

This PR does two things:

  1. Builds the alpaca JAR instead of downloading it from maven. Mainly to test Add full event as base 64 encoded X-Islandora-Event header Islandora/Alpaca#94 easily
  2. Adds a new mergepdf microservice to aggregate all children images of a paged content item into a single PDF

How to test

  1. Ensure your Drupal site is based on Islandora starter site OR has the two Drupal Views mentioned in the mergepdf dependencies. Also ensure the term by name view allows for JWT auth i.e. Add JWT authentication to term_from_term_name view islandora-starter-site#221
  2. Add the mergepdf service from this PR to your docker compose project
services:
  mergepdf:
    image: islandora/mergepdf:alpaca-94
    secrets: *secrets-jwt-public
  1. Update your alpaca service's tag to use this PR alpaca-94
services:
  alpaca:
    image: islandora/alpaca:alpaca-94
  1. On your Drupal site create an action to generate a PDF for paged content items. i.e. go to /admin/config/development/configuration/single/import, select Configuration type > Action, paste:
langcode: en
status: true
dependencies:
  module:
    - islandora
id: paged_content_created_aggregated_pdf
label: 'Paged Content - Created Aggregated PDF'
type: node
plugin: emit_node_event
configuration:
  queue: islandora-connector-mergepdf
  event: 'Generate Derivative'

And import it
5. At /admin/content select a paged content item that has a valid IIIF manifest at /node/{node}/book-manifest and apply the Paged Content - Created Aggregated PDF action to the node
6. Your paged content item should have a PDF attached as an original file after a few seconds/minutes

Links

Islandora-Labs/rfds#1

Interested parties

@aOelschlager @seth-shaw-asu

@joecorall joecorall changed the title Build alpaca JAR in buildkit Add mergepdf microservice [minor] Nov 25, 2025
@joecorall joecorall marked this pull request as ready for review November 25, 2025 23:04
Added requirement for jwt_auth in term_from_term_name view.
@aOelschlager aOelschlager self-requested a review November 26, 2025 18:09
@aOelschlager
Copy link
Contributor

I've been trying to test this today but it hasn't created a pdf yet. All of the containers were up including the new mergepdf service. I imported the action config on my site. I added jwt to the term from term name view. I checked the activemq gui and the number of consumers is 0 for the islandora-connector-mergepdf queue. I thought it should be at least 1.

@joecorall
Copy link
Contributor Author

@aOelschlager I checked the activemq gui and the number of consumers is 0 for the islandora-connector-mergepdf queue. I thought it should be at least 1.

Are you overriding the ALPACA_DERIVATIVE_SYSTEMS environment variable or the alpaca properties file in your alpaca service definition in docker-compose.yaml?

@aOelschlager
Copy link
Contributor

It ended up being that the environment variable ALPACA_DERIVATIVE_MERGEPDF_ENABLE was set to false by default. I switch it to true and I have a consumer now for mergepdf queue.

I'm still debugging this since I'm getting errors in the logs but now it is new errors.

Copy link
Contributor

@aOelschlager aOelschlager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works! Thanks Joe and Seth!

@aOelschlager aOelschlager enabled auto-merge (squash) December 9, 2025 19:03
@aOelschlager aOelschlager disabled auto-merge December 9, 2025 19:06
@aOelschlager aOelschlager enabled auto-merge (squash) December 9, 2025 19:26
@aOelschlager aOelschlager merged commit a8a0d3a into main Dec 9, 2025
136 checks passed
@aOelschlager aOelschlager deleted the alpaca-94 branch December 9, 2025 19:47
joecorall added a commit to Islandora-Devops/isle-site-template that referenced this pull request Jan 13, 2026
aOelschlager pushed a commit to Islandora-Devops/isle-site-template that referenced this pull request Jan 14, 2026
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.

3 participants