-
-
Notifications
You must be signed in to change notification settings - Fork 579
Closed
Labels
Description
issue
api.MergeCreateFile() error: validatePageContents: page content must be stream dict or array
description
I'm using api.MergeCreateFile() to merge pdf files, I found it will report an error when a pdf file contains blank pages, and after I delete the blank pages, it works fine.
However when I use QuickLook open a pdf file and append a blank page, MergeCreateFile() works fine. So I feel confused why this is happening.
code
package main
import (
"fmt"
"github.com/pdfcpu/pdfcpu/pkg/api"
)
func main() {
err := api.MergeCreateFile([]string{"with_blank_page.pdf", "without_blank_page.pdf"}, "merge.pdf", false, nil)
fmt.Println(err)
}
- OS: macOs 14.1.2
- GO: go1.20.3
PDF files: