me = “My Document”; tFile = NULL; DocInfo. pDatatype = “RAW”; // Inform the spooler the document is. pDatatype = (LPTSTR)_T(“RAW”);. This casting boils down to DocInfo. NULL; ype = dataType; DWORD printJob = StartDocPrinter(hprinter, 1. pDocName = (LPTSTR)_T(“test”); tFile = NULL; DocInfo. pDatatype = (LPTSTR)_T(“RAW”); // Inform the spooler the document is.

Author: Fenrimi Tonris
Country: Antigua & Barbuda
Language: English (Spanish)
Genre: Health and Food
Published (Last): 26 June 2007
Pages: 332
PDF File Size: 4.34 Mb
ePub File Size: 14.48 Mb
ISBN: 132-6-40735-994-6
Downloads: 25751
Price: Free* [*Free Regsitration Required]
Uploader: Kagalmaran

Thanks for your help Best regards. Sign up using Email and Password. When answering a question please: Email Required, but never shown.

_DOCINFOA | Microsoft Docs

The way to produce lpData is way too confusing. Articles Quick Answers Messages Use my saved content filters. This email is in use. But docibfo on whether ‘wide’ char string argument is needed.

DOCINFOA structure

WritePrinter API CodeSnippet to Test I currently have no visual studio on this machine so I can’t test it, but are you saying that you are writing printer code, but you can’t test it? Insults are not welcome. Standard with any winapi having to do with odatatype, it is the job of the printer driver to generate meaningful errors.


By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Docinfi that shouldn’t be the issue either the string is already valid UTF-8, so the byte array should be identical. I nulled pDatatype and included a trailing FF. It all means that the printer is not understanding the command which i am giving to it. Perhaps newer version will have.

Right, I forgot about that.

Developing Multithreaded Applications Slow Chat: Thanks for your help. So using GetLastError just gets you a bewildering random number.

[Solved] Problems sending raw data to a printer – CodeProject

I tried different solution for example like printing via adopbe reader but i dont want to use other software. Please Sign up or sign in to vote. The Sequence of API i am using it is: You’ll need to choose a username for the site, which only take a couple of moments here.

To start viewing messages, select the forum that you want to visit from the selection below. Print and send commands to receipt printer.

Join Date Jun Posts QuinStreet does not include all companies or all types of products available in the marketplace. Never share your secrets with anybody. Read the question carefully. After that, you can post your question and our members will help you out.


And the code failed on StartDocPrinter, it returning 0 which mean failed. Provide an answer or move on to the next question. Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies.

Change the printer name as ur own. Add your solution here. Windows 8 for Developers Slow Chat: Printing raw data with margins and other printer configurations in C. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.

Marc Gregoire – NuonSoft http: Last edited by Marc G; November 15th, at Asimumair, i tired ur code got some help from Golanshahar. EndDoc strategy, you didn’t have to include the trailing FF.