We want to show a pdf generate on the fly through a DMI call.
We get a valid PDF content (if you save the content, you obtain a "readable" PDF file) but it is showing as a plain text.
Reading and following instructions in this thread:
http://forums.smartclient.com/showthread.php?t=3431&highlight=popup+pdf
we have realized that the problem is not in the way to get the window which shows the PDF, because with your example code occurs the same behaviour.
Our source code:
What is wrong?
How can we achieve our objective?
We attach a screen capture of both result (loading your PDF -Capture1.jpg, and loading our result -Capture2.jpg).
We are working under:
v9.1d_2014-02-22/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28
We get a valid PDF content (if you save the content, you obtain a "readable" PDF file) but it is showing as a plain text.
Reading and following instructions in this thread:
http://forums.smartclient.com/showthread.php?t=3431&highlight=popup+pdf
we have realized that the problem is not in the way to get the window which shows the PDF, because with your example code occurs the same behaviour.
Our source code:
Code:
/****************************************************/ /****************************************************/ // FORMULARIO /****************************************************/ /****************************************************/ isc.defineClass("FrmAlbaranParaCliente", "AtlasGenFormulario").addProperties({ numCols:2, colWidths:[200,600], /** * * CAMPOS DEL FORMULARIO * */ fields: [ // // Campos de entrada // { name:"PLAZA", title: "Plaza" }, { name:"HCARGA", title: "Hoja Carga" }, { name:"REPART", title: "Reparto" }, { name:"FECHA", title: "Fecha" }, // // Botón // { _constructor: isc.ToolbarItem, width:110, height: 35, colspan: true, buttons: [{ type:"IButton", autoFit:true, title: "Prueba Jasper...", click: llamarImpresion }] } ], // // Inicialización del formulario // initWidget : function () { this.Super("initWidget", arguments); } }); /** * * FUNCION DE LLAMADA A LA IMPRESION * */ function llamarImpresion (form, item) { var plaza = form.getField("PLAZA").getValue(); var hcarga = form.getField("HCARGA").getValue(); var repart = form.getField("REPART").getValue(); var fecha = form.getField("FECHA").getValue(); isc.DMI.call({ appID: "AlbaranParaCliente", className: "com.redur.impresion.AlbaranParaCliente", methodName: "imprimeAlbaranCliente", arguments: [plaza, hcarga, repart, fecha ], callback : function (response, data) { isc.HTMLPane.create({ autoDraw: true, overflow: "auto" }).setContents(data); // If we replace here this sentence by --> }).setContentsURL('http://www.smartclient.com/devcenter/isomorphicSDK/docs/SmartClient_Quick_Start_Guide.pdf'); // We get the same result. }, requestParams: { willHandleError: true, showPrompt: true } }); }// Fin funcion llamadaPLWS
How can we achieve our objective?
We attach a screen capture of both result (loading your PDF -Capture1.jpg, and loading our result -Capture2.jpg).
We are working under:
v9.1d_2014-02-22/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28
Comment