Need help or advice?

Call us on
+44 (0) 2077 545 948

PDF Notes

Notes To PDF

Quickly and easily convert Notes to PDF. With only 3 lines of code any Notes / Domino content can be saved as PDF.

Download Now
LotusScript FileExists Function

The DominoPDF DoPDF() method returns 0 (zero) for a successful operation and -1 for an unsuccesful operation.

So you can take the return value and test against this, for example;

iRet = DoPDF(sURL, sPDF, sOptions)
if iRet = -1 then Error = True

You can also use the LotusScript Dir$ function to check that the PDF has actually been created on disk and if not take appropriate action.

To make it even easier below is a FileExists() LotusScript method which you can use.

Function FileExists(sFileName As String) As Integer
'Declare variables..
Dim iPos As Integer, iPrevPos As Integer
Dim sFile As String

'Validate passed filename...
iPos = 0
Do
iPrevPos = iPos
iPos = Instr(iPos + 1, sFileName, "\")
Loop Until iPos = 0
iPos = iPrevPos

sFile = Right$(sFileName, Len(sFileName) - iPos)

'Check to see if file exists and return results...
If Dir$(sFileName) = sFile Then
FileExists = True
Else
FileExists = False
End If
End Function

 

In the Spotlight

Lotus Domino migration to Documentum - Challenges and Solutions

article thumbnailErwin Verstraelan of EMD writes about the challenges he faced and the solutions he adopted whilst managing a Lotus Notes data migration to Documentum project for a major pharmaceutical company.
+ Read More

Domino to Exchange Migration: Tips using DominoPDF

article thumbnailDon Koepnick of JC Steele, a mid-sized US manufacturing company talks about his experience in managing a Lotus Domino to Microsoft Exchange migration project using DominoPDF.
+ Read More

PDF reports and printing from Domino - P and H Mining Equipment case study using DominoPDF

article thumbnailP and H Mining Equipment use DominoPDF to generate professional looking PDF reports for easy distribution and printing. RJ Lindsay of P and H Mining writes about the project challenges and...
+ Read More

News Feed

Subscribe to the Primeapple RSS News Feed.