0

Estoy creando mi primera app con FrameWork7 (PWA), incluso soy nuevo con todo esto de JavaScript/Html/css, yo vengo de ser desarrollador en plataformas "cliente/servidor".

La app debe de imprimir un ticket en una impresora Zebra iMZ320, según tengo entendido, para poder imprimir en la Zebra, debo de enviar imágenes, para ello estoy creando un PDF con el plugin jsPDF/MrRio, el archivo se genera sin problema, para comprobar el contendido del archivo lo descargué con

gPdf.save("prueba.pdf")

y todo se ve bien (tamaño de ticket,tamaños de fonts etc) en realidad no requiero que se descargue el archivo en los dispositivos, sino lo que requiero es mostrar su contenido y con ello enviarlo a la Zebra. Para "visualizar" el contendido del PDF uso el comando "output" tiene diferentes parámetros, yo estoy usando el parámetro "blob", así que ocupo la sig. instrucción

gPdf.output('blob')

Ahora, estoy armando un popup dinamicamente para que dentro de este muestre el contenido del PDF, intento mostrar dicho blob dentro de un iframe pero no logro hacerlo, el iframe se ve vació.

const objectUrl = window.URL.createObjectURL(gPdf.output('blob'));
console.log(objectUrl);
var popup = app7.popup.create({   content:
'<div class="popup popup-about">'+ '<div class="block">'+
'<p>About</p>'+ '<p><a class="link popup-close" href="#">Close
popup</a></p>'+ '<iframe src="'+objectUrl+'"/iframe>'+ 
'</div>'+
'</div>' });

Les comparto un ScreenPrint en chrome en la computadora, mucho les agradeceré sus comentarios y/o ejemplos. introducir la descripción de la imagen aquí

Con algún parámetero del comando gPdf.output() , mande a consola el resultado, dicho resultado lo copió y lo pego en chrome y me despliega el archivo PDF

data:application/pdf;base64,JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAyIDAgUgovTWVkaWFCb3ggWzAgMCAyMTUuNDMgMzExLjgxXQovQ29udGVudHMgNCAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwvTGVuZ3RoIDQ2OTY+PgpzdHJlYW0KMC41NyB3CjAgRwpCVAovRjEgNyBUZgo4LjA0OTk5OTk5OTk5OTk5OSBUTAowIGcKMzQuMDIgM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YgMDAwMDAgbiAKMDAwMDAwNTM5NCAwMDAwMCBuIAowMDAwMDA1NDg4IDAwMDAwIG4gCjAwMDAwMDU1ODUgMDAwMDAgbiAKMDAwMDAwNTY4NiAwMDAwMCBuIAowMDAwMDA1Nzc5IDAwMDAwIG4gCjAwMDAwMDU4NzEgMDAwMDAgbiAKMDAwMDAwNTk2NSAwMDAwMCBuIAowMDAwMDA2MDYzIDAwMDAwIG4gCjAwMDAwMDYxNTggMDAwMDAgbiAKMDAwMDAwODQxMCAwMDAwMCBuIAowMDAwMDA5MzcyIDAwMDAwIG4gCjAwMDAwMDk0OTMgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAyMgovUm9vdCAyMSAwIFIKL0luZm8gMjAgMCBSCj4+CnN0YXJ0eHJlZgo5NTk3CiUlRU9G

UPDATE: Se hizo la modificación de cambiar

gPdf.output('blob')

a

gPdf.output('bloburl')

const objectUrl = gPdf.output('bloburl');
console.log(objectUrl);
var popup = app7.popup.create({   content: '<div class="popup
popup-about">'+
'<div class="block">'+
'<p>About</p>'+
'<p><a class="link popup-close" href="#">Close popup</a></p>'+
'<iframe src="'+objectUrl+'"></iframe>'+
'</div>'+
'</div>' });

En el browser(chrome) de la computadora el iframe está vacio, pero en el dispositivo móvil el iframe se ve con un botón que no tiene ninguna acción, es decir, no pasa nada cuando le doy click. introducir la descripción de la imagen aquí

1 respuesta 1

0

Dos cosas importantes:

  1. Según la documentación de jsPDF puedes obtener el objeto URL directamente con:
    const objectUrl = gPdf.output('bloburl');

Si vas a estar creando varios PDF, deberías descartar cada objeto cuando ya no sea necesario:

URL.revokeObjectURL(objectUrl);
  1. La etiqueta iframe no es de "autocierre", por lo que:
    <iframe src="EstoNoEsCorrecto" />
    <iframe src="EstoSíEsCorrecto"></iframe>

No sé qué tan viable es asignar un objeto URL como origen de la etiqueta directamente y no encontré información al respecto, pero todos los ejemplos que vi son del tipo:

const objectUrl = gPdf.output('bloburl');
const iframe = document.CreateElement('iframe');
// Ejecutar cuando cargue el iframe
iframe.addEventListener('load', function() {
    // Ya se cargó el iframe, hay que descartar el objeto
    URL.revokeObjectURL(objectUrl);
});
iframe.src = objectUrl;
elementoPadre.appendChild(iframe);
0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.