PC Review


Reply
Thread Tools Rate Thread

Changing Default Printer Settings

 
 
Rick R
Guest
Posts: n/a
 
      13th Jul 2004
We need to change the paper size for the default printer before printing a
PDF file from within a VB.Net application.

printDocument printerSettings is not appropriate as there is no document to
print.

Any help is greately appreciated.


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      13th Jul 2004
* "Rick R" <(E-Mail Removed)> scripsit:
> We need to change the paper size for the default printer before printing a
> PDF file from within a VB.Net application.


How do you print that file?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Rick
Guest
Posts: n/a
 
      14th Jul 2004
The file is printed using an Adobe Actobat control dimmed in code. Here is
the snippet.

CType(avDoc, Acrobat.CAcroAVDoc).Open(strFileName, "")

pdDoc = CType(avDoc, Acrobat.CAcroAVDoc).GetPDDoc

nbrPages = CType(pdDoc, Acrobat.CAcroPDDoc).GetNumPages()

CType(avDoc, Acrobat.CAcroAVDoc).PrintPages(0, nbrPages - 1, 1, 1, 1)

CType(avDoc, Acrobat.CAcroAVDoc).Close(0)



"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * "Rick R" <(E-Mail Removed)> scripsit:
> > We need to change the paper size for the default printer before printing

a
> > PDF file from within a VB.Net application.

>
> How do you print that file?
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



 
Reply With Quote
 
Rick R
Guest
Posts: n/a
 
      16th Jul 2004
Herfried.

Still looking for help setting paper size on a printer. I can zap a byte
in the DevMode reg key for the printer but that's a real hack.

I can set the default printer using ManagementObject and
InvokeMethod("SetDefaultPrinter") to set the printer I wish. However, I
cannot find a way via ManagementObject to set paper size.

Thanks again for any help on this.

"Rick R" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> We need to change the paper size for the default printer before printing a
> PDF file from within a VB.Net application.
>
> printDocument printerSettings is not appropriate as there is no document

to
> print.
>
> Any help is greately appreciated.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with printer paper source keeps changing back to default settings Chris Windows XP General 2 10th Apr 2011 07:04 AM
Changing settings so no Default Printer CMS Windows XP Print / Fax 1 25th Jan 2004 12:02 AM
Default printer settings changing Fred Microsoft Windows 2000 Printing 1 6th Jan 2004 06:38 PM
Changing printer settings Paul E Collins Microsoft C# .NET 0 11th Dec 2003 07:24 PM
Changing default printer settings automaticaly Abine Microsoft Windows 2000 Printing 0 26th Nov 2003 03:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:46 AM.