Printing solo PDFs via .BAT file

Hi all,
We have a current implementation of Oracle Documaker for our LOB. What we do is run a .BAT file that runs the GEN* brothers (gentnw32, gendaw32, and genptw32). This then uses the XML defined in the DATA segment of the fsisys INI file. This prints out multiple PDFs for us depending on the contents of the XML.
We have a new requirement that states that we need to be able to print a solo PDF using an XML file that is found in a different directory, with a different file name, say invoice1085.xml. Is there a way to do this? I cannot edit the current setup of the workspace since the batch process needs to stay.
We are using Documaker Studio Version 12.2.0.21451 Build Aug 8 2013. The workspace however was created with an older version (uses an MRL files rather than an ODBC connection)

Hi,
I need to pass the extract file name to the GEN Programs via JAVA. Also, my batch file only has the lines:
SET BASEDIR=%cd%
CD %BASEDIR%\DATA
Echo Y|Del *.* >NUL
cd..
gendaw32 /ini=fsiuser.ini
genptw32 /ini=fsiuser.ini
pause
del .\print\_*.pdf
del .\print\.pdf
pause
:Exit
Or
echo
gentnw32
pause
gendaw32
pause
genptw32
pause
I'm sorry. I'm not very familiar with creating .BAT files or executables. Would "set MYEXTRACT=%1" replace the "ExtrFile           = INPUT\extrfile.xml" line in my fsisys.ini file? Or will it only stick for the current run? Thanks a lot. I'll try experimenting with your suggestion.
EDIT: I got it to work using your suggestion but instead of using "Extract = ~GETENV MYEXTRACT", I used "ExtrFile           = ~GETENV MYEXTRACT". Thanks a bunch!

Similar Messages

  • Is it poosible to print a pdf or any file through Oracle.

    Is it possible to print a pdf or any file through Oracle,
    Regards,
    AgrawalV

    hi,
    Not sure about .pdf file but any other file which you can easily see content of file in Oracle Database then you can you use spool option and create txt file and print them.
    sql>set heading off
    sql>set echo off
    sql>set feedback off
    sql>spool d:\print.txt
    sql>your_file_statement;
    sql>spool offregards
    Taj

  • Printing a PDF via Acrobat Javascript

    Hi -
    I have a need to print a PDF programmatically, via Javascript.  The PDF is embedded in a Web page.  I use postMessage to communicate with the PDF.
    I've created a simple HTML page with an embedded PDF, and a Javascript link to call my "Print" function. Here's a code snippet:
    <body>
             <a href="javascript:doPrint();">Print</a>
             <object id="PDFObj" data="testPDF.pdf" type="application/pdf" width="400" height="400" />     
    </body>
    In the HTML document's HEAD, I've added the following Javascript which posts the message to the PDF:
    <script language="JavaScript">
            function doPrint() {
                pdfObject = document.getElementById("PDFObj");
                alert("Hello from Javascript...");
                pdfObject.postMessage(["Print", "Print"]);
    </script>
    Finally, I've added an Acrobat Javascript function in the PDF document to listen for the postMessage event:
    function myOnMessage(aMessage)
        app.alert("Hello from the PDF");
           // print routines here
    var msgHandlerObject = new Object();
    msgHandlerObject.onMessage = myOnMessage;
    msgHandlerObject.onError = myOnError;
    msgHandlerObject.onDisclose = myOnDisclose;
    function myOnDisclose(cURL,cDocumentURL)
    return true;
    function myOnError(error, aMessage)
    app.alert(error);
    this.hostContainer.messageHandler = msgHandlerObject;
    Here's my problem: when I test this code and click the HREF Javascript link, I see "Hello from Javascript..." and "Hello from the PDF," so I know the postMessage event is working.  However, I've tried every print command I know in the myOnMessage function, and nothing seems to work:
    app.execMenuItem("Print"); // doesn't seem to work
    this.print(); // doesn't seem to work, even when I pass in all the params, etc
    I've also tried getting print params and passing those in, nothing seems to work.  Am I missing something?  Environement is Acrobat 9 Pro, browser's tested include Chrome 2.0, IE6.  I've attached two files, the HTML bit and the PDF I'm trying to print.  Any help is greatly appreciated!

    You have to be careful when using the ActiveX control to communicate with system functions like printing.  Because it can be embedded in anything that supports ActiveX, some functionality is limited from being called from JavaScript as it may interfere with the host application.
    Check out the IAC API Reference (also included with the SDK) and the methods under AxAcroPDFLib.AxAcroPDF.  There are some print functions in there (like PrintAll) that you can call on the ActiveX control directly, as in from your doPrint() method in your HTML page without using the hostContainer.  You would basically just call:
    pdfObject = document.getElementById("PDFObj");
    pdfObject.PrintAll();
    These methods were designed specifically to work with the ActiveX control when embedded in a host application, and can be used to print a PDF embedded in a web page.

  • Print to PDF and specify file name.

    Hardware/Software Details:
    MacBook 2GHz Intel Core 2 Duo
    OS 10.5.5
    Adobe Acrobat Professional 8.1.2
    Hey all,
    I'm a teacher and I've been scripting PDFs for use as marking sheets for assignments. What I'm trying to achieve is a situation where I tick all the boxes, marks are calculated and comments filled-in using my form fields (which all work fine) and then produce a PDF from that file with the student's name as the new file name (which is where I'm stuck!).
    In the past, I've had a button that on mouseOver brings the field with the student's name into focus, mouseDown evoked the File:Copy menuItem (copying the student name to the system's clipboard) and then mouseUp which triggered File:Print from which I would choose 'Adobe PDF 8.0' as the printer, hit Save, paste the student's name as the file name and choose the appropriate directory.
    File:Copy is no longer a "safe" menu item according to the latest versions of Acrobat, so I'm having to manually copy the name which is complicating the process further.
    I'm working on a script activated by the mouseUp of a button in this PDF which is currently looking like this:
    >var pp = this.getPrintParams();
    // format name to remove spaces and commas
    var studName = this.getField("Name").value.split(",").join("_").split(" ").join("");
    pp.interactive = pp.constants.interactionLevel.silent;
    pp.printerName = "";
    pp.fileName = studentName + ".ps";
    this.print(pp);
    Although the console will list 'AdobePDF8' as one of my printers, I've since discovered that "the destination printer cannot be set through this property in Mac OS" :( . I can set it as my default printer to work around it, but I still can't dictate the name of the new file. So, I've resorted to printing to PostScript with the aim of running them all as a batch through the AdobePDF8 printer later, except there's still a few problems.
    The name of the PostScript file won't work when I try to include the value of another variable (var studentName)
    The fonts in the PostScript files that it does produce get substituted with Courier and look terrible
    Both the API Reference and the Developer Guide seem to indicate that you can print to a file rather than a printer, but both only seem to mention PostScript file using this method.
    Is there another way to do this? If not, is there a solution to the two problems I mentioned?
    Cheers,
    Chris

    Ok, I've pursued the SaveAs method (as George suggested) with moderate success with the following code (secure function names have been changed ;) ):
    config.js file script:
    >myTrustedSaveAs = app.trustedFunction( function ( doc, studName )
    app.beginPriv();
    doc.saveAs({
    cPath: studName,
    bCopy: true,
    bPromptToOverwrite: true
    app.endPriv();
    myTrustedOpenDoc = app.trustedFunction( function ( path )
    app.beginPriv();
    app.openDoc({
    cPath: path
    app.endPriv();
    Button's onMouseUp script:
    >// get student name and turn it into a file name
    var studFile = this.getField("Name").value.split(",").join("_").split(" ").join("") + ".pdf";
    // get the current document's directory path
    var origFile = this.path;
    var pathBits = this.path.split("/");
    pathBits.pop();
    // whack 'em together
    pathBits.push(studFile);
    var studFilePath = pathBits.join("/");
    // toss the form fields and stuff
    this.flattenPages({
    nNonPrint: 2
    // save the new file
    myTrustedSaveAs(this,studFilePath);
    // open the original again (not working)
    myTrustedOpenDoc(origFile);
    // close the one I just saved
    this.closeDoc(true);
    This is what happens:
    Button is clicked,
    All the form fields and buttons are removed,
    It produces a file with the new file name (e.g. Lawrence_Chris.pdf) next to the original,
    The file closes
    I'm pretty sure that once the SaveAs runs and the new file is created, I actually still have the original file open instead of the that was just saved. This would explain why the openDoc command doesn't seem to do anything because the file it's opening is already open. The closeDoc then runs and of course I then have no open documents!
    So, now I either need a way to revert the open original file so I get all of my form fields back and don't have to reopen it, or a way to close and then immediately open the file without saving changes. :/
    Any ideas?
    slight inconvenience of needing a separate .js file written for the user's JavaScript folder before launching Acrobat to overcome security restrictions. File sizes only seem to get down to about 376KB as opposed to the 40KB files that the AdobePDF8 printer spits out. :(

  • Printing a PDF via Air

    Hey!
    With alivePDF I can create and save from Air a PDF-Document. I can also load this document in a new window in Air. But how can I print it from air?
    Printing via htmlLoader-Object raised the same error like in my post about printing a runtime created htmlloader-Object (http://forums.adobe.com/thread/591929?tstart=0).
    I like to use the start2() from Air2Beta2 option for printing without dialog. but how can i send this pdf content to the print-object?
    Is this possible?

    You have to be careful when using the ActiveX control to communicate with system functions like printing.  Because it can be embedded in anything that supports ActiveX, some functionality is limited from being called from JavaScript as it may interfere with the host application.
    Check out the IAC API Reference (also included with the SDK) and the methods under AxAcroPDFLib.AxAcroPDF.  There are some print functions in there (like PrintAll) that you can call on the ActiveX control directly, as in from your doPrint() method in your HTML page without using the hostContainer.  You would basically just call:
    pdfObject = document.getElementById("PDFObj");
    pdfObject.PrintAll();
    These methods were designed specifically to work with the ActiveX control when embedded in a host application, and can be used to print a PDF embedded in a web page.

  • Printing to PDF very large file

    This is an intermittant problem. Sometimes I'll go to print to PDF and it results in a 200 kb file. Another time I end up with a 7 mb file. What gives? I set up the document for PDF and set everything I can figure. The documents I need to transfer are multiple pages and to adjust them one by one after the fact is laborious. I just want it to convert to a smaller PDF in the first place. Any ideas? Is this fixed with Tiger? I have Acrobat Professional 7.0.8.

    The size of the PDf can be directly related to it's content. ie: A PDF file containing only black text may be 100k, where as if you add an 8-bit tiff file, it may jump to 3 Mgs.
    When you create your PDF (if size does matter!), you can adjust many areas by Optimizing it. (You can also do this with Distiller and the PS or EPS route). Use the "Advanced" menu, and use PDF optimizer to lower quality of the file. ie: turn on Jpg compression and adjust the compression ratio to your desired level. You can also downsample rasterized art (not vector!) by turning on downsampling. I'm not sure if there is an action you can create to do this or not. Never tried batching in Acrobat.
    P.S. After optimizing it, DO NOT resave. The Optimized file will already be saved. Saving it again, removes much of the optimizing you just did.
    Also, Acrobat 7 files tend to be a little larger than 6!

  • Printing a PDF from JSP file.

    Hi there,
    I would like to automatically print some PDF files residing on my computer when the user clicks PRINT submit button on my JSP page without any print dialog coming up or with it. Is it possible?
    Thanks,

    No

  • Stopping/Starting Portal via BAT file on Windows

    In our landscape we have the ABAP and JAVA stack installed on separate servers for security reason.  We are trying to implement windows updates via SUS and need to automate the stopping and starting of SAP.  The bat file that was created works when stopping and starting the ABAP portion of SAP but on the Portal server it will take it down but when trying to start Portal, the J2ee Server will not start, but when I use the SAP MMC all servers starts up without any problem.  Below is the start up bat file, any assistance will be greatly appreciated:
    REM start of script
    PATH=%path%;G:\usr\sap\QBE\SYS\exe\uc\NTAMD64
    SET ORACLE_SID=QBE
    SET SAPDATA_HOME=K:\ORACLE\QBE
    REM
    REM
    REM ***** starting Oracle Services *****
    REM
    net start OracleQBE102TNSListener
    net start OracleServiceQBE
    net start OracleQBE102iSQL*Plus
    REM
    REM ***** starting SAP services *****
    REM
    net start SAPOsCol
    net start SAPQBE_00
    net start SAPQBE_01
    REM
    REM ***** starting SAP Instances ******
    REM
    G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=00 SAPDIAGHOST=SAPEPQA
    G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=01 SAPDIAGHOST=SAPEPQA
    REM
    REM end of script

    I looked up some training material and in TADM10 - Unit4 - Starting and Stopping a SAP NetWeaver AS Java.. the following is stated:
    Under Windows, the SAP system can also be started and stopped without a GUI by
    calling a command by means of the executable files startsap.exe and stopsap.exe. This
    can be done using a simple telnet access.
    To start an instance of the SAP system, open a telnet connection and enter the
    following command: startsap name=<SID> nr=<instance nr.>
    SAPDIAHOST=<hostname>
    To stop an instance of the SAP system, open a telnet connection and enter the
    following command: stopsap name=<SID> nr=<instance nr.>
    SAPDIAHOST=<hostname>
    For the SAPDIAHOST parameter, enter the name of the host on which the instance is
    to be started.
    So the script is correct, its all according to SAP advice... very strange

  • Running Java Program via bat file

    Hi
    I have a bat file. I have compile the java files and the class files into the same folder.
    I am suppose to double click on the bat file and it is suppose to run (in the same manner as IDE)
    but it only appear the 1st line of the program. Whatever i type, it refuse to budge.
    What should i do to retify the problem?
    I have already set the classpath properly

    Hi
    I just realised that my program can only run halfway on the dos...
    This is my code sample
    try{
                pw = new PrintWriter("TS.log");           
                System.out.println ("hi");
            catch(IOException io){
                io.printStackTrace();
            try {
                StandAloneApplication = true;
                String[] a = new String[1];  
                System.out.println ("hi2");
                Settings settings = Settings.getInstance();
                StringTokenizer letterToken = new StringTokenizer(settings.get("letter"),",");
                Vector <String> v = new Vector<String>();
                while(letterToken.hasMoreTokens()){
                    v.add(letterToken.nextToken());
                String letter[] = v.toArray(new String[v.size()]);
                System.out.println ("hi3");
                DbConnection d = new DbConnection();
                String stocklist = d.getStockList();
                String mainFile ="";
                GenerateSLS sMain = new GenerateSLS("timeSales.sls");                                               
                String sessionID = d.createiFisSession();                      
                System.out.println ("hi4");
                for(int i=0;i<letter.length;i++){
                    System.out.println ("print");
                    mainFile = sMain.start("timeSalesGen"+letter[i]+".sls",d.getStockList(letter[i]+"%.SI"),sessionID);
                    a[0] = mainFile;       
                    staticArguments = a;       
                    Viewer viewerMain = new TSMainCapture();       
                    viewerMain.init();          
                    viewerMain.start();it stops printing after "hi4"
    btw, I have tried to run this on the bat file again.
    IDE side retest, re-compile and rerun, work well
    Pls help
    Thanks.
    Lots of appreciation

  • Can only launch sqlDev 3.0 via .bat file

    I just downloaded 3.0 and extracted to a new folder. (winXP) The older version worked fine. Whenever I launch sqldeveloper.exe, I get " UNable to create an instance of the Java Virtual Machine"
    However, I am able to successfully launch when executing the sqldeveloper.bat file. AM I missing a configuration step?

    Make sure you're pointing to a 1.6 JDK in \sqldeveloper\bin\sqldeveloper.conf or delete the entry to get prompted to browse for it on next startup:
    SetJavaHome C:\Archivos de programa\Java\jdk1.6.0_16Hope that helps,
    K.

  • Planning load utility via bat file - error

    I am using a bat file that uses the Planning load utility to make numerous updates to a single dimension on a test server. When I run the bat file i get an error that says the dimension is locked by another user. I am the only user with access to the test server. I've checked EAS and planning and nothing is locked. I've even shut down all hyperion services on the server and restarted them. It still says that the dimension is locked. How can I get this to unlock when I don't see where it is locked? This is a high priority situation! Any help is greatly appreciated!

    Thanks John - I think your scenario is what happened. Initially, when I ran the bat file, I got an error 'Java out of memory - java heap'. So I had to fix that and then I got the locked error. So you're saying that since it locked the dimension then erred, the lock was never able to be removed. I got it! Thanks so much! :) Jeri

  • What would cause characters to be replaced by glyphs when printing a PDF via PostScript driver?

    When printing PDFs to our laser printers, occasionally a PDF will degrade, with many characters being replaced by little square glyphs. It never happens on the first page, but usually within the first ten pages if it is going to. The file will cause the same effect on similar printers, and is exclusive to PostScript- the PCL driver will print the file as expected. There is nothing visibly wrong in the PDF, and I am trying to isolate the cause of this problem. Once it starts the problem can get worse, but I've never seen it get better or "work itself out".  The sample above is a scan of the output, and the original PDF was version 1.4, the printer is an HP Laserjet 9050dn
    Thanks for your help!
    David

    That problem appeared different than this.  The symptom there was that the screen looked like an old time tv with Horizontal phase lock missing, as series of lines looking sort of  like this only extending from top to bottom of screen as un broken lines:

  • Printing to PDF opens the File

    I recently upgraded to Adobe X.  Every time I print a file (from Excel, Outlook, Word, etc.) to PDF, Adobe opens the new file.
    I'd prefer it just save the file as generally I don't need it open and am spending a lot of time waiting for it to open just to close it again.
    I've been through the preferences, but don't see an option to turn this off - does anyone know how?

    Start>Settings>Printers, right click on the Adobe PDF printer, and select Printing Preferences. Under the PDF settings tab should be a button for viewing the PDF, just uncheck it.

  • Help, print to pdf creates huge files!

    Usually when I want to print an image created in Photoshop or Illustrator, I first print it to pdf to make a smaller file size. This has worked great for me for years, but now I have an Illustrator file which ends up much bigger (22 mb instead of 2 mb) in the pdf version, and I can see all the layers when it opens. How can I print a flattened image?

    If you have layers in Illustrator with visibility off, delete them before making a .pdf.
    You would think they that gets deleted before making a .pdf but they do not.
    In acrobat the protection/remove hidden information also bitmaps the file, though that is not good for me, oif that is ok you iwll get your smaller file.

  • Can't print converted pdf to Word file

    How do I print a word file that Adobe converted from a pdf file?  Word says the margins are too big.   What can I do?

    Hi DRH78225,
    Try changing the margins of your file within Word.  The exact steps to do so vary based on the version of Word you have installed.
    Thanks,
    David

Maybe you are looking for

  • BP_TASK Data Cleansing

    Happy New Year Experts, I have a question or three for you on Data Cleansing in the Web IC.  I will explain what I have done and what I need answers to. The setup of the Data Cleansing Cases and Account search is fine.  We can search for Business Par

  • Mds Not working correctly

    Hi All, My MBP crashed yesterday, not sure why, the screen remained black when I tried to wake it up from sleep, but when I pressed "Space", I was able to play the video file i had left open on my desktop, so I guess it did wake up, but the screen di

  • Does Mozilla's Plugin Checker not read Safari plugins correctly? My Plugins are all up to date and it still says "update."

    Shockwave Flash Shockwave Flash 10.3 r181 - from file "Flash Player.plugin". Shockwave for Director Adobe Shockwave for Director Netscape plug-in, version 11.6.0 - from file "DirectorShockwave.plugin". I'm wondering if it is how Safari does not list

  • Have to Register every time I open Final Cut Suite.

    This is very odd. Almost every time I have opened FCP, Live Type, Motion in the last two days I am prompted Register over and over again. Has anyone run into this? I have heard the numbers are stored on/in the Mother Board and I have already had to r

  • NET8I 서비스 이름(SERVICE NAME) 사용 방법

    제품 : SQL*NET 작성날짜 : 2000-05-31 Oracle 8i 미만 버젼에서는 Oracle SID(System Identification) 정보만을 이용 하여 클라이언트에서 서버로의 접속이 이루어졌으나, Oracle 8i부터 새로이 소개된 Service Name을 이용하여 데이타베이스에 접속할 수 있게 되었다. 그러나 만일 Service Name을 적절히 기술되지 않으면 다음과 같은 오류를 만나게 되므로 그 사용 방법을 다루고자 한다