fix(libreoffice): set EmbedStandardFonts to true when applying PDF/A or PDF/UA compliance

This commit is contained in:
Julien Neuhart
2026-03-18 13:45:01 +01:00
parent 19db80bc2e
commit 1e26fdd35b

View File

@@ -329,11 +329,11 @@ func (p *libreOfficeProcess) pdf(ctx context.Context, logger *zap.Logger, inputP
switch options.PdfFormats.PdfA {
case "":
case gotenberg.PdfA1b:
args = append(args, "--export", "SelectPdfVersion=1")
args = append(args, "--export", "SelectPdfVersion=1", "--export", "EmbedStandardFonts=true")
case gotenberg.PdfA2b:
args = append(args, "--export", "SelectPdfVersion=2")
args = append(args, "--export", "SelectPdfVersion=2", "--export", "EmbedStandardFonts=true")
case gotenberg.PdfA3b:
args = append(args, "--export", "SelectPdfVersion=3")
args = append(args, "--export", "SelectPdfVersion=3", "--export", "EmbedStandardFonts=true")
default:
return ErrInvalidPdfFormats
}
@@ -344,6 +344,7 @@ func (p *libreOfficeProcess) pdf(ctx context.Context, logger *zap.Logger, inputP
"--export", "PDFUACompliance=true",
"--export", "UseTaggedPDF=true",
"--export", "EnableTextAccessForAccessibilityTools=true",
"--export", "EmbedStandardFonts=true",
)
} else {
args = append(