I have been searching the forums for hours and can’t find a solution, so I’m posting this. I realize there has been discussion of creating a PDF from a Notes document using Script; however, I am finding threads where the answerer (Willy Lorenzo) seems to have deleted all his posts, so the suggestions and code are gone. I’m also finding some questions posted and not answered; others suggest third party tools which are NOT an option for me. I found links to a couple of articles that are dead, and of course the Sandbox is gone!
Here’s the deal:
I need to communicate all fields in a document, including 4 rich text fields with in-line pictures, and would prefer to save the whole thing to a PDF and then email it (to a vendor without Notes). My database owner has already been doing this manually.
If I create an email with script and write all the fields to the body of it, my customer is going to drive me nuts with formatting requests.
Please don’t respond telling me to use third party tools. This isn’t an option. If it can be done with LotusScript alone, I need an example of how to do it, please and thank you so much!
Trish
Subject: Notes has zero PDF format support built into it
So unless you code the writing of a PDF file yourself, it’s going to involve some kind of 3rd party tool, even if it’s a free one. Even the code samples use some kind of 3rd party toolkit, that may or not be free.
The easiest option is probably one of the many free PDF print drivers, where you would just print the email using the PDF driver as the output device, which creates a PDF file. There are many free PDF print drivers out there.
If you want it automated, you’d want to write a script that prints out the email selecting the PDF as the output etc.
Subject: Programmatic creation of PDF
Thank you, Carl, for your insightful response. We have IntelliPrint and someone previous to me wrote a UI convert-to-PDF via IntelliPrint that crashes Notes both for the sender and the recipient; it does, however, create a gorgeous PDF. I suppose I could look into using that code as a basis for a back-end PDF creator, but I do hate using buggy code.
Since we have IntelliPrint, I will search for some options and post a solution if I find one.
Subject: Sample
This is a sample we’ve used to create PDFs from Lotus docs. It’s more geared to filling in a OpenOffice template and saving it as a PDF. But perhaps you’ll find something useful within.
http://www.eview.com/eview/VOLR6.nsf/0/9FBBE642714F74F28525723A006FAB5E
And of course there’s OpenNTF which should have something you can use.
http://www.openntf.org/nct/nctsearchdemo.nsf/searchjs!CreateDocument&Query=pdf
Subject: iText
I cannot recommend it highly enough.
You can stream your data to PDF - even present it on screen to allow the users to do whatever they want with it - don’t have to save it somewhere this way…