PRINTING WITH VB6 OR JavaScript

Hi,
I am trying to print a pdf document through vb6. I am reading SDK for this purpose that I have downloaded from adobe but I DO NOT UNDERSTAND ANYTHING. The content is very brief and scrawled. There are no examples and many things are described with incomprehensible way ... VERY BAD DOCUMENTATION... and this is the reason that I came here...
I want to to do a simple job...
I want to print a pdf document. Some pages need to be print in tray 1 and other in tray 2 (this is not known in advance and is dynamically determined from a connection to database). I tried to read from SDK documentation but I did not take any conclusion...
Do not rush to draw conclusions because I am 10 yeas programmer with visual basic 6 and a couple of years with javascript.
The only solution that I want is in visual basic 6 or Acrobat Javascript (but I did not understand at all the tray selection...It was very poorly documented).
Also I thought, because tray selection in javascript was very poorly documented, to make 2 printers first with tray 1 and second with tray 2. With this I could alternately print without tray selection but even in this I could not find a good guide in SDK on how to specify a printer...
Thanks

Hi,
have a look at the printParams you can find in AcroJs help at: http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.ht m?&accessible=true
The IAC JSO presents the doc/this js object.
Attached the example, which prints to a specific printer using the printParams.
HTH, Reinhard
PrintToNamedPrinter.vbs
fileIn = "C:\Test.pdf"              '' state the full path of the file to open
set App = CreateObject("AcroExch.App")     '' start Adobe Acrobat
App.Show                           '' show Acrobat or comment out for hidden mode
set AVDoc = CreateObject("AcroExch.AVDoc") '' connect to Ac Viewer
AVDoc.Open fileIn,""              '' Open a file into viewer
set PDDoc = AVDoc.GetPDDoc             '' Get the Doc opened in the viewer
set JSO = PDDoc.GetJSObject            '' Connect to Acrobat JS
JSO.app.alert("Hi, file is open.Press Ok for printing")  '' Display a MsgBox
'//JSO.print("bUI","nStart","nEnd","bSilent","bShrinkToFit","bPrintAsImage","bReverse","bA nnot","bprintParams")
endPage = jso.numPages-1 ''nEnd zeroBased
set pp = JSO.getPrintParams()  ''contact print parameters
pp.printerName = "Kyocera FS-1700+"       ''set a printername
JSO.print False,0,endPage,False,True,False,False,True,pp   '' print with some options
JSO.closeDoc(True)       '' close the printed doc
App.CloseAllDocs           '' - or /and - close all docs
App.exit

Similar Messages

  • Acrobat 9 Pro-Is it possible to script Print with Preset?

    Hello,
    Does anyone know if this is possible? From what I understand, even if you create a batch to print, you have to set the print presets in Acrobat to how you want the PDFs to print. Sometimes we need duplexed pages, sometimes we need marks, etc. I can't imagine I'm the only one who has dealt with this, but I can't find any scripts that are even in the ball park.
    If anyone has a script available or can create a script to print with a preset or print with static settings, I will try modifying it to my needs.
    Thanks for any assistance with this.
    Danny

    The options availible for scripted print settings are all shown in the entry for "PrintParams" object in the Acrobat JavaScript Reference.  Have you looked to see if these options fit your needs?  If they do, and if the script can detect which PDF requires which options, then  you're in business.  But if the options you need are not there, then your only option is to set the batch process to display the print dialog for every PDF.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • Printing with presets

    Hello Community,
    i want to print from AI through a script. No problem so far, but always the windows standard printer is used. But i want to use another printer for some printings, or use other presets. There are several named printer presets defined in my AI, "Standard", "OKI_C_9500", "OKI_C_9650" and so on.
    After a search i found a solution to print with presets from Indesign, but not from Illustrator. In AI are no aceesible "PrinterPresets" like in Indesign.
    So how i can print with named presets from AI? Other solution could be just to change the active printer within the script for the actual printing.
    Best regards
    Torsten

    Hi,
    yes this is it. After i changed my Computer i lost the PDF "illustrator_scripting_reference_javascript". And in the "ExtendScript Toolkit" Folder it is just "JavaScript Tools Guide CS4" and "Adobe Intro to Scripting.
    Now i found the PDF´s again :-)
    Thanks a lot
    Torsten

  • Printing with JSF

    I've to scenario to Print a report from my web application which is displayed in the jsf data table. I've to print the report without using javascript. since I'm new to jsf.. could any one help me how to print the report using JSF?

    You can't. Printing is a client side action. Either the user has to press the print button of the browser himself or the webapp has to run some clientside code to invoke the print, e.g. Javascript. You can consider a signed applet, but this is more expensive and there are less clients on the world which has Java installed than the ones with Javascript.

  • How do I use a regular printer with my iPhone?

    How do I use a regular printer with my iPhone?

    you can't unless it's an AirPrint enabled printer or you purchase a 3rd party app like printopia.

  • How can I print with the black and white cartridge only?

    I am trying to print using the black and white cartridge only because magenta is out of ink but I'm getting the following error message in HP Photosmart C7200 series print dialog:
    The printer is out of ink.
    The following ink cartridges are empty: Magenta. Replace these ink cartridges to resume printing.
    How can I print with the black and white cartridge only?
    Mac OSX 10.7.3
    HP Photosmart C7280 (7200 series)
    This question was solved.
    View Solution.

    I am absolutely disgusted by this; clearly a scam from HP to make more money by selling extra ink cartridges!!  I will make sure to never buy any products from the shoddy rip off merchants at HP ever again!!
    You should be ashamed!!

  • Unable to print with my Canon PIXMA IP 4700 and JetDirect network appliance

    After many tries I decided to post my question.
    I have a Canon PIXMA IP 4700 connected to the network with a Jetdirect 175X box. So I tried to add a new printer with a "HP Jetdirect Socket" port. I have previously installed the driver from the official website. The test page is staying on the spooler.
    I also tried with LPD port (supported by the Jetdirect box) and IPP but nothing is working.
    When the printer is directly connected with USB, it's working fine. Printing from my others Windows computers is working fine too since many months.
    Thank your for your help.

    Hello and welcome to Apple Discussions.
    Your problem is being caused by the Canon driver. It cannot be used when the printer is connected to the USB port of a 3rd party print server, or if shared by Windows.
    The solution is to use a driver like Gutenprint or PrintFab. Gutenprint is preferred because it is free (it ships with OS X) however the iP4700 is not listed as a supported model. The iP4600 is listed so you could try selecting this model in the Print Using menu (shown as Canon PIXMA iP4600 - Gutenprint v5.2.3). If the iP4600 Gutenprint driver does not work that well then you could look at using [PrintFab|http://www.printfab.net] which does support the iP4700. It costs €49 but there is a 30 day trial so at least you can try it before committing to buying.
    Another option would be to use a Airport device, like the Express, instead of the Jetdirect print server. With the printer connected to its USB port you can then use the Canon iP4700 driver on the Mac.

  • How to print with HP Deskjet 2510 with Imac G5 on Tiger ?

    Hi Folks
    I desperately need some helping hand....
    Today my old trusty printer died (HP 1510 print/scan/ copy) and I ran to buy another one because I need to finish some tax paperwork.
    In a mad hurry, I didn't pay any attention to tech specs and I went home with brand new HP DeskJet 2510 All In One device. But !!! : ((
    In my home office I still use Imac G5 with 10.4.11 which is still pretty good comp for office work but I found out that the HP 2510 don't officially support my Imac with Tiger. Only from 10.6 and later.... I know that Imac G5 can't run nothing above 10.5.
    So, is there any way to "force" HP 2510 to somehow recognize my Imac G5? In "about my mac" on USB port, the HP 2510 is visible ....
    Many thanks in advance.
    Cheers,
    Sven

    So, is there any way to "force" HP 2510 to somehow recognize my Imac G5?
    You may be able to get it to print with something like this:
    http://gimp-print.sourceforge.net/MacOSX.php
    although i do not see taht modle on the "Supported Printers" page. You might look again.
    BUT that workabout does not support scanning, only printing.
    I think you need to return the printer and look to either Canon or Brother. Brother especially has been better about suporting older Mac OS versions but you'll still need to get a model number and search the maker's site BEFORE buying to see if they show older drivers for download.

  • Remote printing with iPad

    I have installed the HP Print app on the iPad and have no issues printing when I am on the local net work. When I try and print when I am not on the network I receive an error that states: "oops we cannot complete the print job please try again" and there is a retry or cancel selection. My printer is set up with an email address. I can print from my Samsung note 2 using the HP Print app with no issues either on the network or off. Any ideas?

    Have you tried the ePrint mobile app?
    http://h30434.www3.hp.com/t5/ePrint-Print-Apps-Mobile-Printing-and-ePrintCenter/How-to-Print-with-an...
    Although I am an HP employee, I am speaking for myself and not for HP.
    Twitter: @Ciara_B_HP

  • HT4356 My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    hi
    could you tell us what the other app is please

  • HP D110 AIO printer. Prints jam when printing with wireless, but not when hooked to USB cable! HELP!

    I have a HP D110. It jams the paper when I print with wireless, but not when I use USB cable. Any ideas?

    From what you describe you are having issues printing from MS Office. Have you had trouble printing from other resources on your computer (e.g. from the internet or another program)? The first thing I am going to suggest is that we start by uninstalling and reinstalling the printer from the resources available online. 
    First if you use a USB cord, make sure to remove it (this is important). Do not plug it back in until the software directs you to. Then go through the Devices and Printers, Programs and Features and Device Manager folders and insure that all copies, files, and programs related to the printer are removed. Then as directed, restart the computer. 
    In the START menu type "%temp%" and press ENTER. Here I want you to press Ctrl+A and hit DELETE. Some of the files will not allow you to delete them, skip those files and delete the majority that allows it. 
    http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3562006&lang=en&cc=us...
    Install that and let me know the result! 
    Have a great day!

  • How to connect my cannon mx470 series printer with bluetooth to my mini mac?

    how to connect my cannon mx470 series printer with Bluetooth to my mini mac

    Does the printer actually support BlueTooth? If the printer is wireless, then most likely it uses Wi-Fi. Did you read the user guide that came with it? Or contact Canon tech support at their website.

  • I have an airport extreme.  i am trying to connect a laptop with windows 7 to a wireless printer, with no luck.  any ideas?

    I have an airport extreme.  i am trying to connect a laptop with windows 7 to a wireless printer, with no luck.  any ideas?

    The problem is not the router.. the issue is the vpn has put your computer in a different IP range with a different gateway. When you turn off the vpn the computer returns to local lan and can print.
    Some vpn software allows you to set gateway to use local net instead of remote gateway or access to other webistes or local lan.
    Read up the issue.
    http://stevejenkins.com/blog/2010/01/using-the-local-default-gateway-with-a-wind ows-vpn-connection/
    Cisco vpn client..
    https://supportforums.cisco.com/thread/239113
    I did not search much.. just grabbed the first article I could find that explains the issue.
    The whole point of the vpn is whilst it is connected your computer is NOT part of the Local Lan .. it is part of the Remote LAN via the vpn tunnel.
    It is also a security risk using split tunnelling so often it will not be allowed.
    Plug the printer directly into the computer via usb or whatever.. Local connection will work.. not local lan.

  • Report printing with BI pubisher - 500 Internal server error

    Hi,
    I was having problems using BI publisher to print with. I thought we didn't have it at first, however since found we do have BI Publisher Enterprise edition.
    When I put the settings into APEX, reports don't display as expected. I get
    report error:
    ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.Now if I navigate to the URL in my web browser, http://[server]:[port]/xmlpserver/convert, I get a 500 - Internal Server Error page. The requets is definitely hitting something because if I change "convert" to say "convert1" then I get 404 (as expected). So it seems as if convert is found but then a problem occurs.
    If I navigate to just http://[server]:[port]/xmlpserver/ then I see the BI publisher enterprise login screen.
    Any ideas what might be causing this or what I could do to resovle it?
    Our APEX instance is on a unix box and BI on a M$ box if that matters (long story)?
    Thanks

    Ignacio Cobos wrote:
    Hello
    >
    > I get this error when i try to access to Bex Analyzer
    >
    > ERROR: URL used, "http://sesue:50300", is not fully qualified.
    > A fully-qualified URL has a schema with the format "<protocol>://server.company.com:<port>". URLs with the format "<protocol>://server:<port>" or "<protocol>://<ip address>:<port>" are not fully qualified.
    > See SAP Notes 581329 (Not possible to implement) , 596698 (Not possible to implement) and 654326 (Not yet released)
    >
    > Can anybody say me any idea how to solve the problem?
    >
    > Thanks in advance
    Dear Cobos, For FQDN related issues : Set profile param "icm/host_name_full" with corresponding FQDN via RZ10 transaction. Also check login/create_sso2_ticket & /accept_sso2_ticket parameters in the profile you have created.  Instead of "http://sesue:50300" you may to have the URL like "http://sesue.domain.com:50300//SAP/BW/BEX/". Please refer this #scn article for more details : http://goo.gl/QPlrx Similar Issues : http://goo.gl/mRCh0 Hope it helps. Thanks.

  • Printing with PSE 8 for Mac

    Hi,
    hope some of you may give me some help.
    Have tried to print with PSE 8 for Mac, but in the printing options there is none where i can choose the type of paper (ie: glossy, premium glossy....).
    My printer is an Epson Stylus Photo 1400.
    It works fine with iPhoto, here i can choose paper type. And prints come out fine.
    Thanks for any advice,
    dangerly

    My printer is a Canon so not entirely sure if this helps but when I print from PSE 8 I do not get to choose the media type until I have clicked on the print button in the PSE dialog box. I am then presented with the dialog box for my printer where I can set the media type amongs other attributes.
    It is normal for the media type to be the job of the printer driver so perhaps it is the same for your printer.
    Jim Graham

Maybe you are looking for

  • Playlists are not syncing correctly - music loaded on iPhone but not in playlists themselves.

    Spent the whole day trying to deal with this iOS5 update on my iPhone 4. It got bricked, I had to restore it, and then couldn't find the most recent backup that I had. So I had to rearrange and re-add all my apps and many photo albums. Anyway, now I'

  • Macbook pro usb not working

    Hello.  One (of the two) USB ports is not working.  Now what?  Please help.  Thanks.  :-) OSX 10.9.4

  • BAPI's  in ECC 6.0

    Hi,    What are the corresponding BAPI's for these transaction in ECC 6.0 MB1B MB1C VA01 F-02 F-30 Regards, Karthik.k

  • Material unit Price different in comp code curr and group currency

    In our case, there are two currencies : INR and USD. Material Ledger is active in our case. Material = Raw Material with price indicator 'V'. In the current period it is seen that the INR price and USD price in the material master shows different val

  • How is solman linked to r/3

    pls let me know ....for a E2E implementation project in which sol man is used, how solman is linked to migrate the data and configuration to r/3 landscape that is to development server (r/3 ) ,then to quality and finally to production. Basically how