resource embedding in asp.net
- by Mike
I have a project which needs to generate PDF documents. I am using iTextSharp.
I have a pdf which needs to be read and then appended to.
To read the pdf document, I'm using PdfReader(), which accepts many forms, but I can't figure out how to reference a pdf in my webapplication to PdfReader.
My host does not allow Binary Serialization (apparently that's bad), so I don't think I can load from an embedded resource. I've tried just using PdfReader("report.pdf"), but it keeps throwing an exception telling me that the file isn't found. I've tried putting the file in the bin directory, root directory, in the same directory as the class, but this still doesn't work.
It works if I use a fully qualified path to the pdf document, but I can't use that when I upload it to my hosting provider.
Does anyone have any suggestions on how I should do this?
Thanks