Uniface to handle ByteArray Response

Author: jayesh.patel@us.qbe.com (jayesh.patel@us.qbe.com)

We have a Web based application developed in Uniface 9.6 version. Traditionally this application is developed and only compatible with IE browser. There is a business requirement to collect the Byte array response from Web service and convert into the PDF file within our Uniface application and open it in front screen/Browser. As a first step, we managed to consume Web service with wsdl file(signature) and successfully getting the Byte Array response for associated pdf document. Next part is to convert it to Pdf in Uniface application and open the pdf on screen. Can you please advise if there is established way to achieve this ? Since we are not familiar to achieve from Uniface, we tried using the AJAX call and grab the byte array to web and writing JS code to convert it to pdf. But the Response is very big, while web trying to read the byte array few of the character is not understanding from conversation front. Apart from that when code is written to open window. Open command in JS, it opens the blank page in IE11 browser. Can you please help if we have any approach/command in Uniface where we can convert byte array to PDF? Appreciate your suggestions and thanks in Advance. Jayesh

3 Comments

  1. ulrich-merkel said Hi Jayesh, sometimes, it may be easier that instead to code in uniface a complete compilation of a PDF output file to prepare a report component in uniface, and use a PDF printer (I have FreePDF) to get the desired PDF output. Most of these tools have an option that the show the PDF at the end of the printing process.   HIH, Uli  

    Thank you Uli for your response, However business requirement is not to print any document, instead its just to open the document (out of the ByteArray response) into PDF format in new Browser window. User can then download the pdf file if needed else close the window. Do we have anything to handle this ? Thanks, Jayesh


    Author: jayesh.patel@us.qbe.com (jayesh.patel@us.qbe.com)
  2. Hi Jahyesh, the "printing" is just the process which creates the PDF file. Once that file exists, you can present it to the customer as you described. If you like, you can install the complete PDF generation on a central server next to your webservice (?) so all this processing is invisible to the client.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  3. Hi Jayesh, sometimes, it may be easier that instead to code in uniface a complete compilation of a PDF output file to prepare a report component in uniface, and use a PDF printer (I have FreePDF) to get the desired PDF output. Most of these tools have an option that the show the PDF at the end of the printing process.   HIH, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)