/// <summary>
        /// Configures Printer Attributes
        /// </summary>
        /// <param name="printerName"></param>
        private void ConfigurePrinterAttributes(PrintQueue printQueue)
        {
            UpdateStatus(string.Format("Configuring Bidirectional Support for Printer {0}", printQueue.Name));
            PrintQueueController.ChangeAttributes(printQueue, PrintQueueAttributes.EnableBidi, _activityData.EnableBidi);

            UpdateStatus(string.Format("Configuring Print after Spooling for Printer {0}", printQueue.Name));
            PrintQueueController.ChangeAttributes(printQueue, PrintQueueAttributes.Queued, _activityData.PrintAfterSpooling);
        }
Exemple #2
0
        /// <summary>
        /// Sets up the printer as a share
        /// </summary>
        public void EnableSharedQueue()
        {
            using (LocalPrintServer server = new LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer))
            {
                using (PrintQueue queue = new PrintQueue(server, QueueName, PrintSystemDesiredAccess.AdministratePrinter))
                {
                    queue.ShareName = QueueName;
                    queue.Commit();

                    PrintQueueController.ChangeAttributes(queue, PrintQueueAttributes.Shared, true);
                }
            }
        }