printing

CSS print background with margin

蓝咒 提交于 2019-12-25 04:44:14
问题 I am trying to make a print-friendly resume. Everything is working, except for an issue regarding the background image. I do not want to have any margin on the print page, since otherwise the background image looks messed up: https://www.dropbox.com/s/h2zttd8u6r6hq0g/Screenshot%202015-01-08%2014.38.14.png?dl=0 However, if I do not use any margins, the background looks good but I am unable to do any margin on the second (or other pages): https://www.dropbox.com/s/16vgu3nahfgeipr/Screenshot

Printed CDC appears tiny on paper

蓝咒 提交于 2019-12-25 04:33:46
问题 When I print the CDC for a report control that I've created it appears tiny (less than 1 square inch on paper). How can I get the report to be printed to occupy the entire page ? Or in other words, how can I make the entire report to appear in one printed page. CPrintDialog printDialog(FALSE); printDialog.DoModal(); CDC dcPrint; if(dcPrint.Attach(printDialog.GetPrinterDC())) { int iHorzRes = dcPrint.GetDeviceCaps(HORZRES); int iVertRes = dcPrint.GetDeviceCaps(VERTRES); int iHorzResCDC = m_CDC

Print PDF using GhostScript in LANDSCAPE

寵の児 提交于 2019-12-25 04:33:41
问题 I am printing a PDF file as follows: using (GhostscriptProcessor processor = new GhostscriptProcessor()) { List<string> switches = new List<string>(); switches.Add("-empty"); switches.Add("-dPrinted"); switches.Add("-dBATCH"); switches.Add("-dNOPAUSE"); switches.Add("-dNOSAFER"); switches.Add("-dNumCopies=1"); switches.Add("-sDEVICE=mswinpr2"); switches.Add("-sOutputFile=%printer%" + printerName); switches.Add("-f"); switches.Add(inputFile); processor.StartProcessing(switches.ToArray(), null)

Why isn't this code returning these lists? Does this have to do with using 'return' rather than 'print'?

别来无恙 提交于 2019-12-25 04:13:53
问题 So this is my code, when I had everything set to 'print' things, the code worked, but now with 'return' the program terminates after I select a Subject, Topic, and the questions/answers. I made this program to enter in my flash card questions and answers, and then be able to select the subject, then select a topic, and then select whether to see only questions, answers, or see both. I noticed at the end of each list the word 'None' would appear, I tried to fix this by replacing 'print', with

Setting correct printer in MS Word through automation

与世无争的帅哥 提交于 2019-12-25 03:43:33
问题 I have the following automation code: lPrintSetup := fWordObject.Application.Dialogs.Item(wdDialogFilePrintSetup); lPrintSetup.Printer := 'MyPrinter'; lPrintSetup.DoNotSetAsSysDefault := True; lPrintSetup.Execute; lPrintSetup := Null; The Printer property is giving me some problems, sometimes Execute crashes with an EOleException (0x800A1460 (error code 5216): There is a printer error) because of a wrong printername. I have printer information of all printers in a _PRINTER_INFO_2 record which

Which shell command can I use In windows (XP or older) to bring me the print picture dialog?

时光总嘲笑我的痴心妄想 提交于 2019-12-25 03:43:28
问题 In Python, if I want to open/launch the default browser using shell, I can import os and execute run "www.google.com". Is there any similar way to open the print pictures dialog for a given image.jpg as if right clicking it and selecting print in the context menu that I can use to call this routine from python??? Thank you. 回答1: You can call win32api.ShellExecute with the "print" verb. An example: http://timgolden.me.uk/python/win32_how_do_i/print.html 回答2: At least on my Windows system

Print two contentWindows as one within an iFrame

守給你的承諾、 提交于 2019-12-25 03:34:44
问题 I have a webpage with multiple iFrames e.g. 6 and I'd like to be able to print 2 of those frames as one call rather than grabbing the contentWindow of each frame and then calling: parent.iFrame1.focus(); parent.iFrame1.print(); parent.iFrame2.focus(); parent.iFrame2.print(); as it prints the contents in two separate print preview windows in the browser. I tried the following but none really give me what I'm looking for or work for me (i.e. the content is truncated) Is it possible to do or am

placing PHP variable inside of shell_exec( ) to run lsp command

泪湿孤枕 提交于 2019-12-25 03:34:28
问题 When the url .../print.php loads, I want the name of the latest file uploaded to the target directory to be printed and for that same file to simultaneously be sent to the printer connected to the server. With this code here, I am able to do everything that I want ONLY when the shell_exec(lsp /file/path) refers directly to a file. I have a function set up that determines the latest file uploaded and also the filepath, but I want to do something like shell_exec(lsp $filepath). <?php $path = "

python 3 print function

给你一囗甜甜゛ 提交于 2019-12-25 03:22:47
问题 So I want to print this: * ** *** **** ***** And my code is: for row in range(1,6): for col in range(row): print('*', end="") print('') My question is about print function, since it includes new line. Knowing some C before, I just can't figure it out what the last print('') does, and why my code doesn't work without it. 回答1: The end='' parameter to the first call to print suppresses printing a newine after the * , and the second call to print prints only a newline. 回答2: The extra print line

On Android, what is the easiest way to print from Chrome browser to a Bluetooth mobile printer?

烂漫一生 提交于 2019-12-25 03:19:31
问题 My web app creates a print dialogue on desktop and I am trying to see if there is away to do something similar via the mobile chrome browser. Any advice on how to achieve this would be greatly appreciated. Thanks 回答1: The Android Printing API was added in Android 4.4 (KitKat) and supports printing to Google Cloud Print enabled printers out of the box (along with HP printers via the HP Print Service app) - Chrome for Android has an option for printing the current web page from the overflow