Creating PDF preview on the fly using asp.net

Posted by beakersoft | Posted in Programming | Posted on 18-12-2006

3

I was looking for a way of creating a preview of a pdf document on a web based app, and I came across PDFThumbnail.NET. (Details here).

Its a free asp.net control, that will take a pdf stream and output a jpeg preview onto a page. Its free, easy to use and fast. Also they answered a couple of questions I had on the product very quickly.
There doesn’t seam to be many components kicking around for free like this, so i’d highly recommend it.

File locking probelm sending email from .Net

Posted by beakersoft | Posted in Programming | Posted on 06-12-2006

1

I’ve been having fun today trying to update some of our internal advert proofing software. I have some code that attaches an pdf file to an email that I was trying to update.

I was trying to move the pdf file to an archive when it had been sent, but was constantly getting errors along the lines of ‘File is locked’, ‘File is in use’ etc that I had never had before.

After lots of head scratching, and looking around the system.net.mail class, I found a dispose method for the mailmessage and the mailmessage.attachments. As soon as I called this method after sending the mail, everything worked fine!

While looking round the class’s i’ve also found some stuff on Delivery Notification options, sound like it might be worth looking into. Ill post on her when i’ve sussed that out. If anyone knows of any good articles about doing this let me know.

Converting RTF files to PDF using OpenOffice

Posted by beakersoft | Posted in Programming | Posted on 03-12-2006

0

Something really cool I found a while ago, and have started to use again recently is the ability to programmatically control OpenOffice (http://www.openoffice.org)

I have used this in a VB.NET application I wrote that will look into a drop folder for a .RTF file, and convert it to a .PDF file. It took me a long while to work out how to (for free) convert a variety of office type documents to a pdf, this was by far the best.

If you would like the main source code for the function I wrote I can post it up here if anyone wants, alternatively check out this article on the code project website http://www.codeproject.com/vb/net/oo2html.asp This was the article the originally helped me out, there is also quite good developer documentation on the OpenOffice web site.