How to Capture print jobs and Data with WIN32 API?

My organization has about 5 network printers and copiers to which a computer can print. What I'd like to do is build, if possible, a simple JAVA program to intercept what the users are printing (from any application) and capture certain information about the print jobs before it gets sent off to the specified printer.
For example, when a user selects print from the menu in MS Word, and after the Ok button is pressed on the printers dialog window, have my program then pop up asking the user to fill in specific information (who they want to charge for the print job...this is typically an internal billing code, etc.).
The program would have to capture the name/driver of the printer users are printing to, the document they printed, number of pages, number of copies, date/time, etc.
Is/are there Windows API's to help in my programming of this application? I've been, unsuccessfully, searching MSDN, web sites, etc. on how to intercept/detect a print job. Any help would be greatly appreciated!
Thanks ahead of time...

Hi,
Printing is nothing to do with database transaction. SP will not apply here. You may only try SDK.
Thanks,
Gordon

Similar Messages

  • How do I print front and back with two pages per sheet? (OSX Lion)

    I can't find a simple solution to my situation...
    I'm using Max OSX Lion 10.7.3 and Adobe Reader X 10.1.2. 
    I want print two PDF pages onto one printed sheet, and I want to print front and back.  When I go to the print settings and select two pages per printed sheet, the sample window shows me what I'm looking for.  But when I tell it to print odd only or even only, it changes the print selection.  Here's what happens...
    Let's say I have a PDF document that is 20 pages long.  When I tell it to print two PDF pages per sheet, it shows me that the first pages printed will be PDF pages 1 and 2.  When I tell it that I want it to print odd pages only, it tells me that the first printed page will contain PDF pages 1 and 3.
    In other words, Adobe Reader wants to print the odd PDF pages instead of the odd pages of the printed document (PDF pages 1 and 2, then 5 and 6, then 9 and 10, so on).
    So that I'm being clear...
    This [  ] is a printed page.  The numbers inside the brackets represent the page numbers in the PDF document...
    What I want to print is this...
      FRONT   ||  BACK
    [1,2]    ||  [3,4]
    [5,6]    ||  [7,8]
    [9,10]   ||  [11,12]
    [13,14]  ||  [15,16]
      [17,18]  ||  [19,20]
    What would end up printing is this...
      FRONT   ||  BACK
      [1,3]    ||  [2,4]
      [5,7]    ||  [6,8]
      [9,11]   ||  [10,12]
      [13,15]  ||  [14,16]
      [17,19]  ||  [18,20]
    Aside from telling it exactly which PDF page numbers to print (this would be a taxing job because I'm working with a 273 page document), is there an easy and simple way to print how I'd like?

    I would suggest to use Adobe Ilustrator. Also I get an error message when I try tp access the sample document.
    You can download Illustrator using Adobe Creative download - http://www.adobe.com/products/illustrator.html
    ~Deepak

  • How to capture user name and date in the database

    How to capture the person name who edits the application and the date of edit in the database...
    Pallavi

    Hi
    There are substitution strings you can use for this purpose.
    1.APP_USER ------is the current user running the application
    2.SYSDATE --------represents the current date on the database server
    APP_USER Syntax
    Bind variable------ :APP_USER
    PL/SQL------- V('APP_USER')
    Substitution string---------- &APP_USER.
    SYSDATE_YYYYMMDD Syntax
    Bind variable------- :SYSDATE_YYYYMMDD
    Direct PL/SQL------- APEX_APPLICATION.G_SYSDATE (DATE DATATYPE)
    PL/SQL-------- V('SYSDATE_YYYYMMDD')
    Your application will be based on a table with primary key column. You create a 'before update trigger' on that table and add columns 'UPDATED_ON' and 'UPDATED_BY' to that table. Add the following to that trigger:
    :NEW.UPDATED_ON := SYSDATE;
    SELECT V('APP_USER') INTO :NEW.UPDATED_BY FROM DUAL;
    -Priyanka

  • How to get system time and date with PHP

    Dear Mr.Craig,
      Thanx a lot. We are running SRM 5.0 (RAMP - Implementation).
      My initial requirement is to write a server-side script to display server date and time. Could you give more inside on how to achieve it?
    Regards,
    Deva.

    Perhaps that will help.
    [code]
    <html>
    <h1>Access System time and date</h1>
    <?
         // saprfc-class-library     
         require_once("saprfc.php");
         $sap = new saprfc(array(
       "logindata"=>array(
       "ASHOST"=>"localhost"          // application server
       ,"SYSNR"=>"00"                    // system number
          ,"CLIENT"=>"000"               // client
          ,"USER"=>"bcuser"               // user
          ,"PASSWD"=>"minisap"          // password
         ,"show_errors"=>false               // let class printout errors
         ,"debug"=>false)) ;                     // detailed debugging information
         $result=$sap->callFunction("MSS_GET_SY_DATE_TIME",
            array(     array("EXPORT","SAPTIME",array()),
               array("EXPORT","SAPDATE",array())));
         if ($sap->getStatus() == SAPRFC_OK) {
        echo "Time: ".$result["SAPTIME"];
        echo "<br>Date: ".$result["SAPDATE"];
        echo "<br>or<br>";
        echo "Server is showing: "
             .substr($result["SAPDATE"], 0, 4)
             ."-".substr($result["SAPDATE"], 4, 2)
             ."-".substr($result["SAPDATE"], 6, 2)
             ." and "
             .substr($result["SAPTIME"], 0, 2)
             .":".substr($result["SAPTIME"], 2, 2)
             .":".substr($result["SAPTIME"], 4, 2);
         } else {
              $sap->printStatus();
         $sap->logoff();
    ?>
    [/code]

  • "Create Comment Summary" not showing in Pro 10.1.7?? How can I print document and comments with connector lines on single page?

    Adobe's instructions for Acrobat X Pro say that to print the document with connector lines on the same page, I should go from the menu to "Print With Comments Summary." I'm using version 10.1.7 and that option doesn't show up. My menu bar looks like this:
    and my print dialog box looks like this:
    And if I go to Commenting under Preferences I get this:
    I don't see any of the comment printing options Adobe refers to in their instructions. Am I looking in the wrong place for the option to print comments on the same page as the document? Or is there some reason this is not available?

    Hey Dan,
    With this call:
    DAQmxErrChk ( DAQmxCreateDOChan( taskhandle, "Dev1/PFI0:7","", DAQmx_Val_ChanForAllLines ) );
    You're trying to write to the PFI lines, which are part of port 1. Only the 8 lines on port 0 "Dev1/port0" support clocked/correlated DIO, port 1 only supports static/SW timed DIO (which is what you are using) and counter timer opperations. To do buffered output, check out the Cont Write Dig Port-Ext Clk shipping example at:
    C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Generate Values\Cont Write Dig Port-Ext Clk
    when you use this, you'll need to specify an external clock - M-Series DIO does not have its own timing engine so it has to get its clock signal from somewhere else. Most just use an onboard counter to generate a clocking signal, so the Dig-Pulse Train Cont example under counters can be combined with this.
    Most of this is covered in the M-Series user manual, though I realize its not exactly lite reading
    Hope this gets you started,
    Andrew S
    Message Edited by stilly32 on 03-26-2008 05:28 PM
    Getting Started with NI-DAQmx
    Measurement Fundamentals

  • Since installing Mavericks, my HP Printer adds an extra page to every print job, and iCal won't synch via iTunes with the Calendar on my iPhone 4s. Can Mavericks be uninstalled?

    Can Mavericks be uninstalled? Don't know if the discussion title pulled in all of my problem, so here it is again. Since installing Mavericks, my HP Printer adds an extra page to every print job, and iCal won't synch via iTunes with the Calendar on my iPhone 4s.
    And no, I was a bad boy and had not been Time Machining. Guess I will now.
    So, can Mavericks be uninstalled?

    Uninstall CleanMyMac2 >  How To Uninstall CleanMyMac
    Uninstall Cocktail > Uninstall Cocktail for Mac OS X
    Third party cleaning utilities are not necessary on a Mac and can only cause problems.
    Your Mac runs maintenance in the background for you >  Mac OS X: About background maintenance tasks
    Growl is un necessary and can slow  the system down > Growl - Removing Growl
    If you want to monitor the system, use the pre installed Activity Monitor app located in HD > Applications > Utilities
    Then restart your Mac.

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • How do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    how do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    ok so i have my own i tunes library - how do i get all my old apps onto my new library?

  • I had a trouble with my lap top and had to format hard disk and install all soft ware again. could any body tell me how to transfer the application and data in my i phone back to my laptop.

    I had a trouble with my lap top and had to format hard disk and install all soft ware again. could any body tell me how to transfer the application and data in my i phone back to itune.

    You can't. It still thinks that your iPhone is synced with another iTunes library (the one that you had before you reformatted the hard drive.

  • How to find the job and job status from RSPCM

    hi all,
    suppose we got an error and in rspcm the process was failed.i want to know the status of that particular job.and if any i want to stop that job in SM37.
    plz tell me how to find the job and job ststus from RSPCM...and how to stop that job in SM37
    thanks,
    jack

    Hi Jack,
    RSPCM: T.Code
    This transaction is used to monitor the process chains
    First:
    here you need to add the process chains into the sheet
    Second:
    Then you can monitor the process chains in this transaction code
    Like you can see the :  status ,proces chain ,Last run date ,Last run time ,Log ID
    Status : Green when sucessful,Yellow when running & Red when you get errors
    Now when yoy click on any of the process chain in RSPCM you will go to the LOG VIEW as you see in RSPC transaction
    SM37:T.code
    This transaction is used for Job Overview
    you can see many options in SM37
    like Released,active,cancelled,finished,etc
    Just select the ACTIVE  jobs and also pass STAR in JOB ID & USER ID
    here you can only see the active jobs
    Goto Step in toolbar
    select the program displayed
    then chose option GOTO - Variant in main menu bar
    in the variant you can see the job belong to which Process chain
    if you want to cancel this job come back to SM37 Display screen
    Select the Job and select the JOB DETAILS tab in Tool Bar
    Collect the WIP ( Work Permit ID)
    Go to SM50 T.code and find the WIP
    in Main Menu Bar you find the option Cancel with Core choose this it will cancel the Job
    Regards
    Hari

  • Print job becomes massive with Flash Player 10.1 & 10.2?

    First off, some info.  This is rather old code, written in 2007/2008 with Flex 2 by someone no longer with the company.  It has worked just fine for years, but not anymore.  The application aggregates pricing data over several years, and shows it in a series of 5 or so charts depending on user options.  There is a print button which takes the charts, puts them into a print template, and prints the charts (using the FlexPrintJob function) - or at least that's what it should do.
    Here's the lowdown:
    Flash Player 10.0.x and lower (down to FP 9.x), it works beautifully.
    Flash Player 10.1.x with hardware acceleration off, it works beautifully.
    Flash Player 10.1.x with hardware acceleration on, it breaks.
    Flash Player 10.2.x under any condition, it breaks.
    Now, what I mean by 'breaks' is this: when printing, it spools a 600MB+ file to the printer, gets to ~500MB (roughly the print spool limit), and prints the template with the first chart complete and the rest of the charts missing anywhere from 1/2 to all of the chart area.  If a smaller dataset is used, the charts may or may not complete, but the print job is still massive - the lowest I've seen is 350MB.  In scenarios where it works beautifully, the print job is 12MB at most.
    This slice of the application is part of an application bundle we sell as a service to clients, and forcing a FP downgrade on them is not an option.
    Has anyone run into this issue, or know where I might start to fix it?  In leui of that, any suggestions for porting a Flex 2 application to a FB4 application?
    Thanks for your time, and any help.

    The only printing example I could find in the Flex 2 docs is the very simple one here - Flex 2 Developer's Guide > Flex Programming Topics > Printing > Using the FlexPrintJob class > Example: A simple print job
    Surprisingly, even with a basic print job, the issue appears - in FP 10.2, the print job is ~13MB, in FP 10.0, the print job is ~2.3MB.
    For reference, the code used for the example (from Adobe's docs) is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
            <![CDATA[
                import mx.printing.*;
                // Create a PrintJob instance.
                private function doPrint():void {
                    var printJob:FlexPrintJob = new FlexPrintJob();
                    // Start the print job.
                    if (printJob.start() != true) return;
                    // Add the object to print. Do not scale it.
                    printJob.addObject(myDataGrid, FlexPrintJobScaleType.NONE);
                    // Send the job to the printer.
                    printJob.send();
            ]]>
        </mx:Script>
        <mx:VBox id="myVBox">
            <mx:DataGrid id="myDataGrid" width="300">
                <mx:dataProvider>
                    <mx:Object Product="Flash" Code="1000"/>
                    <mx:Object Product="Flex" Code="2000"/>
                    <mx:Object Product="ColdFusion" Code="3000"/>
                    <mx:Object Product="JRun" Code="4000"/>
                </mx:dataProvider>
            </mx:DataGrid>
            <mx:Button id="myButton" label="Print" click="doPrint();"/>
        </mx:VBox>
    </mx:Application>

  • Officejet 6700 Premium - Pauses print job and won't resume

    I recently bought this printer and set it up. It was working perfectly. I unplugged it for a few days when I went out of town. And now, after powering it back on, it won't print anything. It immediately pauses the print job and won't resume.
    I checked to make sure it was still set up to my wireless and it says that it's connected. I'm printing from my MacBook.
    I have no idea what the problem could be. Not really a techie so please describe solutions in "laymen's terms".
    Thanks!

    Hi DeniseT,
    Welcome to the HP forums!
    You have an Officejet 6700 that is paused and won't allow you to resume on your Mac? This techie would be happy to help you get this working again
    What I'd like you to try DeniseT is to reset your printing system and then re-add the printer. This Mac OS X: How to reset the printing system document from Apple will explain step by step how to reset the printing system. Once you've added the printer back you should be able to print without issue.
    Hope to hear back from you soon with a success story
    Please click “Accept as Solution ” if you feel my post resolved your issue, as it will help others find the solution faster
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    **MissTeriLynn**
    I work on behalf of HP

  • How to stop print job in SAP?

    Can some help in explaining how to stop print job in SAP .???
    i

    HI Swati,
    Thanks for the additional info. as per previously mentioned use SM37 - however be sure to check the box ''Sched' when performing the search for the job in question (and untick the others so the resulting list will be clearer to read etc.)
    You can then choose to delete the job and reschedule it to different periods via SM36
    Best of luck,
    Rgds, Derrick

  • How to avoid the Amount and Date values for VOID Cheques

    Hi All,
    I had created a two window i.e For Amount and Date. If I process the cheque the Amount value and Date should not trigger for VOID CHEQUES.
    Can any one tel me how to avoid the Amount and Date values for VOID Cheques
    Your help will be greatly appreciated.
    Regards
    Yathish

    Hi,
    I dont know which tablel you are referring to, is it PAYR table and the field VOIDR?
    If a cheque is voided, it would have a reason and it is stored in VOIDR field of this PAYR table.
    Check if the field VOIDR is filled, if it is filled, do not print the amount and date.
    Regards
    Subramanian

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

Maybe you are looking for

  • Odd Date for Current Date and Time

    I am modifying a column in a list to get current date and time using =TODAY()+NOW() in the calculated field and get a time that is behind by 1 hour but the date is 4 months 114 years ahead (2128). How can I fix this field?

  • TMADMIN_CAT:188: ERROR: Error while obtaining the Bulletin Board parameters

    Hi ,everybody When I created and configured a App server domanin with PSADMIN, these errors below occurred,but log files didn't have useful info: PeopleSoft Domain Boot Menu Domain Name: HCMDOM 1) Boot (Serial Boot) 2) Parallel Boot q) Quit Command t

  • Field Bus. Area is a required field for G/L account company code g/l ac

    hi ,   I am getting this following error when trying to post a cenvat in the tcode of J1iEX . "Field Bus. Area is a required field for G/L account <companycode> <cenvat g/l acct.no.> " Message no. F5808 Diagnosis The value for field "Bus. Area" in th

  • Rant, and advice to nokia

    1. in general, all nokia suite is big, bloated and a resource hug. even if the device is rarely or seldom connected to the pc, meanwhile it takes like 100 megs in memory and to a certain degree uses cpu, even if it is doing nothing at all, or if rare

  • Recovered files "object label badly formatted" .ai files

    I just had a mishap where all of my graphic files were deleted due to operator error.  I bought a file recovery software which said it supported .ai files, and they show up like a normal .ai file but when I try to open them in illustrator I get the f