Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
Cómo mostrar pdf en HTML de vista previa y hacer clic en el botón Imprimir sin guardar archivo

Estoy usando javascript/JQuery y HTML para obtener una vista previa de PDF en formato HTML:

JavaScript:

 $("#print").click(function() { var checkedItems = AUIGrid.getCheckedRowItemsAll(listGrid); if(checkedItems.length <= 0) { Common.alert("<spring:message code='000076'/>"); return false; } else if(checkedItems.length == 1 ) { var itm = checkedItems[0]; $("#V_DELVRYNO").val(itm.delyno); Common.report("printForm"); Common.popupDiv("/myPopUp.do"); } else { var tmpno = checkedItems[0].delyno; var delbool = true; for (var i = 0 ; i < checkedItems.length ; i++ ){ var itm = checkedItems[i]; if (tmpno != itm.delyno){ delbool = false; break; } } if (delbool) { $("#V_DELVRYNO").val(tmpno); Common.report("printForm"); Common.popupDiv("/myPopUp.do"); } else { Common.alert('<spring:message code="001255"/>'); return false; } } });

HTML:

 <li><p class="btn_grid"><a id="print">Print Report</a></p></li> <form id="printForm" name="printForm"> <input type="hidden" id="viewType" name="viewType" value="PDF" /> <input type="hidden" id="V_DELVRYNO" name="V_DELVRYNO" value="" /> <input type="hidden" id="reportFileName" name="reportFileName" value="/logistics/Delivery_Note_for_Gl.rpt" /><br /> </form>

cuando hago clic en el botón de impresión, parece incorrecto, descarga el archivo y muestra una ventana emergente como flujo de diferencia. Pero como era de esperar, mostrará una vista previa de PDF en una ventana emergente y luego puedo hacer clic en imprimir este pdf.

Paso 1 : haga clic en el botón 'Imprimir', aparece una vista previa emergente de PDF

Paso 2 : Y luego, Crt + P para imprimir (No es necesario guardar el archivo pdf)

Como solucionar el problema ? muchas gracias

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!