Solved

visual studio 2010 vb + printdocument1

Posted on 2010-09-13
11
646 Views
Last Modified: 2012-05-10
I have chosen my printer i want to print to.  It is a pdf creator.  You send to it and it comes out PDF.

I have a postscript document that I sent to the printer and it sits there with status of spooling.

Is there a command i need to send to printer to:  Below is the code I wrote.



Function myPrintDocument(ByVal myDocument As String)
        On Error Resume Next
        Me.PrintDocument1.DefaultPageSettings.PrinterSettings.PrinterName = "ScanSoft PDF Create!"
        Me.PrintDocument1.DefaultPageSettings.PrinterSettings.PrintFileName = myDocument
        Me.PrintDocument1.DefaultPageSettings.PrinterSettings.PrintToFile = True
        Me.PrintDocument1.Print()
    End Function

0
Comment
Question by:mphillip85
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33664781
The Print method should spool the job to the printer, and the PDF creator should handle writing to the file, so I don't believe that you need PrintToFile = True.
0
 

Author Comment

by:mphillip85
ID: 33665075
it stays in spool status.  any idea?  wont print.  its a pure postscript printed file that i want to push through to print through the pdf printer creator and it just sits there spooling.
0
 

Author Comment

by:mphillip85
ID: 33665315
how can i take a postscript file and print it out?  I manually chose to print with the scan pdf creator and it did not take the postscript commands in the file and make a document with lines and forms and wording.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 96

Expert Comment

by:Bob Learned
ID: 33667170
If you have a Postscript file, and you need to print it with a printer that understand Postscript commands, then you can set the PrintToFile = True, and the PrintFileName.  I don't understand what the PDF Creator is for, unless you are trying to create a .pdf file from the Postscript file.
0
 

Author Comment

by:mphillip85
ID: 33668517
now i get the print queue stuck in the printing state instead of spooling.
what should i do?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33672827
Is there a problem with the Postscript file?  Can you print this file manually?
0
 

Author Comment

by:mphillip85
ID: 33676973
what steps do you suggest for me to process this manually?

thank you.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33682118
You should be able to open the .ps file in your browser, and print from there.
0
 

Author Comment

by:mphillip85
ID: 33687523
i am not able to.  The .PS extension is not recognized.  I do not have anythiing other than MS office to open the file.  I do not have special tools, patches, updates that would assist to open this file.

0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 33690848
Try downloading, and installing Ghostscript, Ghostview:

Ghostscript, Ghostview and GSview
http://pages.cs.wisc.edu/~ghost/

GSPRINT uses Ghostscript to print a .ps file to a Windows printer

GSPRINT - Ghostscript print to Windows printer
http://pages.cs.wisc.edu/~ghost/gsview/gsprint.htm
0
 

Author Closing Comment

by:mphillip85
ID: 33697436
this helps with what i need to do.  I did not want to install anything extra, but i guess i have no choice.
Thank You.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question