There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-6e5d13af-0236-47a8-9a93-91038084fb2d XWIKI-24658 Open

Allow overwriting PDFExportJobRequestFactory component at wiki level

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-2c1dcb67-425d-4e95-a601-869099edd6bf Marius Dumitru Florea on 10/Aug/26 15:53
 

When we designed the new PDF export there was no requirement to be able to easily customize the PDF export UI to add new PDF export job request properties. i.e. to pass additional information from the user to the PDF export template. PDFExportJobRequestFactory wasn't designed to be overwritten, so PDFExportScriptService currently behaves as expected. From this PoV, this issue is a Won't Fix.

To achieve what you want, you have these options:

  • custom PDF export UI and custom code to trigger the PDF export job (leads to some code duplication), see https://extensions.xwiki.org/xwiki/bin/view/Extension/PDF%20Export%20Application/#HScriptService
  • custom UI + overwrite PDFExportJobRequestFactory but install on farm and force a restart, as you suggested
  • custom UI + overwrite PDFExportScriptService, have you tried this? You need to set more properties in createRequest, based on the current HTTP request.
  • modify the PDF export to have some UI extension points, in the UI (PDF export form) and in the script triggering the job

I'm not fully convinced by the UI extensions because this is the first time I see this need to pass additional information from the end user to the PDF template.