Expand my Community achievements bar.

getDocContentType and PDFGenerator


Level 2


Can somebody share some insight how we do determine the contentType of a document variable. Where does this info come from?

Additionally with ES2 Lc PDF Gen can now determine the document type. Is the service using the same method?
And if I use Assembler to pass in a list of office documents as a source how does it work here? To my impression it seems to take the file extension only cause I could fool it by renaming a spreadsheet to excel.doc and it got confused.



2 Replies


Level 10


You can use an xPath expression like the following : getDocContentType(/process_data/@myDoc)and put the result into a string.



Level 2


I know this. This was not my question: I need to understand how PDFGen / Assembler do determine the content type. I do not know what it really does in the background i.e. going for the extension or the mimetype or both or is ther more behind the scenes?

Can somebody answer this question or do we have to go back to engineering on this?