resource embedding in asp.net

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-06-15T23:58:59Z Indexed on 2010/06/16 0:02 UTC
Read the original article Hit count: 174

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET