tags:

views:

137

answers:

0

Ok, I've got a reaaally simple bit of code here which is meant to set the borderless property of the printer to .. well, borderless!

So I try and set it, but no matter how much I try, the imagable area is never the whole width of the page, and therefore I cannot size the picture correctly for the paper before printing.

I've tried with different paper sizes, types and methods of setting properties, but nothing. It just doesn't seem logical!

The printer is borderless capable, but doesn't seem to pick this up in the capabilties. Is this a bug? Maybe with the library or hardware? The supplied Kodak sofware prints to the edge ok.

        LocalPrintServer printServer = new LocalPrintServer();
        foreach (PrintQueue printerQueue in printServer.GetPrintQueues())
        {
            Console.WriteLine("Printer: " + printerQueue.FullName);

            printerQueue.UserPrintTicket.PageBorderless = PageBorderless.Borderless;
            printerQueue.Commit();
            // This shows with a page imagable area with an origin of bigger than 0
            PrintCapabilities cap = printerQueue.GetPrintCapabilities(printerQueue.UserPrintTicket);
            // This shows with a page imagable area with an origin of bigger than one
            cap = printerQueue.GetPrintCapabilities();

            printerQueue.UserPrintTicket.PageBorderless = PageBorderless.None;
            printerQueue.Commit();
            // This shows with a page imagable area with an origin of bigger than 0
            cap = printerQueue.GetPrintCapabilities(printerQueue.UserPrintTicket);
        }

        Console.ReadKey();

Also seems to work ok with GDI printing, may have to resort to that! So much for progress!

Andy suggestions most welcome!

Thanks in advance!