Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. getting data from virtual xps printer

getting data from virtual xps printer

Scheduled Pinned Locked Moved Windows API
questioncsharpdatabasecomhelp
2 Posts 2 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    miladreisi
    wrote on last edited by
    #1

    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

    Richard Andrew x64R 1 Reply Last reply
    0
    • M miladreisi

      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

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups