I added the CustomEventHandler project to my solution as described in the DevGuide 3.1s. In the file CustomTreeNodeHandler.cs I added code to the after-update part.
Here I want to generate a PDF based on the document that is being updated at that moment (of a certain custum document type). One of the fields in the custom document type is of the field type "Upload File". Here a user can select an image (ex. bla.jpg) which will be displayed in the webpage on a fixed position.
The layout of the PDF document must be different than the page, so I created a html string in which i insert the document field data:
TreeNode caseDoc = (TreeNode)treeNodeObj;
StringBuilder htmlPageBuilder = new StringBuilder();
htmlPageBuilder.Append("some html code");
htmlPageBuilder.Append(ValidationHelper.GetString(caseDoc.GetValue("Content"), ""));
htmlPageBuilder.Append("some html code");
htmlPageBuilder.Append("<img src=\"path_to_image\" alt=\"\"");
string htmlString = htmlPageBuilder.ToString();
This string is given to the PDF add-on and converted to a PDF file.
Now I wanted to add the path of the image (bla.jpg) to the html string (path_to_image). I can get the guid of the image with caseDoc.GetValue("Image"), but I can't figure out what to do next.
I hope this clears up my first post. If not, just ask what info you are missing...