Closed toshi1127 closed 2 days ago
When an image with a transparent background is added to a PDF, such as favicon.png below, the background turns black. (In the case of RGBA)
func StampImage(inFile string, outFile string, selectedPages []string, fileName string) error { config := model.NewDefaultConfiguration() desc := "pos: tl, off: 0 0, scale: 1 a, rot:0, mode:1" onTop := true wm, err := pdfcpu.ParseImageWatermarkDetails(fileName, desc, onTop, types.POINTS) if err != nil { return err } return api.AddWatermarksFile(inFile, outFile, selectedPages, wm, config) }
macOS Ventura 13.0 pdfcpu https://github.com/pdfcpu/pdfcpu/commit/576f15e6cd191b62168d7b26879ab3b1133b29bc
description
When an image with a transparent background is added to a PDF, such as favicon.png below, the background turns black. (In the case of RGBA)
example code
environment
macOS Ventura 13.0 pdfcpu https://github.com/pdfcpu/pdfcpu/commit/576f15e6cd191b62168d7b26879ab3b1133b29bc