printing

Assistance with classes in this python program?

放肆的年华 提交于 2019-12-13 07:04:48
问题 i have a program like this: To reserve hotel room according to user requirements. class Customer: def __init__(self,customer_id,customer_fname,customer_lname,customer_address,customer_contactno,customer_noofdays): self.customer_id=customer_id self.customer_fname=customer_fname self.customer_lname=customer_lname self.customer_address=customer_address self.customer_contactno=customer_contactno self.cost=0 self.noofdays=customer_noofdays self.reservation_id=[] self.customer_record={'c_name':self

add border to pages printed using wkhtmltopdf

左心房为你撑大大i 提交于 2019-12-13 06:49:45
问题 similar to this question: Add borders to each printed page with CSS? how can i print a square border on each page of a multi-page pdf that is rendered using wkhtmltopdf? i create a html page as a variable, and use snappy: https://github.com/KnpLabs/snappy to render it to a pdf. $html = $this->load->view('print/report_baseline_print',$data,TRUE); $snappy = new \Knp\Snappy\Pdf('path to wkhtmltopdf -O landscape'); $tmp = random_temp_file('.pdf'); $snappy->generateFromHtml($html,$tmp); $filename

Is there a way to send a print task to an IPP-enabled network printer using http?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 06:41:24
问题 I'm working on an Android print service application which is supposed to allow the user to do the following: browse through the phone's internal storage and send the selected file to an IPP-enabled printer to print. I've combed the net for the past few days, but i've only found one solution [How to use ipp(Internet Printing Protocol) with HTTP to print file in android? that somewhat makes sense to me. However, i've no idea how to go on from here on, besides knowing that a http put request

Printing a PDF duplex using Java

时光怂恿深爱的人放手 提交于 2019-12-13 06:26:48
问题 i have a printer attached to CUPS, it supports duplex printing, how can i set it to print simplex or duplex through my java routine? i have attempted using itext libraries using the ASET add and the addViewerPreference without any luck. can anyone offer some suggestions? 回答1: I've created a small ChangeViewerPreference code sample that adds a viewer preference to an existing PDF: PdfReader reader = new PdfReader(src); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));

Printing contents of string-variable to local printer ASP.NET

五迷三道 提交于 2019-12-13 06:24:48
问题 I have a page in ASP.NET. In this page, I have a List<string> which contains various data. I need to be able to print this information on the client side. So if a logged on user clicks the print button, he is shown a dialog from which to choose settings like which printer, landscape/portrait, number if copies, etc. This is my code: private List<string> dataToBePrinted = new List<string>(); public void addDataToList(string text) { dataToBePrinted.Add(text); } protected void btnPrint_Click

Qt: printing on printer dot matrix

折月煮酒 提交于 2019-12-13 06:08:15
问题 I'm trying to print some string to a printer dot matrix LX-300+ using Qt but it seems that the font is skewed. Some users also have this problem http://www.qtcentre.org/threads/11814-printing-program-in-LX-300-(dot-matrix-printer)-problem but i can't find the solutions until now. Please help me to address this problem. Do i need to create a dll or application using other framework maybe .net if this is Qt bug? Here is my code QTextDocument document; QTextCursor cursor = QTextCursor(&document)

Can a windows Print Processor force a spool data type

☆樱花仙子☆ 提交于 2019-12-13 06:03:49
问题 I'm developing a Windows Print Processor using the WDK 7.1 sample. I'd like to log the actual data being printed and would prefer it to be done in a consistent format (EMF) rather than the RAW format of the underlying printer. Would modifying EnumPrintProcessorDatatypes to only return the format I want (i.e EMF) force application/GDI layer the printer to use that type and thereby enabling me to log it in the same format always? 回答1: The important stuff here is: 1. make sure direct printing is

Crystal Report: Suppress Hightligthed fields on print

大兔子大兔子 提交于 2019-12-13 05:49:44
问题 I have a crystal report which is previewed by the users (in a third party application) and they need some fields in this report highlighted (simple enough), but when they print the report to the B&W laser printer those fields must not be highlighted anymore. Anyone know how to do this? 回答1: It can be done by using a parameter of boolean data type which will control the appearance of the fields in preview or print mode. So for example in preview mode the parameter will be set to True and False

How can I delay printing till images are loaded?

怎甘沉沦 提交于 2019-12-13 05:40:36
问题 I'm using a Process to startup a word document and print it immediately after opening using the the startup Info.Verb = "Print" . This works just fine, the document starts printing right away, only the problem is that the document is being printed before the images have been loaded because the images still need to be downloaded from the internet. Is there a way to delay the printing from the word document? 回答1: Click the upper left round thingy, Word Options, Display, Printing Options, tick

PHP array only prints first letter of each item

烂漫一生 提交于 2019-12-13 05:40:00
问题 The code below is only printing the first letter of each array item. It's got me quite baffled. require_once 'includes/global.inc.php'; print_r($site->bookmarkTags(1)); $index = 0; foreach ($site->bookmarkTags(1) as $tag) { echo $tag['$index']; $index = $index + 1; } print_r return: Array ( [0] => Wallpapers [1] => Free ) the loop: WF 回答1: Try echo $tag, not $tag['$index'] Since you are using foreach, the value is already taken from the array, and when you post $tag['$index'] it will print