I am currently writing a service that will run once per day, retrieve data from a SQL database, and print some reports.
Here is the problem:
I have an xml config file which contains a report code (eg RPT001) and the printer it is to print to. This means that in future if I want to, I can simply change the printer name without too much disruption and the reports will be redirected elsewhere.
However, I am unable to set the printer name so that the report gets printed out. When I use :
// If we have specified a printer name print to this one otherwise the
A call to pd.PrinterSettings.IsValid, always returns false.
I have been looking into the PrintingPermissions topic, however I am unable to find a proper clear sample of how to use it so that I can grant access to my code to be able to print across the network.
The printers are connected to a central print server, however specifying "\\servername\printer" doesnt seem to work either.
To complete the picture, the code which performs the printing is in its own DLL and the service references this DLL.
What changes need to be made and where to get this to work?
I think its a great thing, whoever messes with my msgs is going to be real bored.
Even those who dont trust meta, like myself, if the gains translate into an improved communication, easiness, everyone will use it.
The alternative is not use Meta Whatsapp since they will AI your msgs an resume it anyways
The so called tri-fold phone is not a phone just like today's so called smartphones are not phones.
They are computing camera devices with the ability to make and receive phone calls. For many the phone app is among the least used apps on these so called smartphones.
Backpack Hero and Figment are free to claim on the Epic Games Store by Pulasthi Ariyasinghe
The Epic Games Store has just refreshed its weekly giveaways promotion, and there are two games up for grabs this time. Replacing the Sable freebie from last week, Backpack Hero and Figment have now landed for all PC gamers to claim. As always, you have seven days to add the latest indie game permanently to your Epic Games Store library.
From the double giveaway, Backpack Hero comes in from indie developer Jaspel, offering a unique inventory management roguelike experience. Aside from collecting items to maximize the potential of a run, like with other roguelikes, here, your placement of the item in the backpack also matters. Each run offers randomly generated dungeons, enemies, and loot to grab.
Next, Figment lands from Bedtime Digital Games. This isometric perspective action adventure game takes place in a surreal landscape with hand-drawn artwork, and everything is taking place inside a mind. You take the role of Dusty, the former voice of courage in the mind. The musical adventure involves trying to return Dusty to his old self while also helping the mind beat back its nightmares and restoring its original purpose.
The Figment and Backpack Hero giveaways on the Epic Games Store are now active, and they will last until July 10. When not on sale, both games come in at $19.99 to purchase, but PC gamers can add the duo to their library for no cost during the seven-day timeframe.
When the giveaways refresh next week, Epic Games plans on giving away two more games: the next musical adventure, Figment 2: Creed Valley, as well as the classic arcade-inspired shoot’em up Sky Racket.
Question
ramesees
Hi all
I am currently writing a service that will run once per day, retrieve data from a SQL database, and print some reports.
Here is the problem:
I have an xml config file which contains a report code (eg RPT001) and the printer it is to print to. This means that in future if I want to, I can simply change the printer name without too much disruption and the reports will be redirected elsewhere.
However, I am unable to set the printer name so that the report gets printed out. When I use :
// If we have specified a printer name print to this one otherwise the
// default printer will be used
if (_printerName != "")
{
pd.PrinterSettings.PrinterName = String.Format("{0}", _printerName);
}
A call to pd.PrinterSettings.IsValid, always returns false.
I have been looking into the PrintingPermissions topic, however I am unable to find a proper clear sample of how to use it so that I can grant access to my code to be able to print across the network.
The printers are connected to a central print server, however specifying "\\servername\printer" doesnt seem to work either.
To complete the picture, the code which performs the printing is in its own DLL and the service references this DLL.
What changes need to be made and where to get this to work?
Any and all help is very much appreciated :D
Link to comment
https://www.neowin.net/forum/topic/613622-printing-across-a-network-using-c/Share on other sites
16 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now