Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Notes Documents conversion to PDF


Message #1 by "Luke Powell" <Luke.Powell@G...> on Fri, 18 Jan 2002 21:44:07
Hi Luke,

regarding to what you have said so far, it seems to me, that you don't just need the data from 
the Notes document, but you also want to preserve the formatting of the document. The 
following is based on this assumption.

We have tried a lot of ways to export notes documents as an exact copy, but we always 
failed. Most of the time we had problems with bugs in Notes, with version incompatabilities, 
elements being left out or other kinds of restrictions.

So if you need an almost exact representation of a notes document, you will have to have 
some kind of printer driver that is capable of printing to a file in your desired file format and 
you will then have to print the desired notes document to this printer.

We have tested quiet a few printer drivers and finaly came up with Print-2-Image from 
IMECOM. You can find a lot of information, documentation and a trial version on their web site 
at www.faxresource.com. We chose Print-2-Image, because of its flexibility. Once you have 
installed the printer driver, you can control it by setting registry entries. They also have an 
OCX which encapsulates the registry parameters in a COM-Interface. Print-2-Image supports 
the following fimage formats TIFF, PCX/DCX and PNG (which should be suitable for your 
needs).

Now you have two ways to implement your problem:

1. Write a VB program, that uses the Lotus Notes Automation Classes (notes32.tlb). You first 
have to open the database and a view in the database, then you have to find the new 
documents and finaly you have to print them.

2. Write a Lotus Notes agent for the database in question, which is run for every new 
document. Print the document.

The advantage of solution 2 is, you'll get a reference to the new document, so you don't need 
to write as much code as in solution one. As an alternative, you could also write an agent, 
which is run periodically, but then you would have to do all the document searching like in 
solution 1.

There are a few things to be aware of, with this scenario. Either solution requires, that you 
have to have a Lotus Notes client installed the machine where your solution will be running 
and that a user is logged on to the machine and to Lotus Notes. This restriction is due to the 
fact, that printing with Lotus Notes is only available within the Lotus Notes client UI. The other 
restriction ist, that the Print-2-Image printer is your default printer on that machine, otherwise 
you would have to change the current default printer progammatically (well, might be OK if you 
don't mind the extra programming).

Hope this helps
Boris

> hi Boris,
> 
> Thanks for the response. I have 2 seperate systems. The first creates and
> updates documents in Notes. The second needs to view those documents (no
> Notes in the second) via a web interface. The second system allows for
> versioning (the first doesn't) so if I can export from the first each 
time
> an update is made, I can effectively track changes to the documents. 
> 
> If I can get the Notes docs into a usable format (something other than
> Notes), transporting them is not really an issue. MQSeries can take care 
of
> that for me.
> 
> What tool did you use for TIFF conversion? I'd prefer to stay with PDF 
but
> I'm willing to consider other options also.
> 
> Luke
> 
> -----Original Message-----
> From: boris.gruening@g... [mailto:boris.gruening@g...]
> Sent: Monday, January 21, 2002 3:06 AM
> To: professional vb
> Subject: [pro_vb] Re: Notes Documents conversion to PDF
> 
> 
> Hi Luke,
> 
> we have done something like this, but we exported it to TIFF format. We 
used
> a third party 
> tool for the conversion, but besides that it still was a very nasty job
> regarding the required 
> programming in Lotus Notes. Could you shed some more light on the task
> you're trying to 
> accomplish, may be there's a more elegant solution.
> 
> Boris
> 
> 
> > I'm trying to access Lotus Notes 4.6 to create a Notes document and 
then 
> > convert that Notes Document to PDF, so it can be viewed outside of the 
> > Notes environment. I'm new to Notes.
> > 
> > I've gotten as far as creating a new Notes Session in VB, opening a 
> > database (.nsf file) and creating a new document using a Notes form 
> > (format template for a document). What's got me stumped so far is 
> > converting it to a pdf. I see that the Notes document has a method to 
> save 
> > as rich text, but that does not preserve all the formatting in some 
> forms. 
> > I realize I'll probably need a 3rd party tool such as Adobe's 
Distiller(a 
> > ps file would work too), but I still need to get the document out of 
> Notes.
> > 
> > Has anyone encountered an issue like this before? Hopefully somebody 
can 
> > shed a little light or set me off in the right direction
> > 
> > thanks
> > 
> > Luke Powell
> 

  Return to Index