Click here to Skip to main content
       

Windows API

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questiongetting data from virtual xps printer [modified]membermiladreisi24-Aug-12 10:09 
i want to create a virtual printer,then get data from virtual printer and process data
 
i use Passthrough XPS driver to get data in xps type
 
then i install redmon to redirect the virtual printer to my c# program
 
my c# program get data and save it in a file,but i can't open file with xps viewer
 
what is the problem?
 
this is my c# code
 
static void Main()
    {
        string fname = Environment.GetEnvironmentVariable("TEMP") + @"\";
        fname += "1.xps";
        FileStream fs = new FileStream(fname, FileMode.Create);
        StreamWriter sw = new StreamWriter(fs);
        StreamReader sr = new StreamReader(Console.OpenStandardInput());
        sw.Write(sr.ReadToEnd());
        sw.Flush();
        sw.Close();
        sr.Close();
    } 
thanks
 
edit: redmon simulate postscript,so it doesn't work with xps

modified 26-Aug-12 14:49pm.

AnswerRe: getting data from virtual xps printer PinmemberRichard Andrew x6424-Aug-12 10:19 
Wouldn't this question be better posted on the frogmorecs site? They know the product.

 

The difficult we do right away...
...the impossible takes slightly longer.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130617.1 | Last Updated 28 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid