fix(chromium): remove tagged PDF by default

This commit is contained in:
Julien Neuhart
2024-03-04 10:28:54 +01:00
parent d18e6920fc
commit 804fcff5b6
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ func printToPdfActionFunc(logger *zap.Logger, outputPath string, options PdfOpti
WithMarginRight(options.MarginRight). WithMarginRight(options.MarginRight).
WithPageRanges(pageRanges). WithPageRanges(pageRanges).
WithPreferCSSPageSize(options.PreferCssPageSize). WithPreferCSSPageSize(options.PreferCssPageSize).
WithGenerateTaggedPDF(true) WithGenerateTaggedPDF(false)
hasCustomHeaderFooter := options.HeaderTemplate != DefaultPdfOptions().HeaderTemplate || hasCustomHeaderFooter := options.HeaderTemplate != DefaultPdfOptions().HeaderTemplate ||
options.FooterTemplate != DefaultPdfOptions().FooterTemplate options.FooterTemplate != DefaultPdfOptions().FooterTemplate

View File

@@ -256,7 +256,6 @@ func (p *libreOfficeProcess) pdf(ctx context.Context, logger *zap.Logger, inputP
"--no-launch", "--no-launch",
"--format", "--format",
"pdf", "pdf",
"--export", "UseTaggedPDF=true",
} }
args = append(args, "--port", fmt.Sprintf("%d", p.socketPort)) args = append(args, "--port", fmt.Sprintf("%d", p.socketPort))
@@ -289,6 +288,7 @@ func (p *libreOfficeProcess) pdf(ctx context.Context, logger *zap.Logger, inputP
if options.PdfFormats.PdfUa { if options.PdfFormats.PdfUa {
args = append( args = append(
args, args,
"--export", "UseTaggedPDF=true",
"--export", "EnableTextAccessForAccessibilityTools=true", "--export", "EnableTextAccessForAccessibilityTools=true",
) )
} }