Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

visual studio 2010 vb + printdocument1

Posted on 2010-09-13
11
Medium Priority
?
675 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

972 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