Add Background
Background is a lay behind pages. Adding background is supported since Aspose.Pdf.Kit v1.7.0.
Note: Adding background is supported since Aspose.Pdf.Kit for Java v1.4.
To add a background in Java, just follow these steps:
- Create an object of Stamp class,bind an image or a FormattedText object and set isBackground equal to true.
- Create an object of PdfFileStamp class by passing the input and output PDF files as file names or streams.
- Call addStamp method and pass the Stamp object.
- Close the PdfFileStamp object.
Background is a lay behind pages. Adding background is supported since Aspose.Pdf.Kit v1.7.0.
Note: Adding background is supported since Aspose.Pdf.Kit for Java v1.4.
To add a background in Java, just follow these steps:
- Create an object of Stamp class,bind an image or a FormattedText object and set isBackground equal to true.
- Create an object of PdfFileStamp class by passing the input and output PDF files as file names or streams.
- Call addStamp method and pass the Stamp object.
- Close the PdfFileStamp object.
[Java]
fileStamp = new PdfFileStamp(inFile, outFile); Stamp backgroundStamp = new Stamp(); backgroundStamp.bindImage(path + "butterfly.jpg"); backgroundStamp.setImageSize(100,100); backgroundStamp.setOrigin(200,200); backgroundStamp.isBackground(true); fileStamp.addStamp(backgroundStamp); fileStamp.close();

