Index ¦ Archives ¦ Atom

Business Objects PDF Retrieval

Using Business Objects web services gets more understandable the more one uses it. I recently began developing again with the fairly confusing GetDocumentInformation API call. The call to get a PDF required a slightly different ViewSupport object than the one that should work. It seems that the ViewSupport is the object required to tell BO in which format you want your report. So, initally I had a line for the format that specified I want the PDF in the PDF format - seems reasonable right?

ViewSupport viewSupport = new ViewSupport();
viewSupport.OutputFormat = OutputFormatType.PDF;
viewSupport.ViewType = ViewType.BINARY;
viewSupport.ViewMode = ViewModeType.DOCUMENT;

This didn't work for me. I had to change the OutputFormat to be:

viewSupport.OutputFormat = OutputFormatType.BINARY_CONTENT;

Hope this helps someone.

© Steve Spigarelli. Built using Pelican. Theme by Giulio Fidente on github.