diff --git a/pkg/modules/chromium/browser.go b/pkg/modules/chromium/browser.go index bb23ae6f..df0516cf 100644 --- a/pkg/modules/chromium/browser.go +++ b/pkg/modules/chromium/browser.go @@ -90,6 +90,8 @@ func (b *chromiumBrowser) Start(logger *zap.Logger) error { // https://github.com/puppeteer/puppeteer/issues/2410 chromedp.Flag("font-render-hinting", "none"), chromedp.UserDataDir(b.userProfileDirPath), + // See https://github.com/gotenberg/gotenberg/issues/831. + chromedp.Flag("disable-pdf-tagging", true), ) if b.arguments.incognito { @@ -164,7 +166,7 @@ func (b *chromiumBrowser) Stop(logger *zap.Logger) error { go func() { // FIXME: Chromium seems to recreate the user profile directory // right after its deletion if we do not wait a certain amount - // of time before re-deleting it. + // of time before deleting it. <-time.After(10 * time.Second) err := os.RemoveAll(userProfileDirPath) diff --git a/pkg/modules/chromium/tasks.go b/pkg/modules/chromium/tasks.go index f224fdb2..d1d4b8f4 100644 --- a/pkg/modules/chromium/tasks.go +++ b/pkg/modules/chromium/tasks.go @@ -47,6 +47,8 @@ func printToPdfActionFunc(logger *zap.Logger, outputPath string, options PdfOpti WithMarginRight(options.MarginRight). WithPageRanges(pageRanges). WithPreferCSSPageSize(options.PreferCssPageSize). + // Does not seem to work. + // See https://github.com/gotenberg/gotenberg/issues/831. WithGenerateTaggedPDF(false) hasCustomHeaderFooter := options.HeaderTemplate != DefaultPdfOptions().HeaderTemplate ||