printing

Mac OS X: Print directly from file/URL?

╄→гoц情女王★ 提交于 2019-12-21 02:54:15
问题 I want to code a litte utility that can print a page from a an URL, the URL would deliver a standard file (like a pdf or a jpg picture) and I just want to print this from within my cocoa app without showing any dialog, is that possible? I can't find anything about this in the docs except for a thing telling me to build a view with the file and then print this view but is this really necessary? Any help appreciated. Thanks, Philip 回答1: You don't need to show the NSView in order to print. Just

Java printing quality in Linux on dot-matrix printer

不羁岁月 提交于 2019-12-21 02:41:39
问题 I need to print the report from a Java desktop application to a dot-matrix printer (Epson LX-300 II). Report consists of text ang some graphics. Printer is connected via USB and I'm using CUPS to print. I'm printing using the Printable interface (pretty standard in Java). My problem: Text printing quality is very low on every printer resolution (60x60, 120x60, 120x72). It seems like there's no font hinting at all in some printer driver. Letters is looking very ugly. I can't use direct text

Printing Pdf using AirPrint causes small output

点点圈 提交于 2019-12-21 02:38:22
问题 I trying to print a pdf with UIPrintInteractionController that it load in the UIWevView . The good news is that i can print the bad is that the output of the print is to small. any help would be appreciated :) - (IBACTION) printPDF { if ((!_webView)) return; UIPrintInteractionController *controller = [UIPrintInteractionController sharedPrintController]; void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed,

Color selection for matplotlib that prints well

痞子三分冷 提交于 2019-12-21 01:24:31
问题 I am using pandas and matplotlib to generate bar-graphs with lots of bars. I know how to cycle through a list of selected colors (How to give a pandas/matplotlib bar graph custom colors). The question is what colors to select so that my graph prints nicely on a paper (it is for a research paper). What I am most interested in is sufficient contrast between the columns and a selection of colors that looks pleasant. I would like to have multiple colors instead of gray-scale or single-hue

How to design a webpage to be print friendly?

白昼怎懂夜的黑 提交于 2019-12-20 23:25:15
问题 What are the right sizes for a webpage to be printed on A4 size paper? What other stuff should be considered? *inline CSS is preferred in this case Clarification: This web-page's only propose is to be printed, since it is a receipt. Clarification # 2: This web-page is for the internal use of the company I'm working for. They would like it to look professionally designed receipt. Clarification # 3: This web-page must be printed on one page -of A4 size- only. 回答1: Answer I'd recommend using two

print drupal field_view_field value only

一世执手 提交于 2019-12-20 19:05:21
问题 I'm using the code below to print the out the field of nodes to specific areas and it works great. But theres an instance where I just want to print the value you of field without the label. Seems as it should be pretty easy but I'm having a bit of trouble. I'd appreciate any help as i'm pretty new to drupal. Thanks <?php print drupal_render(field_view_field('node', $node, 'field_description')); ?> 回答1: field_view_value() takes a $display argument that you can use to hide the label: $display

Workaround for Chrome 53 printing table header twice on 2nd and later pages?

柔情痞子 提交于 2019-12-20 18:33:55
问题 Users of my website need to be able to print web pages consisting of content on the first printed page followed by a table on the second page. A stripped down version is (jsFiddle at https://jsfiddle.net/jaydeedub/n3qhvtvx/25/ ): HTML: <body> <button class="button" onclick="window.print()">Print Me</button> <div class="page1"> This is the page 1 content. Blah, blah, blah. </div> <table class="table"> <thead> <tr> <td>Page 2 table header prints twice</td> </tr> </thead> <tbody> <tr> <td>Page 2

Why I can call 'print' from 'eval'

眉间皱痕 提交于 2019-12-20 14:12:35
问题 For code: #!/usr/bin/python src = """ print '!!!' import os """ obj = compile(src, '', 'exec') eval(obj, {'__builtins__': False}) I get output: !!! Traceback (most recent call last): File "./test.py", line 9, in <module> eval(obj, {'__builtins__': False}) File "", line 3, in <module> ImportError: __import__ not found Both 'print' and 'import' are language construct. Why does 'eval' restrict using of 'import' but doesn't restrict 'print'? P.S. I'm using python 2.6 UPDATE: Question is not "Why

Printing Dynamic Usercontrol via document paginator in WPF : Datagrid is printed empty

落花浮王杯 提交于 2019-12-20 12:35:50
问题 I am trying to print a wpf document. I am using documentpaginator for pagination and a user control to create actual visual to print. My user control has few textboxes and a datagrid binded to data objects which are passed to the user control at runtime. Now the code works great when printing to an XPS document but when it prints to a physical printer, my datagrid is printed empty though other textboxes are printing perfectly. Below is the code for paginator class GetPage Method :

How do I print all .pdf files names to an output file with command line?

十年热恋 提交于 2019-12-20 10:35:31
问题 This seems easy in Linux, but I'm trying to print the names of *.pdf files within a directory and its subdirectories to an output file. I have Perl installed on my Windows machine. What's a simple way to do this? 回答1: Not much different than Linux. dir *.pdf > fileyouwant.txt If you only want the filenames, you can do that with dir/b *.pdf > fileyouwant.txt If you also want subdirs, dir/s/b *.pdf > fileyouwant.txt If you aren't in that directory to start with dir/s/b C:\Path\*.pdf >