I have a license file that I need to access at runtime in order to create pdf-files. After I have created the in memory pdf, I need to call a method on that pdf to set the license, like this:
pdf.SetLicense("pathToLicenseFileHere");
The license file is located in the same project as the.cs-file that creates the pdf, but is in a separate folder. I cannot get this simple thing to behave correctly, which makes me a bit sad, since it really shouldn't be that hard. :(
I try to set the path like this:
string path = @"\Resources\File.lic";
But it just isn't working out for me.
Edit:
A bit more info. I should mention that this is a web service which returns pdf:s as byte[]. The web service creates the pdf:s, and during this creation process I need to set the license file so as to remove any watermarks from the pdf document. The pdf itself is not saved to disc, and only needs to access the license file once when it is created.