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