Fix comments

This commit is contained in:
Peter Chakalov
2025-01-22 18:37:27 +02:00
parent 3828900455
commit df098484ae
2 changed files with 4 additions and 3 deletions

View File

@@ -96,8 +96,9 @@ type PdfEngine interface {
// Split splits a given PDF file.
Split(ctx context.Context, logger *zap.Logger, mode SplitMode, inputPath, outputDirPath string) ([]string, error)
// Flatten PDF refers to merging the annotations (such as markup, widgets, 3D models, etc.) into a static area that is part of the PDF document
// By flattening and merging existing annotation appearances with page content, the original annotations are deleted from the PDF pages.
// Flatten merges existing annotation appearances with page content, effectively deleting the original annotations.
// This process can flatten forms as well, as forms share a relationship with annotations.
// Note that this operation is irreversible.
Flatten(ctx context.Context, logger *zap.Logger, inputPath, outputPath string) error
// Convert transforms a given PDF to the specified formats defined in

View File

@@ -101,7 +101,7 @@ func (engine *QPdf) Merge(ctx context.Context, logger *zap.Logger, inputPaths []
return fmt.Errorf("merge PDFs with QPDF: %w", err)
}
// Flatten is not available in this implementation.
// Flatten merges annotation appearances with page content, deleting the original annotations.
func (engine *QPdf) Flatten(ctx context.Context, logger *zap.Logger, inputPath, outputPath string) error {
var args []string
args = append(args, "--generate-appearances")