Beispiel #1
0
        internal static bool StartDoc(GraphicsPrinter gr, string doc_name, string output_file)
        {
            DOCINFO doc = (DOCINFO)doc_info[gr.Hdc];

            doc.title = doc_name;
            return(true);
        }
        internal static bool EndDoc(GraphicsPrinter gr)
        {
            int ret = Win32EndDoc(gr.Hdc);

            Win32DeleteDC(gr.Hdc);
            gr.Graphics.Dispose();
            return((ret > 0) ? true : false);
        }
        internal static bool StartDoc(GraphicsPrinter gr, string doc_name, string output_file)
        {
            DOCINFO di = new DOCINFO();
            int     ret;

            di.cbSize       = Marshal.SizeOf(di);
            di.lpszDocName  = Marshal.StringToHGlobalUni(doc_name);
            di.lpszOutput   = IntPtr.Zero;
            di.lpszDatatype = IntPtr.Zero;
            di.fwType       = 0;

            ret = Win32StartDoc(gr.Hdc, ref di);
            Marshal.FreeHGlobal(di.lpszDocName);
            return((ret > 0) ? true : false);
        }
Beispiel #4
0
        internal static bool EndDoc(GraphicsPrinter gr)
        {
            DOCINFO doc = (DOCINFO)doc_info[gr.Hdc];

            gr.Graphics.Dispose();              // Dispose object to force surface finish

            IntPtr options;
            int    options_count = GetCupsOptions(doc.settings, doc.default_page_settings, out options);

            cupsPrintFile(doc.settings.PrinterName, doc.filename, doc.title, options_count, options);
            cupsFreeOptions(options_count, options);
            doc_info.Remove(gr.Hdc);
            if (tmpfile != null)
            {
                try { File.Delete(tmpfile); }
                catch { }
            }
            return(true);
        }
Beispiel #5
0
 internal abstract bool StartPage(GraphicsPrinter gr);
Beispiel #6
0
 internal abstract bool StartDoc(GraphicsPrinter gr, string doc_name, string output_file);
Beispiel #7
0
		internal static bool EndPage (GraphicsPrinter gr)
		{
			int ret = Win32EndPage (gr.Hdc);
			return (ret > 0) ? true : false;
		}
Beispiel #8
0
		internal override bool EndDoc (GraphicsPrinter gr)
		{
			return PrintingServicesWin32.EndDoc (gr);
		}
Beispiel #9
0
 internal static bool EndPage(GraphicsPrinter gr)
 {
     Gdip.GdipGetPostScriptSavePage(gr.Hdc);
     return(true);
 }
Beispiel #10
0
 internal override bool StartDoc(GraphicsPrinter gr, string doc_name, string output_file)
 {
     return(PrintingServicesUnix.StartDoc(gr, doc_name, output_file));
 }
Beispiel #11
0
		internal static bool EndPage (GraphicsPrinter gr)
		{
			GdipGetPostScriptSavePage (gr.Hdc);
			return true;
		}
Beispiel #12
0
		internal static bool StartPage (GraphicsPrinter gr)
		{
			return true;
		}
Beispiel #13
0
		internal static bool EndDoc (GraphicsPrinter gr)
		{
			DOCINFO doc = (DOCINFO) doc_info[gr.Hdc];

			gr.Graphics.Dispose (); // Dispose object to force surface finish
			
			IntPtr options;
			int options_count = GetCupsOptions (doc.settings, doc.default_page_settings, out options);

			cupsPrintFile (doc.settings.PrinterName, doc.filename, doc.title, options_count, options);
			cupsFreeOptions (options_count, options);
			doc_info.Remove (gr.Hdc);
			if (tmpfile != null) {
				try { File.Delete (tmpfile); }
				catch { }
			}
			return true;
		}
Beispiel #14
0
		internal static bool StartDoc (GraphicsPrinter gr, string doc_name, string output_file)
		{
			DOCINFO doc = (DOCINFO) doc_info[gr.Hdc];
			doc.title = doc_name;
			return true;
		}
Beispiel #15
0
		internal override bool EndPage (GraphicsPrinter gr)
		{
			return PrintingServicesUnix.EndPage (gr);
		}
Beispiel #16
0
		internal override bool StartDoc (GraphicsPrinter gr, string doc_name, string output_file)
		{
			return PrintingServicesUnix.StartDoc (gr, doc_name, output_file);
		}
Beispiel #17
0
		internal override bool StartPage (GraphicsPrinter gr)
		{
			return PrintingServicesWin32.StartPage (gr);
		}
Beispiel #18
0
 internal abstract bool EndPage(GraphicsPrinter gr);
Beispiel #19
0
 internal abstract bool EndDoc(GraphicsPrinter gr);
        internal static bool EndPage(GraphicsPrinter gr)
        {
            int ret = Win32EndPage(gr.Hdc);

            return((ret > 0) ? true : false);
        }
Beispiel #21
0
 internal override bool EndPage(GraphicsPrinter gr)
 {
     return(PrintingServicesUnix.EndPage(gr));
 }
		internal abstract bool StartDoc (GraphicsPrinter gr, string doc_name, string output_file);
Beispiel #23
0
 internal static bool StartPage(GraphicsPrinter gr)
 {
     return(true);
 }
		internal abstract bool EndPage (GraphicsPrinter gr);
 internal override bool EndDoc(GraphicsPrinter gr)
 {
     return(PrintingServicesWin32.EndDoc(gr));
 }
Beispiel #26
0
		internal static bool EndDoc (GraphicsPrinter gr)
		{
			int ret = Win32EndDoc (gr.Hdc);
			Win32DeleteDC (gr.Hdc);
			gr.Graphics.Dispose ();
			return (ret > 0) ? true : false;
		}
		internal abstract bool StartPage (GraphicsPrinter gr);
 internal override bool StartPage(GraphicsPrinter gr)
 {
     return(PrintingServicesWin32.StartPage(gr));
 }
		internal abstract bool EndDoc (GraphicsPrinter gr);
Beispiel #30
0
		internal static bool StartDoc (GraphicsPrinter gr, string doc_name, string output_file)
		{
			DOCINFO di = new DOCINFO ();
			int ret;

			di.cbSize = Marshal.SizeOf (di);
  			di.lpszDocName = Marshal.StringToHGlobalUni (doc_name);
  			di.lpszOutput = IntPtr.Zero;
  			di.lpszDatatype = IntPtr.Zero;
  			di.fwType = 0;

  			ret = Win32StartDoc (gr.Hdc, ref di);
			Marshal.FreeHGlobal (di.lpszDocName);
			return (ret > 0) ? true : false;
		}