Solved

visual studio 2010 vb + printdocument1

Posted on 2010-09-13
11
635 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
WPF issue with Trigger 2 69
Paging GridView 7 34
Protecting vb6 & .Net code Obfuscation 18 55
Close word object 13 21
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now