mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-15 20:02:15 +01:00
feat(split): add splitUnify form field
This commit is contained in:
@@ -59,6 +59,9 @@ func (engine *PdfTk) Split(ctx context.Context, logger *zap.Logger, mode gotenbe
|
||||
|
||||
switch mode.Mode {
|
||||
case gotenberg.SplitModePages:
|
||||
if !mode.Unify {
|
||||
return nil, fmt.Errorf("split PDFs using mode '%s' without unify with PDFtk: %w", mode.Mode, gotenberg.ErrPdfSplitModeNotSupported)
|
||||
}
|
||||
args = append(args, inputPath, "cat", mode.Span, "output", outputPath)
|
||||
default:
|
||||
return nil, fmt.Errorf("split PDFs using mode '%s' with PDFtk: %w", mode.Mode, gotenberg.ErrPdfSplitModeNotSupported)
|
||||
|
||||
Reference in New Issue
Block a user