You can add a border to a PDF document by adding a HTML element that has a fixed position and a border. However it should have no content! This will then be used on every page in your PDF. An example of which is shown below.
<html> <head> <style type="text/css"> #pageborder { position:fixed; left: 0; right: 0; top: 0; bottom: 0; border: 2px solid black; } </style> </head> <body> <div id="pageborder"> </div> ABC<br/> ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/> ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/>ABC<br/> DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/> DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/>DEF<br/> GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/>GHI<br/> </body> </html>