printing

Keep contents of a div together for printing in IE8

泄露秘密 提交于 2019-12-22 05:11:49
问题 Given the following HTML document, I need to keep the "Table title" line on the same page as the <table> when being printed in IE8. Despite the page-break-inside:avoid; , there is still a page break between the title and the table. My understanding of this suggests a page break should be avoided and the whole div pushed on to page 2. The doctype is XHTML 1.0 Transitional, I have <meta http-equiv="X-UA-Compatible" content="IE=8" /> set to force IE8 into Standards Mode which supposedly supports

Print background image on every page once

两盒软妹~` 提交于 2019-12-22 04:58:23
问题 I need to print background image on every page once when I print big html file. Now it prints only on the first page. So the part of css for that is: @media all { body { text-align:left; background-image:url('/C:/logo.png'); background-repeat:no-repeat; background-position:right top; } } 回答1: If you specify the background-attachment property as fixed, it renders on every page. The only trouble with this method is that content can clip over top of it (and it only appears to work in FireFox).

How to print PDF file in a Java application?

本小妞迷上赌 提交于 2019-12-22 04:42:47
问题 How do I print a PDF file from a Java application? 回答1: Here some source code that will allow you print any text file: public void print() { //The desktop api can help calling other applications in our machine //and also many other features... Desktop desktop = Desktop.getDesktop(); try { //desktop.print(new File("DocXfile.docx")); desktop.print(new File("Docfile.pdf")); } catch (IOException e) { e.printStackTrace(); } } Maybe it suit your needs since you did not give more details. 回答2: Try

Print image using windows print image dialog

给你一囗甜甜゛ 提交于 2019-12-22 04:34:14
问题 I know how to print an image using PrintDocument. However, i want to print my Image using the default windows print function. Like when you right click an image and click print, the dialog comes up that allows you to set size choose printer etc. Does anyone know how to achieve this in C#? Do i have to use WINAPI ? Cheers Edit: I'm talking about this print dialog. 回答1: You can launch that dialog with the Process class. private void button1_Click(object sender, EventArgs e) { string fileName =

Printing web fonts in Firefox

对着背影说爱祢 提交于 2019-12-22 04:08:22
问题 I am trying to print web pages that contain external CSS references and use web fonts (I mean @font-face attribute) but in print preview the web fonts disappear. Does anyone know a solution without using the web font locally? 回答1: Looks like printing @font-face fonts is not yet implemented: https://bugzilla.mozilla.org/show_bug.cgi?id=468568 回答2: Works as of Firefox 18! - Yippee! 回答3: inlcude the file not only for screen but also for print <link rel="stylesheet" type="text/css" href="main.css

Print css backgrounds in safari/chrome?

筅森魡賤 提交于 2019-12-22 04:05:22
问题 I need to print some pages with CSS backgrounds but they don't appear in Safari or Chrome, in FF there's an option in Page Setup but I haven't been able to find it in these two browsers. Do they not support it? Thanks all in advance. 回答1: Printing background images is a browser-dependent feature. FF and IE have it but you cannot force it otherwise via sourcecode. 回答2: In chrome (newer versions 17+ I think), this is controlled by a CSS property on the items which developers can add: -webkit

any good javascript library for cross-browser & printer friendly pages? [closed]

天涯浪子 提交于 2019-12-22 04:00:19
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I am working on a web project where we have to come up with "a cross-browser & printer-friendly solution". The markup is complex

Print in Swift 3

情到浓时终转凉″ 提交于 2019-12-22 03:59:22
问题 i would like to know what's the different between these two way to print the object in Swift. The result seems identical. var myName : String = "yohoo" print ("My name is \(myName).") print ("My name is ", myName, ".") 回答1: There is almost no functional difference, the comma simply inputs a space either before or after the string. let name = "John" // both print "Hello John" print("Hello", name) print("Hello \(name)") 回答2: You can use the \(variable) syntax to create interpolated strings,

Preventing Page Breaks in a Table When Printing

守給你的承諾、 提交于 2019-12-22 02:05:32
问题 I have a page that I'm trying to set up for printing. This page contains a large number of individual tables. The tables are of varying size but, in general, I can fit 2.5 to 3 tables on each page. I'd like to be able to prevent the tables from being broken by a page break. Any idea how I can accomplish that? I tried this: .reportTable { page-break-inside: avoid; } Unfortunately, page-break-inside only seems to be supported in Opera (according to W3Schools - I verified that this doesn't work

Printing Unicode Characters From android to bluetooth thermal printer

徘徊边缘 提交于 2019-12-22 01:05:32
问题 I have bluetooth/usb thermal Printer of model QS58. I want to print unicode characters like "मराठी" When i connect printer to computer through usb and give print,it prints correctly. but, when printing through my android application it is printing invalid characters(chinese character). I think windows is sending correct data to printer,but my application not.so please tell me ho can i send data to printer. I have already tried following methods mmOutStream.write("मराठी".getBytes("UFT-8"));