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
Solved

visual studio 2010 vb + printdocument1

Posted on 2010-09-13
11
644 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

789 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