mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-16 12:22:17 +01:00
fix(chromium): disable PDF tagging
This commit is contained in:
@@ -90,6 +90,8 @@ func (b *chromiumBrowser) Start(logger *zap.Logger) error {
|
|||||||
// https://github.com/puppeteer/puppeteer/issues/2410
|
// https://github.com/puppeteer/puppeteer/issues/2410
|
||||||
chromedp.Flag("font-render-hinting", "none"),
|
chromedp.Flag("font-render-hinting", "none"),
|
||||||
chromedp.UserDataDir(b.userProfileDirPath),
|
chromedp.UserDataDir(b.userProfileDirPath),
|
||||||
|
// See https://github.com/gotenberg/gotenberg/issues/831.
|
||||||
|
chromedp.Flag("disable-pdf-tagging", true),
|
||||||
)
|
)
|
||||||
|
|
||||||
if b.arguments.incognito {
|
if b.arguments.incognito {
|
||||||
@@ -164,7 +166,7 @@ func (b *chromiumBrowser) Stop(logger *zap.Logger) error {
|
|||||||
go func() {
|
go func() {
|
||||||
// FIXME: Chromium seems to recreate the user profile directory
|
// FIXME: Chromium seems to recreate the user profile directory
|
||||||
// right after its deletion if we do not wait a certain amount
|
// 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)
|
<-time.After(10 * time.Second)
|
||||||
|
|
||||||
err := os.RemoveAll(userProfileDirPath)
|
err := os.RemoveAll(userProfileDirPath)
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ 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).
|
||||||
|
// Does not seem to work.
|
||||||
|
// See https://github.com/gotenberg/gotenberg/issues/831.
|
||||||
WithGenerateTaggedPDF(false)
|
WithGenerateTaggedPDF(false)
|
||||||
|
|
||||||
hasCustomHeaderFooter := options.HeaderTemplate != DefaultPdfOptions().HeaderTemplate ||
|
hasCustomHeaderFooter := options.HeaderTemplate != DefaultPdfOptions().HeaderTemplate ||
|
||||||
|
|||||||
Reference in New Issue
Block a user