Generate PDF file on web

Hi… I have the following agent which provide the summary of a view in an excel file on web

vnm=doc.vnm(0)

Set db = session.CurrentDatabase

Set view = db.GetView(vnm)

Set nav = view.CreateViewNav

Dim vc As NotesViewColumn

Dim k

Print {Content-Type:application/vnd.ms-excel}

Print {<HTML><HEAD>}

Print {</HEAD>}

Print {<BODY>}

Print {<TABLE>}





Dim dc As  NotesViewEntryCollection

Set 	dc=view.allentries

Dim i

Print {<TR>}

For k=1 To view.ColumnCount

	Set vc=view.Columns(k-1)

	Print {<TD WIDTH=100><B>}+vc.Title+{</B></TD>}

Next

Print {</TR>}



For i=1 To dc.count

' Go through all the entries in the view

	Set entry = nav.Getnth(i)

	

	Print {<TR>}

	For k=1 To view.ColumnCount

		Print {<TD>} & Cstr(entry.ColumnValues(k-1)) & {</TD>}

	Next

	Print {</TR>}

Next

Print "</TABLE></BODY></HTML>"

I want the same file to be generated as PDF

tried

Print {Content-Type:application/pdf}

Print {<name>Portable Document Format</name>}

Print {<fileExtensions><fileExtension>.pdf</fileExtension></fileExtensions>}

but does not seem to work…

any suggestions please??

Subject: If life was only so simple

There is more that differentiates a PDF and Excel file that it’s file extension.

You are still creating an Excel HTML document, but with a PDF extension. To create a PDF is more complicated, as it is not a format like HTML.

I suggest searching the Notes 6/7 forum for generate and PDF, you will find lots of example and third party and open source tools that can help you. But it’s going to be more complicated than what you have.