views:

21

answers:

2

I am not a Sharepoint programmer, I'll admit up front. But I'm a user, and I know if I find a solution online it'll be a lot faster than waiting for my I/S team to find it....

I am building a wiki with a main page and one level deep of subsidiary pages. (I don't want to debate if it should be a wiki or not... I'm looking for shared access like in a wiki.) I would love to be able to trigger the printing (to a PDF or a printer, or archiving the content periodically) of the main page and then the subsidiary pages all at once. I would love for the resulting PDF file to include NAMED DESTINATIONS so that the linking structure is intact, and one could take the PDF file and open it in Acrobat and still jump from main page to subsidiary pages...

Any takers? I think the two hardest parts are (a) how to traverse the pages in a meaningful order [to they need metadata to define their ordinal positions?], and (b) how to insert the named destinations so that the PDF creation tool makes the proper PDF file.

Thanks.

A: 

It sounds like only one page is different from the rest, i.e. the main page, so traversing the list of site pages should be straightforward. Just retrieve the main page first, then ignore it when traversing the list. Since the page title is a list column, it is easy to get at for linking in the PDF file.

All the complexity of PDF output can be handled with a library like iTextSharp which is the .NET version of iText. If you use the Sharepoint 2010 Client Object Model then any .NET language could be used to write this simple tool. I've used IronPython to extract list items and add list items using the .NET Client Object Model and I think that will be the hardest part of the coding, getting used to how the Client Object Model works.

The iText website is a bit confusing because it focuses on the API and the original Java version. The .NET port can be downloaded here.

Michael Dillon