I need to correlate a PDF and a XML file in BizTalk using the PDF filename and value in the XML. How can I read a PDF-file into an orchestration? I somehow have to handle it as XML …
The reason for the correlation is that I have to have both the PDF and the XML from the sending system before I can write them in a specific order to the receiving system (the PDF file has to be delivered before the XML meta file is sent.).
Is your requirement to process a PDF file as a binary within BizTalk – process it through BizTalk without ever actually reading anything from the file?
If that is the case then you don’t need to parse it to XML at all, you simply read the message into a document of type
System.Xml.XmlDocumenton your receive location, using a passthrough pipeline.This document will have all the standard context properties such as received filename that you can use any way you want, including for your correlation.
Richard Seroter has a blog post here that goes into this in some detail.
If you need to parse the PDF to XML than I’m not sure if such an adapter/pipeline even exists. (There are adapters for serializing to a PDF but not the other way around)