printing

StartDocPrinter(hPrinter, 1, di) returns false

大城市里の小女人 提交于 2019-12-13 04:36:46
问题 i am trying to print a raw data to the printer. i got my codes from http://support.microsoft.com/kb/322090 in the code segment... Dim di As New DOCINFOW With di .pDocName = "My Visual Basic .NET RAW Document" .pDataType = "TEXT" .pOutputFile = vbNull End With If OpenPrinter(szPrinterName.Normalize(), hPrinter, IntPtr.Zero) Then If StartDocPrinter(hPrinter, 1, di) Then If StartPagePrinter(hPrinter) Then bSuccess = WritePrinter(hPrinter, pBytes, dwCount, dwWritten) EndPagePrinter(hPrinter) End

Using BitBlt to capture screenshot, how?

天大地大妈咪最大 提交于 2019-12-13 04:35:06
问题 I have run into this "BitBlt" from time to time in my searched, but i don´t get how to use it. From what people say, it seems to be the fastest way to capture a screen that Windows show. However, i can´t say anything about that myself as i don´t got it working. The only thing i have manage to atleast, try the method, is with this: gfxBmp.CopyFromScreen(0,0,0,0 rc.Size,CopyPixelOperation.CaptureBlt); Which i guess uses it? (rc.size = size of a certain window) Sadly, it doesn´t do anything, i

Print the contents of a text file on the client's printer using asp.net

天大地大妈咪最大 提交于 2019-12-13 04:29:22
问题 I am having a text file uploaded on the server. When a User Clicks on print button I want the file to be printed using his/her printer. Currently I am using the below code, but it is for the server side printing. Protected Sub btnPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrint.Click Dim fileName As String = "" For x As Integer = 0 To FileImageList.Count - 1 If FileImageList(x).parent.backcolor = Drawing.Color.Orange Then fileName = FileNameList(x).text End If

Convert Html to a Printable Image

帅比萌擦擦* 提交于 2019-12-13 04:28:03
问题 I am working on a project which runs on .NET 2.0. My task is to recreate the data displayed in HTML as a prinatable image (with the resolution of at least 150dpi). I looked into several options, to no avail: The WebBrowser class object. While rendering html as an image, it uses the screen resolution on the server machine. The Sciter by Terra Informatica. It does not exposes a property with which one can set the resolution of the output image Awesomium can be used with .NET 4.0 or higher only.

print WPF visual from viewmodel

感情迁移 提交于 2019-12-13 04:27:28
问题 how do i print a visual or window from the ViewModel by just calling a method to print without using a RelayCommand as shown in this example: Print WPF Visuals with MVVM pattern? var printDlg = new PrintDialog(); printDlg.PrintVisual(View, "JOB PRINTING") 回答1: Ok this is a quick and dirty but reusable attached behavior class. Disclaimer: I just hacked this in a couple of minutes and it has its flaws, which should be easy to overcome. First we need our service class. public class VisualPrinter

Printing Background Colors from WPF WebBrowser

ぐ巨炮叔叔 提交于 2019-12-13 04:26:17
问题 Currently, I'm printing the contents of a WPF WebBrowser like so: mshtml.IHTMLDocument2 doc = WebBrowser.Document as mshtml.IHTMLDocument2; doc.execCommand("Print", true, null); My HTML content has tables with background colors. Currently, when I print the content, the background colors do not print -- everything is solid white. Is there a way to tell the WebBrowser to print the background colors as well? Also, this still causes a print dialog to pop up. Does anyone know what the command is

how did not zoom content on printing when browser zoom?

ぐ巨炮叔叔 提交于 2019-12-13 04:19:19
问题 how did not zoom content on printing when browser zoom? on zoom browser printing(use iframe) should not changed i try: document.body.style.transformOrigin = 'top left'; document.body.style.transform = 'scale(' + scale + ')'; but it's not correctly when page very long 回答1: This could help to disable zooming overall. <meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport'> 回答2: I use next code: const updateSizePrintPage = () => { let scale = 1

How to Print a document from iphone below ios version 4.2

守給你的承諾、 提交于 2019-12-13 03:58:49
问题 need your help. I am able to print a document from iphone having ios version 4.2 & above but what about ios below 4.2 like 3.2 or some other. For ios 4.2 there is a class named UIPrintIntractionController which smartly handles printing. But i wanted to do same for lower versions of ios. I have searched through net but found only apps that could print on ios 3.2 or other. Please help me out. Any kind of help is appreciable. Thanks In Advance. 回答1: I don't think that you will be able to print

print png image to Dymo Labelwriter 450 using Dymo.Label.Framework

回眸只為那壹抹淺笑 提交于 2019-12-13 03:55:21
问题 I'm trying to print a png image to my LabelWriter 450. I tried to combine the QR example found here (which does work): QR example and the answer by Adam to another question here: png example When I run this and click on print I get no errors but nothing happens. No js errors in Chrome console. This is what I have: HTML File: <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>DYMO: Image-code</title> <!-- JQuery --> <script src =

mike42/escpos-php UTF-8 no print Cyrillic

依然范特西╮ 提交于 2019-12-13 03:52:40
问题 I like to print Cyrillic on my XPRINTER XP-58 pos printer. I tried below code but it doens't print all the letters and if so it prints the print-out badly. This is what I got as a result of this code, but not all letters are missing: ---- Ѕ Ј К Љ Њ Ќ Ѓ --------- LETTERS If there is anyone with experience in this please help me. Thank you in advance, My code: public function index() { $data = ""; $data['test'] = array(['А Б В Г Д Ѓ Е Ж З Ѕ И Ј К Л Љ М Н Њ О П Р С Т Ќ У Ф Х Ц Ч Џ Ш']); $this-