Solved

visual studio 2010 vb + printdocument1

Posted on 2010-09-13
11
650 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
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!

 
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

Independent Software Vendors: 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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

710 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