How to attach a pdf from a server-side script
Hi,
I need to be able to attach a PDF from within my server-side script. I have the following already written
Mstm.SaveAttachment( new ProcessContext().FolderId, _fileName, Convert.
but not sure what is required after the Convert. Should it be ToBase64String or ToBase64CharArray as I believe 64bit encoding is required? But also what follows that.
Help please. Thanks in advance.
Comments
-
Hi Rob
You need to use Convert.ToBase64String() and pass it a byte array containing the contents of the PDF.
Thanks
Iain
0 -
Hi Rob
Where is the PDF stored?
If its on the file system you can actually use the NewAttachment method, like this:
Mstm.NewAttachment(ProcessContext.FolderId, "9.0 Release Notes.pdf", @c:\temp\);
If its coming from a 3rd party system (e.g. a DMS) then it depends how you are retrieving the PDF
Hope that helps
Iain
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 155 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories