printing

Can Android print directly from browser?

我们两清 提交于 2020-01-14 19:50:09
问题 I am building a web application that takes reservations for rentals, the application needs to be able to print the reservation. Is it possible to print directly from the browser on the Android platform? Currently my Print button works on desktop, and iOS-based devices. However, Android doesn't seem to even blink when the same button is clicked. Can printing on the Android platform be done from the browser? Or does it require external applications? 回答1: You may want to look into Google Cloud

Printing is not working in tomcat, when i start server with services.msc(From client side we could not print )

这一生的挚爱 提交于 2020-01-14 14:08:11
问题 I am using JasperReports 1.3.1 to print the report. I am sing eclipse and tomcat for development purpose. In eclipse, when i run the application, the below code will show the listed printer devices and print button. If i click the print button, the report is printing by selected device. PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet(); printRequestAttributeSet.add(MediaSizeName.ISO_A5); PrintServiceAttributeSet printServiceAttributeSet = new

IHTMLDocument2 Printing without Dialog Box

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-14 14:00:09
问题 I've been working on a project that automatically prints HTML invoices. It's been particularly challenging as I've needed to keep the CSS formatting. Following advice, I've found myself using IHTMLDocument2 to carry out my printing. I'm supposed to be able to: mshtml.IHTMLDocument2 doc = new mshtml.HTMLDocument() as mshtml.IHTMLDocument2; doc.write(htmlContent); //htmlContent is a string of HTML doc.execCommand("PRINT", false, null); The second argument specifies whether to produce the

Capturing Print Event via jQuery

狂风中的少年 提交于 2020-01-14 13:47:41
问题 I would like to be able to manipulate the DOM just before my page is sent to be printed. Internet Explorer has an event on the window object called "onbeforeprint" but this is proprietary and isn't supported by other browsers. Is it possible to do this via javascript (jQuery in particular, if possible)? Before you ask, I can't easily use a print media stylesheet to apply the changes as the elements I need to change have inline styles which can't be overridden with a global stylesheet. I need

Same print CSS as screen

泪湿孤枕 提交于 2020-01-14 10:14:41
问题 It seems like there should really be an easy solution to this, but so far I've been unsuccessful in finding one. I'm using Zurb Foundation and I'm basically creating a live form that takes inputs from a form (above), and fills in a content (below) using angular.js. Users will then print the page to a PDF. I'd like to maintain the layout I have for the content below, and I'd like to hide the form above when printing. Zurb has a fine "hide-for-print" css rule that seems like it should work just

Same print CSS as screen

有些话、适合烂在心里 提交于 2020-01-14 10:12:09
问题 It seems like there should really be an easy solution to this, but so far I've been unsuccessful in finding one. I'm using Zurb Foundation and I'm basically creating a live form that takes inputs from a form (above), and fills in a content (below) using angular.js. Users will then print the page to a PDF. I'd like to maintain the layout I have for the content below, and I'd like to hide the form above when printing. Zurb has a fine "hide-for-print" css rule that seems like it should work just

Refresh printers in Java while application is running

核能气质少年 提交于 2020-01-14 08:37:10
问题 As the title says, I would like to refresh the printers that are registered in the settings of the computer while my Java application is running. Normally, I can use PrinterJob.lookupPrintServices() to get the printers. However, these are only refreshed when restarting the application. I've read something on that lookupPrintServices() should be done in a new thread in order to get the printers. This however did not work, the list of printers remains the same. The following link shows that

Print PDF file and Doc file using C#

点点圈 提交于 2020-01-14 06:35:12
问题 In my application I'm trying to create a function to print existing PDFs or Doc. How can I do this in C# and provide a mechanism so the user can select a different printer or other properties. I've looked at the PrintDialog but not sure what file it is attempting to print, if any, b/c the output is always a blank page. Maybe I'm just missing something there. Any advice, examples or sample code would be great! The below is my code using System; using System.Collections.Generic; using System

Print FixedDocument programmatically

半腔热情 提交于 2020-01-14 06:16:20
问题 I am using a WPF FixedDocument with databinding for a simple invoice report. Works perfect when viewed inside the sofware itsself. But i want to print a series of invoices in one click. The following code works perfect (quick 'n dirty, just loads an invoice one by one directly inside the viewmodel, for testing purposes) when I choose the XPS writer, bu fails to print correctly when printing to a real printer. I can see nothing of the data bound to the report. All the graphical elements such

print image via bluetooth printer prints string

有些话、适合烂在心里 提交于 2020-01-14 05:49:07
问题 I have been working in printing an image via bluetooth printer. When I test it for text printing it works perfectly. But when it comes to image, prints only string characters. I have converted the layout into bitmap. And saved it into sd card. Do I need to convert the bitmap into something that supports for printer. Am using "ZEBRA EZ320" printer for my application. I have used the following code to convert the layout into bitmap, View rootView = findViewById(android.R.id.content).getRootView