printing

What event is fired when window.print() is called?

不羁的心 提交于 2019-12-22 18:54:06
问题 I am trying to work through this question and I have had little success tonight. I think I can make the code below work if I only knew what event was fired when the window.print() function is called. var browser_name = navigator.appName; if(browser_name == 'Microsoft Internet Explorer'){ window.attachEvent("print()",on_print_function);//I realize I cannot attach an event listener to a function, I just wanted you to see what I am trying to accomplish } else{ window.addEventListener("print()"

Applet printing; Applet discards security permission ; Windows7 & Java7

我与影子孤独终老i 提交于 2019-12-22 18:42:47
问题 Using Java Liveconnect able to access printer through applet from browser, for access rights I've added permission java.lang.RuntimePermission "queuePrintJob"; in C:\Program Files (x86)\Java\jre7\lib\security\java.policy file. But still I'm getting the following warning message Using : Java Plug-in 10.9.2.05 ; JRE version 1.7.0_09-b05 Java HotSpot(TM) Client VM But the same signed applet properly works in xp machine with java7. Even if I check Always allow.... , it keeps on showing warning

iOS Printing UI - limit number of copies

我的梦境 提交于 2019-12-22 18:24:18
问题 is it possible to limit number of copies (from code) which user is allowed to print? 回答1: In a word: No. This is not exposed in the public API and you should file a feature request on bugreport.apple.com if you want to see this functionality in a future version of the iOS APIs. 来源: https://stackoverflow.com/questions/6200486/ios-printing-ui-limit-number-of-copies

Inconsistent Data on multiple page printing on a printer

社会主义新天地 提交于 2019-12-22 17:37:24
问题 Requirement To print three(depends on the server response size) pages of print on one button click event. Stored a barcode image an array, and loop through that array and bind the value to ctrl.barCodeImage. Then call the print service to print each bar code in different page. But it print always three same value that is the last value in the array. It is a three separate pages with different bar code data in it. This is the expected response print 1 print 2 print 3 Current response is

vb.net 2010 PrintDocument Margins not working even if I set the margins

北城以北 提交于 2019-12-22 17:21:37
问题 I am reading from a text file and then printing the string using printdocument via vb.net 2010. Here is my code : Public Class myPrinter Friend TextToBePrinted As String Public Sub prt(ByVal text As String) Dim psize As New System.Drawing.Printing.PaperSize("Custom Paper Size", 850, 550) Dim newMargins As New System.Drawing.Printing.Margins(0, 0, 0, 0) TextToBePrinted = text Dim prn As New Printing.PrintDocument Using (prn) prn.PrinterSettings.PrinterName = frmStockOut.printer prn

vb.net 2010 PrintDocument Margins not working even if I set the margins

醉酒当歌 提交于 2019-12-22 17:20:11
问题 I am reading from a text file and then printing the string using printdocument via vb.net 2010. Here is my code : Public Class myPrinter Friend TextToBePrinted As String Public Sub prt(ByVal text As String) Dim psize As New System.Drawing.Printing.PaperSize("Custom Paper Size", 850, 550) Dim newMargins As New System.Drawing.Printing.Margins(0, 0, 0, 0) TextToBePrinted = text Dim prn As New Printing.PrintDocument Using (prn) prn.PrinterSettings.PrinterName = frmStockOut.printer prn

Your most general C macro for printing variable values in different types

谁都会走 提交于 2019-12-22 16:36:14
问题 Please share with us your favorite, and most general, PRINT or DEBUG macro applicable to all (or almost all) variables in different types and to arrays in C. The macro can have any number of parameters (though 1-3 are preferred); if it increases descriptive power at all, C99 features can be assumed. #define PRINT(var, ...) \ ... Let's begin! 回答1: For C++, template function can be much more powerful than macro. template <typename T> std::string tostring(const T& t); The drawback of template

How to print one large image in many pages?

半腔热情 提交于 2019-12-22 14:46:49
问题 I want to print one tall (long) image in many pages. So in every page, I take a suitable part from the image and I draw it in the page. the problem is that I have got the image shrunk (its shape is compressed) in the page,so I added an scale that its value is 1500 . I think that I can solve the problem if I knew the height of the page (e.Graphics) in pixels. to convert Inches to Pixel, Do I have to multiply by (e.Graphics.DpiX = 600) or multiply by 96 . void printdocument_PrintPage(object

How do I print a text file in .net

此生再无相见时 提交于 2019-12-22 13:57:19
问题 How do I print a .txt file in vb.net? Hopefully without using any third parties. 回答1: Have a look at this example on how to print files with VB.Net: MSDN How to: Print a Multi-Page Text File in Windows Forms The most important class you need is PrintDocument. No third party tools or Dll's other than in System.Drawing and System.IO Namespace in .Net-Framework(> 1.1) are needed. 回答2: See How to print batch file in vb.net?. There's a VB.NET code sample which you should be able to use verbatim.

How to reverse a vector of strings in C++? [duplicate]

时光总嘲笑我的痴心妄想 提交于 2019-12-22 13:56:24
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to reverse a C++ vector? I have a vector of strings and I want to reverse the vector and print it, or simply put, print the vector in reverse order. How should I go about doing that? 回答1: If you want to print the vector in reverse order: #include <algorithm> #include <iterator> #include <iostream> #include <vector> #include <string> std::copy(v.rbegin(), v.rend(), std::ostream_iterator<std::string>(std::cout