Yeah, I know it's a loosing battle with techies! :)

But I just want to try to protect against 60% to 80% of most people.

The average home user may have PDF generation or Office 2003 or greater. Or
PaperPort based on what they have installed. And I would at least like to
prevent the majority of the people from being able to print our output over
and over again.

I know that there will be some people that will have several other
mechanisms that will allow them to get past out protection, but we can't
avoid that.

We can't even really stop people from making color copies of our printouts.
Some of the new scanners and printers are sooooo good that all formes of
copy protection are starting to fail.

But again most people won't have access to those types of scanners and
printers.

We are currently protecting against printing to a file (When properly
supported) and we protect against using a driver that has PDF, etc. in the
printer name. Maybe that's the best we can do for now.

Microsoft, here is a request: Please provide a way for the developers to
know more about the printers. Help us to be able to place limits on what
types of printers can be used.

If anyone else has any ideas I'd appreciate your help. Worst case I will
just use the printer name and know that some people will get through.

Thanks in advance.

Mike Collins

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Ritchie
Sent: Monday, January 22, 2007 1:30 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] PrinterSettings.OutputPort in C#

What about printers that are configured to print to "FILE:"?  Those files
may easily be convertible/viewable...  Or, network printers that don't
need to be associated with a logical printer port, or the port is
something like "BRN_123414" or "\\servername\printersharename\"...

You might be able do something with PrinterSettings.GetHdevmode(); but, I
think you're waging a losing battle...

On Mon, 22 Jan 2007 12:30:53 -0700, MIke Collins <[EMAIL PROTECTED]>
wrote:

>I need to find a way to gain access to the name of the printer port when
>trying to print.
>
>What I am trying to do is make sure that the user does not print to an
>electronic format. For example PDF, Microsoft Office Image Writer,
>PaperPort, etc. I only want the user to be able to print directly to a
>physical printer.
>
>It is possible for the user to change the name of the printer. For example
>the default name for the Adobe PDF printer is "Adobe PDF" but this name
can
>be changed by the user to something like "Adobe P.D.F." This would prevent
>me from being able to halt printing based on the printer name.
>
>BUT!! The PrinterSettings.OutputPort (Which is not public) can not be
>changed as easily. I would like to be able to get that value so I can
check
>that to make sure that the user is not printing to PDF, etc.
>
>Does anyone have any clues??
>
>Thanks,
>Mike
>
>Here is a small code snipet:
>        PrintDocument pd = new PrintDocument();
>
>        while( true )
>        {
>                PrintDialog dlg = new PrintDialog();
>                dlg.PrinterSettings = pd.PrinterSettings;
>                dlg.AllowCurrentPage = false;
>                dlg.AllowSelection = false;
>                dlg.AllowSomePages = false;
>                dlg.AllowPrintToFile = false;
>                dlg.PrinterSettings.Copies = 1;
>                dlg.PrinterSettings.DefaultPageSettings.Landscape = true;
>                dlg.UseEXDialog = false;
>
>                if( dlg.ShowDialog() == DialogResult.OK )
>                {
>                        // Here we check to see if the user is attempting
to
>print
>                        // to a printer that we won't accept. (PDF, etc.)
>                        string temp =
>pd.PrinterSettings.PrinterName.ToLower();
>                        if( temp.IndexOf( "pdf" ) > -1 ||
>                            temp.IndexOf( "image writer" ) > -1 ||
>                            temp.IndexOf( "paperport" ) > -1 )
>                        {
>                                MessageBox.Show( "Invalid printer type.
>Please select a different printer." );
>                        }
>

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to