Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watermark using pdfmake

In Javascript, I am using pdfmake to generate a pdf document. I read it from github that it supports watermark and the following is my usage but it is giving me some random and weird characters. Those characters are the same no matter what texts are provided in watermark. Anyone got an idea?

pdfmake

enter image description here

enter image description here

like image 306
david park Avatar asked Dec 24 '22 16:12

david park


1 Answers

Solution

Example:

var docDefinition = {
        //watermark: 'test watermark',
        watermark: {text: 'test watermark', color: 'blue', opacity: 0.3, bold: true, italics: false},
        content: [
            'Test page of watermark.\n\n',
        ]
    };
like image 63
Manvender Singh Rathore Avatar answered Jan 04 '23 19:01

Manvender Singh Rathore