printing

iPad/iPhone — printing directly to a network printer without airprint popover

三世轮回 提交于 2020-01-30 23:14:27
问题 I've developing an iPad/iPhone application that requires that I print out a receipt on a network printer when I finish a transaction. I've managed to get airprint functionality working to some extent in that I can get the UIPrintInteractionController popover to appear appropriately, click the "Print" button and then view the results in the Printer Simulator. Because of the requirements of my application, I'm hoping to skip the popover step and automatically print the receipt when I close the

Print to default printer without open the printer confirmation dialog box in html using Javascript

吃可爱长大的小学妹 提交于 2020-01-30 13:28:07
问题 In html file print the particular div on clicking the button without open the printer confirmation popup dialog box automatically print that content. 回答1: This it not practically possible in a way that's supported by all modern browsers. And for good reason. You don't want random websites to start printing stuff without your intervention. 回答2: Right Click the google chrome shortcut in the desktop,Select PROPERTIES Then in Target Add the given code at the end --user-data-dir=c:\tmp --kiosk

Graphics.DrawString center in printdocument width

一笑奈何 提交于 2020-01-30 08:52:05
问题 I'm attempting to center a string on a printdocument. I've done the following with an image and it works but doesn't seem to work the same with a string. Here is the code that I used to center the image e.Graphics.DrawImage(logo, (e.MarginBounds.Width / 2) - (logo.Width / 2), height); The text i'm trying to center is being supply from a Tab in a TabControl using (var sf = new StringFormat()) { height = logo.Height + 15; sf.LineAlignment = StringAlignment.Center; sf.Alignment = StringAlignment

Graphics.DrawString center in printdocument width

元气小坏坏 提交于 2020-01-30 08:52:05
问题 I'm attempting to center a string on a printdocument. I've done the following with an image and it works but doesn't seem to work the same with a string. Here is the code that I used to center the image e.Graphics.DrawImage(logo, (e.MarginBounds.Width / 2) - (logo.Width / 2), height); The text i'm trying to center is being supply from a Tab in a TabControl using (var sf = new StringFormat()) { height = logo.Height + 15; sf.LineAlignment = StringAlignment.Center; sf.Alignment = StringAlignment

Printing from a Windows Service [duplicate]

南楼画角 提交于 2020-01-29 23:30:13
问题 This question already has answers here : Printing from a .NET Service [closed] (11 answers) Closed 5 years ago . How can I printing a document on a specific printer from a Windows-Service without the need of any user-interaction? A string, or a text-file. Maybe Crystalreport? Thanks. 回答1: The point is not how to print from a windows service or from an application, if you don't want any user interaction to be required you have to specify all print parameters without any need to show a print

Printing from a Windows Service [duplicate]

余生颓废 提交于 2020-01-29 23:28:10
问题 This question already has answers here : Printing from a .NET Service [closed] (11 answers) Closed 5 years ago . How can I printing a document on a specific printer from a Windows-Service without the need of any user-interaction? A string, or a text-file. Maybe Crystalreport? Thanks. 回答1: The point is not how to print from a windows service or from an application, if you don't want any user interaction to be required you have to specify all print parameters without any need to show a print

Change printer default paper size

a 夏天 提交于 2020-01-29 02:32:20
问题 I have several custom paper sizes defined on a printer(the printer is set as default). I need to be able to select one of these formats as the default one. A programmatic(C#) solution would be ideal, but a command line one would be ok too. Right now, I am able to get the list of paper sizes(name/dimensions) defined on the printer, and I can find out which one is the default. In order to select another format as default, the only solution I have so far is by changing the dmPaperSize field on

Change printer default paper size

五迷三道 提交于 2020-01-29 02:32:05
问题 I have several custom paper sizes defined on a printer(the printer is set as default). I need to be able to select one of these formats as the default one. A programmatic(C#) solution would be ideal, but a command line one would be ok too. Right now, I am able to get the list of paper sizes(name/dimensions) defined on the printer, and I can find out which one is the default. In order to select another format as default, the only solution I have so far is by changing the dmPaperSize field on

How do you print to stderr in R?

怎甘沉沦 提交于 2020-01-27 03:53:24
问题 How do you print to stderr in R ? This would especially useful for scripts written in Rscript . 回答1: Actually the following works for me: write("prints to stderr", stderr()) write("prints to stdout", stdout()) 回答2: Here's a more flexible version for debugging/verbose use in Rscript. Not only it prints to stderr as you ask, but it also allows you to pass variable number of arguments, types etc, like printf does. v <- function(...) cat(sprintf(...), sep='', file=stderr()) Now one can do things

Silverlight PrintDocument Timeout Issues

大城市里の小女人 提交于 2020-01-25 23:23:49
问题 I'm having a problem trying to print from Silverlight. The issue is that I'm printing out several pages of images but the source I have to pull them back from is not incredibly fast and it sometimes takes longer to create the page than the 8 tries that PrintPage makes before failing. Is there a way to make it try more than 8 times extend the amount of time between tries? 回答1: No. You can prepare all the necessary data and caching them on the client side before printing. Also, you can block