printing

Printing Nodes with JavaFX

孤街浪徒 提交于 2019-12-22 11:35:33
问题 Here is the problem : I currently have to print a a4, landscape page containing "parts" of my current javaFx scene. The parts I have to print are parts of a BorderPane, I need to print the Left, Center and Bottom nodes so the printed page should look like this : The most important thing to print is the Center part. It must be as wide/tall as possible. Basically, the Left part can take like max 10% of the page width, and the bottom could take like 10-15% of the page height. So, the center item

Print Word document from WPF with print settings (Aspose generated)

我的梦境 提交于 2019-12-22 11:29:03
问题 I've been fighting with a printing issue for a long time now, hopefully someone can help. Background I'm creating an Aspose.Words-document from a word-template, and mail merging it, and then want to print it directly from the WPF application with a print dialog. When printing i need to be able to select all different printer settings available for my printer (what paper to use, zoom, orientation, color etc.). This last thing seems to be what keeps my Google searches from succeeding, as all

How can I print a QWidget in Qt?

假如想象 提交于 2019-12-22 11:17:36
问题 I need to know how to print a QWidget as a PDF file. The Widget (QDialog) contains a lot of labels, some QPlainTextEdit and a background image. The Dialog shows a receipt with all of its field already filled. I already tried using QTextDocument and html for this purpose, but the complexity of the receipt(lots of image and format customisation) makes the html output completely messed up. This is the document. Receipt image 回答1: You have to use QPrinter and this is the object that you must use

CSS inch/mm measurements not accurate

╄→гoц情女王★ 提交于 2019-12-22 11:04:25
问题 I am currently developing a tool for printing labels from the browser. I am running in to an interesting issue where I have labels that are 2.25" x 1.25". As such I have set my print CSS for a div to width: 2.25in; height: 2.25in; In the chrome inspector, the dimensions appear properly as 2.25in; by 1.25in. Also, my printer is configured correctly as the same coordinates exactly. When the time comes to print I am actually getting a preview that does not fill the entire 2.25x1.25 print preview

CSS inch/mm measurements not accurate

不打扰是莪最后的温柔 提交于 2019-12-22 11:01:20
问题 I am currently developing a tool for printing labels from the browser. I am running in to an interesting issue where I have labels that are 2.25" x 1.25". As such I have set my print CSS for a div to width: 2.25in; height: 2.25in; In the chrome inspector, the dimensions appear properly as 2.25in; by 1.25in. Also, my printer is configured correctly as the same coordinates exactly. When the time comes to print I am actually getting a preview that does not fill the entire 2.25x1.25 print preview

How to create Excel file with EPPlus for A4 paper

浪子不回头ぞ 提交于 2019-12-22 10:40:07
问题 My current project use EPPlus to create Excel files. These files are printed by the user and I'm trying to force the Excel file to print in only one A4 page, regardless the width og the content. Actually, when the file is printed, it takes two pages and the second contains just one column. My code: ws.PrinterSettings.Orientation = eOrientation.Landscape; ws.PrinterSettings.PrintArea = ws.Cells[ws_dimension_adress]; ws.PrinterSettings.TopMargin= 0; ws.PrinterSettings.RightMargin = 0; ws

Printing in Java using PS file

做~自己de王妃 提交于 2019-12-22 10:39:21
问题 I have a generated post script file and want to print using it. How can it be achieved in java either using javax print API or AWT. Is it possible? 回答1: Complicated. Does your printer(s) support PostScript? Is it networked? If so, most networked printers can talk LPR and you can shove the file over as-is. On Windows, you could also stream the file as-is to the lpt1: mapped port via something like NET USE LPT1: \\[Computer Name]\Printer /PERSISTENT:YES . If you're on a server and you do lots

Magento Exception Error: Invalid method Mage_Catalog_Block_Product_View_Type_Simple::displayProductStockStatus()

会有一股神秘感。 提交于 2019-12-22 10:38:27
问题 i tried to install a theme to my magento system and when i try to open a product page its shows me an error: Exception printing is disabled by default for security reasons. please help me the error: Invalid method Mage_Catalog_Block_Product_View_Type_Simple::displayProductStockStatus(Array ( ) ) Trace: #0 /home/embxsto1/domains/emb1.xstore.co.il/public_html/app/design/frontend/default/ma_erida/template/catalog/product/view/type/default.phtml(30): Varien_Object->__call('displayProductS...',

How do I specify font height at different orientations?

冷暖自知 提交于 2019-12-22 10:35:37
问题 The common way to create a font with GDI is to use the desired point size and the target device's vertical resolution (DPI) like this: LOGFONT lf = {0}; lf.lfHeight = -MulDiv(point_size, GetDeviceCaps(hdc, LOGPIXELSY), 72); ... HFONT hfont = CreateFontIndirect(&lf); Assuming the default MM_TEXT mapping mode, this converts point_size into the pixel height for the desired device. (This is a common approximation. There are actually 72.27 points in an inch, not 72.) (The minus sign means I want

print html tags in javascript

喜你入骨 提交于 2019-12-22 10:30:06
问题 Thanks for reading! var data = "<html><head><title>Hello</title></head><body>Hello Body</body></html>"; I want to print data including the HTML tags without having the browser rendering the HTML tags and just displaying "Hello Body". I tried: str = str.replace("<", ""); but in vain. 回答1: data = data.replace(/</g, "<").replace(/>/g, ">"); When the browser encounters < (which is known as a character entity), it will replace it with a literal '<', enabling you to display the HTML tags on the