0
votes

I would like to set page margins (esp. bottom margin) in IBM Notes/Lotus Notes programatically.

When printing documents with a special form, the bottom margin must be lowered to have the complete form on one page.

You can set the page setup setting, e.g. print margins, for a complete Notes application using the File\Page Setup... in the menu manually. As far as I could discover, this settings are stored in the local client's bookmark.nsf.

These settings don't replicate.

They get lost, when you delete the workspace icon and re-add it to your workspace later.

I haven't found any LotusScript, formula language nor Java command to set page margins for a document, form or application/database.

Even in the C api there seem to be no function to change print/page margins or change page setup settings.

I would like to have a procedure to change the print margins - or at least a way to set or change these settings in a document, form or application by manipulating items in a document or design element.

1
The print support in Notes is pretty bad, as far as I know there is no way to modify margins programatically. - Karl-Henry Martinsson
I think you have no control over that. To print your documents exactly as you want to, I would use export to PDF (and I know it makes things more complicated...) - Frantisek Kossuth

1 Answers

0
votes

As stated there is no programmatic control for page margins, unless you obtain an expensive third-party rich-text driver and manipulate copies of rich-text.

A possible work-around solution is to use one or more dedicated 'print only' forms. Design the form to have the page layout you require for printing. It may have reduced fonts, or some items omitted or the text reduced for print purposes and have specific margins for a given page-size to be paper friendly. Then, when printing you can specify a print-form 'override' so that this form will be used for a printed page (or print to PDF).

There are two ways to specify the override. Either directly in the 'File\Print' @command (I think) or as a 'form-formula' in a print-only view. Just specify the form name in the file\print options. If using a fiorm formula, you need an extra view and a the form name used in the form-formula property.

You can also design a number of different forms for different purposes and just select the form you need at the time. You can even setup a dialogbox 'form' picker when using the @command file/print. The design needs to be general enough so that the results are appropriate for various printers/print drivers you might be using or you design a number of forms to suit different printers.