问题
I am new to iText
pdf library. Can any one guide me how to add background color to entire page (not for chunk or paragraph) using iText pdf
in java.
回答1:
This code will do the job:
Rectangle pageSize = new Rectangle(216, 720);
pageSize.setBackgroundColor(new BaseColor(0xFF, 0xFF, 0xDE));
Document document = new Document(pageSize);
来源:https://stackoverflow.com/questions/30206160/how-can-i-add-page-background-color-of-pdf-using-itext-in-java