Hi experts,
I am creating pdf document using itextshapr.dll & i want add border to a
document
How can i achieve the same
Thanks in advance
Adding border to a page
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 6, 2011, 1:12 AM EDT
Try like this,
public void onEndPage(PdfWriter writer, Document doc) { PdfContentByte content = writer.getDirectContent(); Rectangle pageRect = doc.PageSize ; // or doc.getPageSize(); pageRect.setLeft( pageRect.getLeft() + 10 ); pageRect.setRight( pageRect.getRight() - 10 ); pageRect.setTop( pageRect.getTop() - 10 ); pageRect.setBottom( pageRect.getBottom() + 10 ); content.setColorStroke( Color.red ); content.rectangle(pageRect.getLeft(), pageRect.getBottom(), pageRect.getWidth(), pageRect.getHeight()); content.stroke(); }Amol183 reputationPosted Jul 6, 2011, 2:12 AM EDT
Ananth prasath24 reputationPosted Jul 6, 2011, 2:27 AM EDT
Hi,
If you want to set border width to all GridView, not only pager, you need to set the BorderWidth to GridView:
Thanks,
With Best Regards
Natarajan R (UI Designer)
KAPSYSTEM (www.kapsystem.com)