printing

how to make printable version of a webpage?

故事扮演 提交于 2019-12-20 10:35:02
问题 I would like to make a printable version of my web page. I have already tried using CSS to make a separate stylesheet for the page but it is not working properly.(i.e. it will not get rid of margin at the top also the menu bar background will not go away.) the page consists of hundreds of tables and when i do a print preview they also get split between pages sometimes. these tables are generated dynamically according to users choices in checkboxes is it possible to add a printable link which

Print-friendly ASP.NET MVC 3 view

痴心易碎 提交于 2019-12-20 10:30:27
问题 I want to create print friendly version of my ASP.NET MVC 3 view how can I do this ? Also, what if I need to make print friendly version of few parts of the view ? Regards. 回答1: I use the same views, but have 2 CSS files (one with media="screen" and the other with media"print" ). In the print CSS file I use CSS to hide all the irrelevant DOM elements using display:none; . Example MVC View: <html> <head> <link rel="stylesheet" type="text/css" media="screen" href="screen.css" /> <link rel=

How to print with custom paper size in winforms

无人久伴 提交于 2019-12-20 10:05:39
问题 I'm trying to print a document in my application. But on different printers i get different results. This is my code: PaperSize paperSize = new PaperSize("My Envelope", 440, 630); paperSize.RawKind = (int)PaperKind.Custom; PrintDocument pd = new PrintDocument(); pd.PrintPage += (sender, args) => Console.Out.WriteLine("Printable Area for printer {0} = {1}", args.PageSettings.PrinterSettings.PrinterName, args.PageSettings.PrintableArea); pd.DefaultPageSettings.PaperSize = paperSize; pd

Possible to print more than 100 rows of a data.table?

删除回忆录丶 提交于 2019-12-20 09:26:01
问题 The data.table has a nice feature that suppresses output to the head and tail of the table. Is it possible to view / print more than 100 rows at once? library(data.table) ## Convert the ubiquitous "iris" data to a data.table dtIris = as.data.table(iris) ## Printing 100 rows is possible dtIris[1:100, ] ## Printing 101 rows is truncated dtIris[1:101, ] I often have data.table results that are somewhat large (e.g. 200 rows) that I just want to view. 回答1: The print method of data.table has an

Print the sourcecode of a whole java project

左心房为你撑大大i 提交于 2019-12-20 08:27:42
问题 I have to print the whole sourcecode of a java-project. The final version should look like: Eclipse: File -> Print . But with this function you can only print one file at once. Is there a way to print (or create a pdf/rtf of) the whole project (all *.java, *.xml, ... files) with one command? Im using eclipse galileo on windows xp sp3 EDIT: For each class/file the page should (more or less) look like this: C:\..\..\..\LibraryExtractor.java 1 package utils.libraries; 2 3 import java.io.File; 9

Javascript receipt printing using POS Printer [closed]

不羁岁月 提交于 2019-12-20 08:04:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . In a web application I want to print a receipt using a POS (Point of Sale) Printer. I want to do that with Javascript. Can anyone provide me an example for that? 回答1: I'm going out on a limb here , since your question was not very detailed, that a) your receipt printer is a thermal printer that needs raw data, b

How do I save my print statement in a list? Python [closed]

最后都变了- 提交于 2019-12-20 07:55:50
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . How do I save my print statement in a list? for i in range(len(values)): for j in range(len(values)): print (values[0]+values[i])+values[j] 回答1: Don't use print if you wanted to add values to a list. Just add them to a list directly : result = [] for i in range(len(values)): for j in range(len

Excel macro to print sheets based on multiple values

て烟熏妆下的殇ゞ 提交于 2019-12-20 07:39:50
问题 I have a sheet with a macro that when i change a value in the cell E5, automatically fill certain fields in sheet1 , searches and return values from a table on other sheet - sheetTable ). My goal now is to select a range of values in a column on sheetTable and assign each one of them to Cell E5 on sheet1 , and print each one. So let's say I select 3 cells with values: 45, 50 and 66. When I run the macro it will assign 45 to cell E5 and print sheet1 , then it will assign 50 to cell E5 and

Printing selected rows from JTable

蓝咒 提交于 2019-12-20 07:37:36
问题 I'm making a java swing application, I'm also a newbie programer (1 and a half years programing). I'm trying to code inside a button a way to print (in a printer, not in console) the preselected rows (by a user) of a jTable, which has been printed (in the window) by a Query before. This is my code (inside the button), I know it's worng. I thought , the way to do this was copying in a temp jTable all the selected rows, and then print the temp jTable, but i can't achieve this. MessageFormat

What if the difference between PrintWriter.print and PrintWriter.println?

给你一囗甜甜゛ 提交于 2019-12-20 07:09:01
问题 I have a server-client program set that I'm working on and right now I'm having problems with the protocol because the new line at the end of the println statement is confusing the metadata. In other words, I need to print to a PrintWriter without the new line at the end. I tried just print, but for some reason the other program doesn't get the message that way. I tried, for the sake of experimentation, adding "\n", "\r", and "\n\r" to the end of the statement and it still didn't get any data