Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XWIKI-21763: Disable the server-side image resizing while exporting to PDF #2834

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mflorea
Copy link
Member

@mflorea mflorea commented Jan 31, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-21763

Changes

Description

  • Modify the default and all configuration sources to check the execution context source first.
  • Split PDFExportJob in "two" to reduce ClassFanOut complexity
  • Update test content to resize image on the server-side (in view mode)
  • Enable the image processing plugin while running the tests to have the server-side image resize enabled in view mode.

…o PDF

* Modify the default and all configuration sources to check the execution context source first.
* Split PDFExportJob in "two" to reduce ClassFanOut complexity
* Update test content to resize image on the server-side (in view mode)
* Enable the image processing plugin while running the tests to have the server-side image resize enabled in view mode.
/**
* Base class for PDF export job.
*
* @version $Id$
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing @since?

@Override
public JobGroupPath getGroupPath()
{
return new JobGroupPath(Arrays.asList("export", "pdf"));
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want a shorter version (and based on Java standard APIs).

Suggested change
return new JobGroupPath(Arrays.asList("export", "pdf"));
return new JobGroupPath(List.of("export", "pdf"));

*
* @version $Id$
*/
public abstract class AbstractPDFExportJob extends AbstractJob<PDFExportJobRequest, PDFExportJobStatus>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think moving the rendering part of the Job to an internal component that you can then inject is a better way to fix the ClassFanOutcheck than moving to an abstract class.

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.

2 participants