feat(libreoffice): add image options (#898)

* feat: libre office image options

* refactor: PR comment changes

* fix: change lossLessImageCompression default to false

---------

Co-authored-by: Gareth Judson <gareth.judson@delwp.vic.gov.au>
This commit is contained in:
garethjudson
2024-06-13 18:28:36 +10:00
committed by GitHub
parent b1d94a3845
commit 669a35afef
4 changed files with 94 additions and 14 deletions

View File

@@ -281,6 +281,14 @@ func (p *libreOfficeProcess) pdf(ctx context.Context, logger *zap.Logger, inputP
args = append(args, "--export", "SinglePageSheets=true")
}
if options.LosslessImageCompression {
args = append(args, "--export", "UseLosslessCompression=true")
}
if !options.ReduceImageResolution {
args = append(args, "--export", "ReduceImageResolution=false")
}
switch options.PdfFormats.PdfA {
case "":
case gotenberg.PdfA1b: