@@ -42,8 +42,16 @@ public interface OutputService {
4242
4343 Document generatePrintedOutput (PathOrUrl urlOrFileName , Document data , PrintedOutputOptions printedOutputOptions ) throws OutputServiceException , FileNotFoundException ;
4444
45+ /**
46+ * @deprecated Use {@link #generatePrintedOutput(PrintConfig)} instead.
47+ *
48+ * @return
49+ */
50+ @ Deprecated
4551 GeneratePrintedOutputArgumentBuilder generatePrintedOutput ();
4652
53+ GeneratePrintedOutputArgumentBuilder2 generatePrintedOutput (PrintConfig printConfig );
54+
4755 // TODO: Generate overloaded methods
4856 BatchResult generatePrintedOutputBatch (Map <String , PathOrUrl > templates , Map <String , Document > data , PrintedOutputOptions printedOutputOptions , BatchOptions batchOptions ) throws OutputServiceException ;
4957
@@ -365,6 +373,167 @@ public interface XciArgumentBuilder {
365373 }
366374 }
367375
376+ public static interface GeneratePrintedOutputArgumentBuilder2 extends PrintedOutputOptionsSetter2 , Transformable <GeneratePrintedOutputArgumentBuilder > {
377+
378+ @ Override
379+ GeneratePrintedOutputArgumentBuilder2 setContentRoot (PathOrUrl pathOrUrl );
380+
381+ @ Override
382+ default GeneratePrintedOutputArgumentBuilder2 setContentRoot (Path path ) {
383+ PrintedOutputOptionsSetter2 .super .setContentRoot (path );
384+ return this ;
385+ }
386+
387+ @ Override
388+ default GeneratePrintedOutputArgumentBuilder2 setContentRoot (URL url ) {
389+ PrintedOutputOptionsSetter2 .super .setContentRoot (url );
390+ return this ;
391+ }
392+
393+ @ Override
394+ GeneratePrintedOutputArgumentBuilder2 setCopies (int copies );
395+
396+ @ Override
397+ GeneratePrintedOutputArgumentBuilder2 setDebugDir (Path debugDir );
398+
399+ @ Override
400+ GeneratePrintedOutputArgumentBuilder2 setLocale (Locale locale );
401+
402+ @ Override
403+ GeneratePrintedOutputArgumentBuilder2 setPaginationOverride (PaginationOverride paginationOverride );
404+
405+ @ Override
406+ GeneratePrintedOutputArgumentBuilder2 setXci (Document xci );
407+
408+ @ Override
409+ default GeneratePrintedOutputArgumentBuilder2 setXci (Xci xci ) {
410+ PrintedOutputOptionsSetter2 .super .setXci (xci );
411+ return this ;
412+ }
413+
414+ public XciArgumentBuilder xci ();
415+
416+ /**
417+ * Merges the provided template with the provided data and returns the generated
418+ * output.
419+ *
420+ * @param template The template to merge data into.
421+ * @param data The data to merge with the template.
422+ * @return The generated output document.
423+ * @throws OutputServiceException If an error occurs during processing.
424+ * @throws FileNotFoundException If the template file is not found.
425+ */
426+ public Document executeOn (PathOrUrl template , Document data ) throws OutputServiceException , FileNotFoundException ;
427+
428+ /**
429+ * Merges the provided template with the provided data and returns the generated
430+ * output.
431+ *
432+ * @param template The template to merge data into.
433+ * @param data The data to merge with the template.
434+ * @return The generated output document.
435+ * @throws OutputServiceException If an error occurs during processing.
436+ * @throws FileNotFoundException If the template file is not found.
437+ */
438+ public Document executeOn (Path template , Document data ) throws OutputServiceException , FileNotFoundException ;
439+
440+ /**
441+ * Merges the provided template with the provided data and returns the generated
442+ * output.
443+ *
444+ * @param template The template to merge data into.
445+ * @param data The data to merge with the template.
446+ * @return The generated output document.
447+ * @throws OutputServiceException If an error occurs during processing.
448+ */
449+ public Document executeOn (URL template , Document data ) throws OutputServiceException ;
450+
451+ /**
452+ * Merges the provided template with the provided data and returns the generated
453+ * output.
454+ *
455+ * @param template The template to merge data into.
456+ * @param data The data to merge with the template.
457+ * @return The generated output document.
458+ * @throws FileNotFoundException If the template file is not found.
459+ */
460+ public Document executeOn (Document template , Document data ) throws OutputServiceException ;
461+
462+ default public Document executeOn (PathOrUrl template , byte [] data ) throws OutputServiceException , FileNotFoundException {
463+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
464+ };
465+
466+ default public Document executeOn (Path template , byte [] data ) throws OutputServiceException , FileNotFoundException {
467+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
468+ };
469+
470+ default public Document executeOn (URL template , byte [] data ) throws OutputServiceException {
471+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
472+ };
473+
474+ default public Document executeOn (Document template , byte [] data ) throws OutputServiceException {
475+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
476+ };
477+
478+ default public Document executeOn (byte [] template , byte [] data ) throws OutputServiceException {
479+ DocumentFactory factory = SimpleDocumentFactoryImpl .getFactory ();
480+ return executeOn (factory .create (template ), factory .create (data ));
481+ };
482+
483+ default public Document executeOn (InputStream template , byte [] data ) throws OutputServiceException {
484+ DocumentFactory factory = SimpleDocumentFactoryImpl .getFactory ();
485+ return executeOn (factory .create (template ), factory .create (data ));
486+ };
487+
488+ default public Document executeOn (PathOrUrl template , InputStream data ) throws OutputServiceException , FileNotFoundException {
489+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
490+ };
491+
492+ default public Document executeOn (Path template , InputStream data ) throws OutputServiceException , FileNotFoundException {
493+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
494+ };
495+
496+ default public Document executeOn (URL template , InputStream data ) throws OutputServiceException {
497+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
498+ };
499+
500+ default public Document executeOn (Document template , InputStream data ) throws OutputServiceException {
501+ return executeOn (template , SimpleDocumentFactoryImpl .getFactory ().create (data ));
502+ };
503+
504+ default public Document executeOn (byte [] template , InputStream data ) throws OutputServiceException {
505+ DocumentFactory factory = SimpleDocumentFactoryImpl .getFactory ();
506+ return executeOn (factory .create (template ), factory .create (data ));
507+ };
508+
509+ default public Document executeOn (InputStream template , InputStream data ) throws OutputServiceException {
510+ DocumentFactory factory = SimpleDocumentFactoryImpl .getFactory ();
511+ return executeOn (factory .create (template ), factory .create (data ));
512+ };
513+
514+ default public Document executeOn (PathOrUrl template ) throws OutputServiceException , FileNotFoundException {
515+ return executeOn (template , (Document )null );
516+ };
517+
518+ default public Document executeOn (Path template ) throws OutputServiceException , FileNotFoundException {
519+ return executeOn (template , (Document )null );
520+ };
521+
522+ default public Document executeOn (URL template ) throws OutputServiceException {
523+ return executeOn (template , (Document )null );
524+ };
525+
526+ default public Document executeOn (Document template ) throws OutputServiceException {
527+ return executeOn (template , (Document )null );
528+ };
529+
530+ public interface XciArgumentBuilder {
531+ XciArgumentBuilder embedPclFonts (boolean embedFonts );
532+ XciArgumentBuilder embedPsFonts (boolean embedFonts );
533+ GeneratePrintedOutputArgumentBuilder2 done ();
534+ }
535+ }
536+
368537 public static interface GeneratePdfOutputBatchArgumentBuilder extends PDFOutputOptionsSetter , BatchArgumentBuilder , Transformable <GeneratePdfOutputArgumentBuilder > {
369538
370539 @ Override
0 commit comments