COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Send PDF document to Printer In VB6

• Email
• Follow

I have a Visual Basic application that uses the Adobe Acrobat 6.0 SDK
to show PDF documents in the PDF Viewer control that Adobe supplies.  I
am not using the Adobe Acrobat 6.0 toolbar.  I am using one that I made
because I need to know if the user printed the document or not. I bring
up Microsoft's vbPrnDlg Print Dialog box, instead of the print dialog
box in the common dialog box control, so the user can select the
printer they would like to print the PDF document to.  Then using the
PrintPagesSilent adobe command, I print the document.

However, I have found the following problems:

Adobe never prints to the printer that the user selected.  It always
prints to the default printer.  Once I have printed to the default
printer once, Adobe will always print to that printer, no matter what
printer is selected or even if the default printer is changed.  The
only way to stop this from happening is to shut down the application
completely and restart it.  I have also tested exiting the PDF
application and deallocating it, as listed below, but that didn't work
either.

Call PDFApplication.Exit
Set PDFApplication = Nothing

I would like to do one of three things.

I, either, need the Adobe Acrobat SDK code that would allow me to
select the printer the user selected.

Or, I want an application or control that is $100 or less that will allow me to print the PDF document to the printer the user selected. Or, I need some code and/or a control/dll, that is$100 or less, that
can convert the PDF document to Post Script or something similar that
can then be directed to the selected printer.  I do not really want to
convert the PDF document to a word document, or to print the PDF
document through word, as is listed in another Google topic.  I would
like small, self-contained controls that I can easily put onto other
servers.  Also, I will need the code to convert the PDF document to
Post Script or something similar as well as the code to print the
document to the selected printer.

I really do not have the time to look into this further, as my time is
limited due to other projects.

Any help that anyone can give me would be much appreciated.

Thank you


 0

See related articles to this posting

> Or, .... $100 or less .... > Or, ....$100 or less ....

I would say, finally one fair offer in this forum.

First solution: If you controll it from outside (VB) let the user use
the Acrobat Print-Menue and ask Windows API if the User has printed
and - if you like - to which Printer and ....

My offer:
$50 or more to a welfare-organisation to get a Controll, which simplify this task dramatically. Second solution: Write 3 or 4 lines code, using JSO and AJS to print to every printer you like (Acobat 6 or higher needed). My offer:$ 50 or more to a welfare-organisation to get the links
$55 or more to a welfare-organisation for written basic code$ 60 or more to a welfare-organisation for written luxus code

Best regards, Reinhard

 0

Sorry,  my tax dollars already support welfare organizations.  Now,
maybe the right charities...


 0

However, .....

For the first solution, check Acrobat for printing, you can use the
AutoITX controll from Hiddensoft com. That will give you easy full
controll over windows and dialogs
It is a well known tool in the WSH/VBS community.

For the second solution, writing direct code, have a look at

and the usage of JSO

Something like
....
Set JSO = PDDoc.GetJSObject
var pp = JSO.getPrintParams();
pp.printerName = "hp officejet d series";
JSO.print(pp);
...

should work. But I don't can test ist because I work with Version 5.

HTH, Reinhard

 0

Thanks for your information.  I will look into these solutions.


 0

4 Replies
997 Views

Similar Articles

12/6/2013 1:03:03 AM
[PageSpeed]

Similar Artilces:

Two Document Classes in One Document?
Recently I wrote my CV using the document class moderncv. I wanted to add a cover letter which would naturally be written with the letter class. Is there a way to incorporate two classes in one document? In the end I used ghostscript to concatenate the two pdf documents into one. It's fine, and really I am just curious about the feasibility of two document classes in one document. I am new to this, so pardon me if this question is naive. Thanks, Sam On 2011-04-26 02:16, varphi wrote: > Recently I wrote my CV using the document class moderncv. I wanted to > add a cover letter which would naturally be written with the letter > class. Is there a way to incorporate two classes in one document? > > In the end I used ghostscript to concatenate the two pdf documents into > one. It's fine, and really I am just curious about the feasibility of > two document classes in one document. > > I am new to this, so pardon me if this question is naive. > > Thanks, > > Sam Not really, I would write the cover in a separate file (pdf) and include it with the pdfpages package -- /daleif DK-TUG president memoir and mh bundle maintainer Am

Javascript document location
I'm not very experienced with Javascript, and I'm trying to determin a current web page's path. If I use document.location, it returns http://domain.com/path/to/file I only want to see /path/to/file How do I do this? Graham said: > >I'm not very experienced with Javascript, and I'm trying to determin a >current web page's path. If I use document.location, it returns >http://domain.com/path/to/file >I only want to see /path/to/file > >How do I do this? document.location.pathname Graham wrote: > I'm not very experienced with Javascript

Confusion over Document Title
I printed a PowerPoint file named xxx.ppt to PDF using Acrobat 5.0 on a Mac; edited it including Inserting some definitely not ppt pages, etc, and eventually saved it as yyy.pdf. In a subsequent editing session in Acrobat 5.0 among other things I checked the "Display Document Title" box in the Open Options section of the Document Properties menu command. If I do this and later re-open the file in Reader or Acrobat the window title bar says "xxx.ppt", even though the document is now definitely named (and been Opened and Saved several times as) "yyy.pdf" (and "xxx.ppt" may no longer even exist). Unchecking the Display Document Title option makes the window have the right title. If this isn't a genuine bug, it certainly seems a confusing way for the program to behave, and to pose a threat of possibly distructive misunderstandings. AES/newspost wrote: > I printed a PowerPoint file named xxx.ppt to PDF using Acrobat 5.0 on a > Mac; edited it including Inserting some definitely not ppt pages, etc, > and eventually saved it as yyy.pdf. In a subsequent editing session in > Acrobat 5.0 among other things I checked

\enlargethispage in two-column document
As far as I can tell, \enlargethispage really means "enlarge this *column*": \documentclass[12pt,twocolumn]{article} \usepackage{lipsum} \begin{document} \enlargethispage{\baselineskip} \lipsum[1-5] \end{document} How can I automatically enlarge *all* columns on a page? My intention is to use atbegshi or everyshi or somesuch to do \AtBeginShipout{% \if<something> \enlargethispage{\baselineskip}% \fi } and not wind up with badger-legged columns as in my example above. Thanks, -- Scott On Thursday, June 7, 2012 10:26:23 PM UTC+1, pakin wrote: > As far as I can tell, \enlargethispage really means "enlarge this > *column*": >=20 > \documentclass[12pt,twocolumn]{article} > \usepackage{lipsum} > \begin{document} > \enlargethispage{\baselineskip} > \lipsum[1-5] > \end{document} >=20 > How can I automatically enlarge *all* columns on a page? My intention > is to use atbegshi or everyshi or somesuch to do >=20 > \AtBeginShipout{% > \if<something> > \enlargethispage

macro system and document settings
Hi All! I'm looking for a way to set the system and document settings to a standard preset. Is this possible to do this with a macro and (even better) do you have an example? (I don't want to use a template!) Regards, Gerard If I understand you correctly, you are wanting to set the document settings every time you start a new document. The system settings don't need to be changed every document cause they don't change document to document. If this is the case, you can download "Copy Document Options" from http://swtools.cad.de/download.htm . This is simply an Excel document. It copies all of the settings from the active document. You then bring another document to the active window and apply these settings to it. To get it to keep a "standard" document setting that you like, simply setup a documents like you want it, copy the options using the appropriate tab of the "Copy Document Options", and save it to a new Excel filename. Then, in future documents, all you have to do is open this Excel file and press a button to change all of the settings to the settings saved in the Excel file. It will also copy and apply system

Missing \begin{document}?
I've been using LaTeX for some 25 years, and I've had my share of frustration, but this takes the cake. I couldn't get my LaTeX file to "compile," so I tried stripping out stuff until I got down to this minimal LaTeX file: \documentclass[]{article} \title{This is the Title} \author{Arthur A. Author} \begin{document} \maketitle \begin{abstract} This is the abstract. \end{abstract} \section{Introduction} This is the Introduction. \end{document} When I try to compile it, I get this: prompt> latex test This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./test.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.1 =EF=BF=BD =EF=BF=BD=EF

diffing LaTeX document
Dear all, I wonder whether someone knows about any LaTeX package capable to diff "nicely" two different versions of the same document maintained by cvs? Sincerely, Patrick <<< On Sep 28, Scott Pakin wrote >>> > Patrick Guio wrote: >> I wonder whether someone knows about any LaTeX package capable to diff >> "nicely" two different versions of the same document maintained by cvs? > > I haven't tried any of these suggestions myself but take a look at > http://www.tex.ac.uk/cgi-bin/texfaq2html?label=changebars > > -- Scott > Also have a look at the latexdiff script. It works pretty well for text, but sometimes creates problem for display math enviroments. http://www.ctan.org/tex-archive/support/latexdiff/ -- Aditya Mahajan Patrick Guio wrote: > I wonder whether someone knows about any LaTeX package capable to diff > "nicely" two different versions of the same document maintained by cvs? I haven't tried any of these suggestions myself but take a look at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=changebars -- Scott Aditya Mahajan <adityam@operamail.com> writes

onecolumn formula in a twocolumn document
. The problem is, it is really a long document of about 300 pages and I make use of many features of the book class. I would be really happy if somebody has a solution that is compatible with that. Jens -- Jens Bredenbeck Physikalisch Chemisches Institut Universit�t Z�rich Winterthurerstr. 190 CH-8057 Z�rich Switzerland Tel: ++41/1/63 54486 (office) ++41/1/63 54484 (lab) Fax: ++41/1/63 56838 www: http://www.unizh.ch/pci/personalpages/bredenbeck/index.htm Ralf Stubner <ralf.stubner@physik.uni-erlangen.de> writes: >Jens Bredenbeck <j.bredenbeck@pci.unizh.ch> writes