Bernadette Famy
Bernadette Famy

Reputation: 15

Lotusscript - NotesUIDocument.Print

I want to print my notes document to pdf so I used

uidoc.Print(1,0,0,False,"Microsoft Print to PDF")

But I don't want this dialog to appear.

Save Print Output As

I want it to programmatically save as for example "C:\test\PrintToPDF.pdf" without asking the user to type in the file name and select the folder or path

Upvotes: 0

Views: 2110

Answers (2)

Reed G
Reed G

Reputation: 26

Found this answer on IBM's support site that should solve your issue: https://www-01.ibm.com/support/docview.wss?uid=swg1LO87560

You should do the following:
Add the notes.ini parameter: BrowserRenderPrintNotes=1

Copy and pasting the content from above URL as IBM is starting to sunset all Notes and Domino support links now that the platform has been sold to HCL.

LO87560: USING LOTUSSCRIPT PRINT METHOD OF THE CLASS NOTESUIDOCUMENT WITH PARAMETERS, THE FILE PRINT DIALOG BOX IS DISPLAYED.

Ask the IBM Support Agent Tool APAR status

Closed as fixed if next.

Error description

In the Domino designer help, for the Print method of the
LotusScript class NotesUIDocument, it is specified :
"Prints the current document:
If one or more parameters are specified, automatically prints
the document.
If no parameters are specified, or if the first parameter is
omitted, displays the File Print dialog box.
When the agent is executed with "Call uidoc.Print(1)" or
"Call.uidoc.Print(1, 0, 0, False)", the print dialog box is
displayed.
According to the documentation, it shouldn't.
The issue only occurs for SMTP mail ( eg. from iNotes),
standard note mail doesn't have the problem.
Environment
Notes 853 and 901
Windows 64 bit

Local fix

Add the notes.ini parameter
BrowserRenderPrintNotes=1

This solves the issue with the print box dialog. however mail
does not print images correctly - images are printed as
attachment.

Upvotes: 0

Richard Schwartz
Richard Schwartz

Reputation: 14628

There's no option for that, as far as I know. The prompt for the target filename is part of the driver, not part of Notes, and the NotesUIDocument.Print() method has no way of communicating the target filename to the driver. There wouldn't be, as standard print drivers don't ask for filenames.

Upvotes: 1

Related Questions