Skip to content

panic occurs when call for 'WatermarkContext' #771

@zvzo

Description

@zvzo

version: 0.6.0
os macos 14.2.1

Panic occurs when calling the interface for adding watermarks.

is at the location shown in the screenshot.

Maybe we need to check whether the array is empty? It may also be that my file is not standard. Is the file just a blank pdf file? If necessary, I can send it to you for review.

// WatermarkContext applies wm for selected pages to ctx.
func WatermarkContext(ctx *model.Context, selectedPages types.IntSet, wm *model.Watermark) error {
return pdfcpu.AddWatermarks(ctx, selectedPages, wm)
}

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions