Skip to content

Commit

Permalink
feat: Updated HtmlToPdfConverter
Browse files Browse the repository at this point in the history
Refs: DEV-12343
  • Loading branch information
nirikash committed Jan 1, 2025
1 parent 8e00566 commit 5bcd49e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public class HtmlToPdfConverter {
@Getter
private final WeasyPrintServiceConnector weasyPrintServiceConnector;

@Inject
// TODO: refactor and remove to use injection option only
public HtmlToPdfConverter() {
this.pdfTemplateProcessor = new PdfTemplateProcessor();
PdfExporterFileResourceProvider fileResourceProvider = new PdfExporterFileResourceProvider();
this.htmlProcessor = new HtmlProcessor(fileResourceProvider, new LocalizationSettings(), new HtmlLinksHelper(fileResourceProvider), null);
this.weasyPrintServiceConnector = new WeasyPrintServiceConnector();
}

@VisibleForTesting
@Inject
public HtmlToPdfConverter(PdfTemplateProcessor pdfTemplateProcessor, HtmlProcessor htmlProcessor, WeasyPrintServiceConnector weasyPrintServiceConnector) {
this.pdfTemplateProcessor = pdfTemplateProcessor;
this.htmlProcessor = htmlProcessor;
Expand Down

0 comments on commit 5bcd49e

Please sign in to comment.