Printing screenshot of form (PJC)?

I need to print a screenshot of a form (hardcopy)
"do_key('print')!", you'll say. Can't set page to landscape in JInitiator
"Use the Sun plugin!", you'll say. Can't upgrade.
So what are the options? Is it possible to use a PJC to grab a screenshot and send it to the printer in landscape mode?

Try something around this:
      import java.awt.Rectangle;
      import java.awt.Robot;
      import java.awt.Toolkit;
      import java.awt.image.BufferedImage;
      import java.io.File;
      import javax.imageio.ImageIO;
      public class screen2image
        public static void main(String[] args) throws Exception
          Robot robot = new Robot();
          BufferedImage screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
          ImageIO.write(screenShot, "JPG", new File("screenShot.jpg"));
      }Francois

Similar Messages

  • Print PDF from Forms

    Hi
    I wonder if anyone can help. We're running Forms 10.1.2.30 against an Oracle 10.1.0.5.0 database using IE8 on Windows XP and Windows 7 clients.
    We generate utility bills using Oracle Reports. These work fine at the moment as we print these reports directly to the printer from Reports. However, we now need to perform some post processing to the bills so I would like to produce the bill to a PDF, perform some post processing and then send the PDFs to the printer on batch.
    Does anyone have any tips on how to send the PDFs to a printer on batch? I can host it out to Acrobat using the undocumented/unsupported /t option, but I would rather not rely on third party software (especially undocumented/unsupported features).
    I've found a link to the Oracle Forms PJC/BEAN - PDF Project, but I cannot download the file. Something to do with the download site been seized by the FBI!
    https://sites.google.com/site/jvrpdfproject/version-1-5-2-english
    Thanks in advance.
    Neil

    Hi.
    What mechanism do you use now to send a PDF to printer? Do you have each printer defined on middleware (application server) or you download pdf from application server an print it localy?
    Best Regards
    Gregor

  • Screen Print and report print in 11g Forms

    Hi,
    I have created a popup menu in forms 11g which has a label print screen.
    When user clicks on it, it is supposed to bring up the list of printers that user has on his PC, so that they can choose the printer where they want to print to.
    Do I need to use webutil for it? or is there any other way?.
    Thanks
    Munish

    If you plan on printing from the client your only options are to use WebUtil or write your own java bean.
    That said, if you are generating the labels using Reports, why not generate to a pdf file? If you coded your form properly, the pdf will open on the client side in something like Acrobat Viewer. If they want to print it they can click on the "Print" button in PDF viewer.
    If you really want to make it complicated and present a list of printers and allow them to pick one then send the job to the printer, this will take some effort. Here are some starter tips assuming the client will always be Windows based:
    You can get the current default printer like this:
    -- More registry info for printing can be found here:   http://support.microsoft.com/kb/102966
    Declare
         rtn_Registry               varchar2(255);
         rtn_defaultPrinter          varchar2(255);
    Begin
         rtn_Registry := CLIENT_WIN_API_ENVIRONMENT.Read_Registry('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows','Device');
         rtn_defaultPrinter := substr(rtn_Registry,1,instr(rtn_Registry,',',1)-1);
         message (rtn_defaultPrinter);  -- This is the name of the default printer
    End;Some printer properties and preferences can be called with something like this:
    -- More details here:  http://support.microsoft.com/kb/q189105/
    Declare
         my_cmd varchar2(255);
         rtn_Registry               varchar2(255);
         rtn_defaultPrinter          varchar2(255);
    Begin
    -- Get default printer
         rtn_Registry := CLIENT_WIN_API_ENVIRONMENT.Read_Registry('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows','Device');
         rtn_defaultPrinter := substr(rtn_Registry,1,instr(rtn_Registry,',',1)-1);
         -- Printer default preferences
         my_cmd := 'rundll32 printui.dll,PrintUIEntry /e /n "'|| rtn_defaultPrinter ||'"';
         -- Printer properties
    --     my_cmd := 'rundll32 printui.dll,PrintUIEntry /p /n "'|| rtn_defaultPrinter ||'"';     
         -- Printer queue
    --     my_cmd := 'rundll32 printui.dll,PrintUIEntry /o /n "'|| rtn_defaultPrinter ||'"';
         If rtn_defaultPrinter IS NULL Then
              Message('Default printer not detected.');
              Message('Default printer not detected.');          
              RAISE Form_Trigger_Failure;
         End if;
         SYNCHRONIZE;     
         CLIENT_HOST(my_cmd);
    End;The complete list of installed printers can be found in the Registry here:
    <blockquote>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers</blockquote>
    Take a look at this java bean example used to help print to the local printer from Forms.
    <blockquote>http://forms.pjc.bean.over-blog.com/article-6621538.html</blockquote>

  • Print 2 different forms to 2 different printers 1 ABAP program

    Is it possible to print 2 different forms to 2 different printers from one program?
    Example: a Shipping invoice and a Shipping Label (mailing sticky label)
    Could they be a combination for form types? SAP Script and SMARTFORMS, SAP Script and PDF, SMARTFORMS and PDF
    I have a need to print a Shipping Invoice and Label from a single program. I need to beable to print multiple copies of the label at the same time for multiple shipping packages. i.e. 1 of 4, 2 of 4 etc.
    The users want to select print a single invoice and the neccessary labels from a single transaction request.
    Ken

    Hi,
    Could you please see the program RLVSDR40.
    Thanks,
    Abhijit

  • How do I print a interactive form out? It allows printing and filling.

    Hi, I'm trying to print out an interactive form that I filled out and then saved on my hard drive. The author allows printing and filling out of the PDF when it was created. I'm running Windows 7 64-bit and have Adobe Reader XI (11.0.06) installed along with the current drivers for my compatible printer. Within the same PDF the first sheet "instruction sheed" is an all text flat form, which prints just fine. The problem lies when I try to print other sections of the PDF, When I try to print it all I get is the header and a footer that the author created, but all the spaces where questions/ text and my fill in answers don't show up on the print preview image or when the printed sheet comes out of my printer.
         I have tried to print as an image without success. I don't think its an author issuse because it was released out of a California Department for several houndred/thousands of others. Please if you have any ideas or questions i look forward to any advice.

    Sorry I forgot to add that the PDF is devided by a "Chapter" style cover face that devided multiple sets of forms in to categories. At the bottome of these categories is a "Print whole document" which can only be clicked once the whole thing has been filled out. Do to some information over lap some dates don't follow the (time line order) it requirest to fill in the data so two of the categories show up as incomplete. Take a look at the document yourself, maybe I NEED to rewrite the information and see if that works.
    *Edit* Looks like I CAN print a blank form at the begining when it asked me if i want a blank form, will try to rearange dates so it will show as all COMPLET.
    PDF file can be found at the California government website:
    http://www.chp.ca.gov/recruiting/pdf/Chp446.pdf
    http://www.chp.ca.gov/recruiting/pdf/Chp446.pdf

  • How to create a Printer List in Forms 4.5

    How can I create a Printer list on Forms 4.5 to show all
    available printers?
    Thanks.
    null

    I fear there is no direct solution.
    May be this is a work-around:
    1. Apply the older built-in: Display_item. You can't disable the item with display_item, but you can change the visual attribute and show the user that this item should not be checked.
    2. To be shure that the user doesn't ignore this "disable", you need a trigger, which resets the item to the proper value after an illegal change.

  • Table Printing in a Form

    Hi All..
    Can you plz explain me clearly..
    How can i use WRITE_FOR ..
    shell i write it in form or Print Program..
    Clearly.. i want to print 5 columns like vbap-arktx, vbap-zmeng,vbap-zmeng,vbap-netpr, vbap-kzwi1..
    with headings Service details,personnel,HR,Rate,Amount
    AT last i want to print Total of all amounts..
    Can u plz tell me the logic clearly. with code..
    Thanks & Regards
    Raj

    Hi prasad,
           we have to write 'Write_form' FM in driver program itself. I am writing small example code below. if it is helpful plz give me points.
    report  zsumascriptsv1_p                        .
    data v1 type i value '888-'.
    tables mara.
    data it_vbap like mara occurs 0 with header line.
    selection-screen begin of block b1.
      select-options: s_matnr for mara-matnr.
    selection-screen end of block b1.
    *-- Start of Selection
    start-of-selection.
    select *
      into table it_vbap
      from mara
      where matnr in s_matnr.
    if sy-subrc = 0.
    endif.
    call function 'OPEN_FORM'
    exporting
    *   APPLICATION                       = 'TX'
    *   ARCHIVE_INDEX                     =
    *   ARCHIVE_PARAMS                    =
    *   DEVICE                            = 'PRINTER'
    *   DIALOG                            = 'X'
       form                              = <b>'script_form_name'</b>
    *   LANGUAGE                          = SY-LANGU
    *   OPTIONS                           =
    *   MAIL_SENDER                       =
    *   MAIL_RECIPIENT                    =
    *   MAIL_APPL_OBJECT                  =
    *   RAW_DATA_INTERFACE                = '*'
    *   SPONUMIV                          =
    * IMPORTING
    *   LANGUAGE                          =
    *   NEW_ARCHIVE_PARAMS                =
    *   RESULT                            =
    * EXCEPTIONS
    *   CANCELED                          = 1
    *   DEVICE                            = 2
    *   FORM                              = 3
    *   OPTIONS                           = 4
    *   UNCLOSED                          = 5
    *   MAIL_OPTIONS                      = 6
    *   ARCHIVE_ERROR                     = 7
    *   INVALID_FAX_NUMBER                = 8
    *   MORE_PARAMS_NEEDED_IN_BATCH       = 9
    *   SPOOL_ERROR                       = 10
    *   CODEPAGE                          = 11
    *   OTHERS                            = 12
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    loop at it_vbap.
    call function 'WRITE_FORM'
    exporting
    element                        = 'HEADER'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
    * IMPORTING
    *   PENDING_LINES                  =
    exceptions
       element                        = 1
       function                       = 2
       type                           = 3
       unopened                       = 4
       unstarted                      = 5
       window                         = 6
       bad_pageformat_for_print       = 7
       spool_error                    = 8
       codepage                       = 9
       others                         = 10
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endloop.
    call function 'CLOSE_FORM'
    * IMPORTING
    *   RESULT                         =
    *   RDI_RESULT                     =
    * TABLES
    *   OTFDATA                        =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       send_error                     = 3
       spool_error                    = 4
       codepage                       = 5
       others                         = 6
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
              if it is helpful plz reward points.
    Thanks,
    suma.

  • How to print a smart form in two diff languages runtime

    Hi friends,
    we have a requirement to print a smart form in two langauges one in english
    and other in Spanish those selection has to given by check box condition.
    pls send some stuff .
    Thanks & Regards
    Jagadeeshwar.B

    hi! Jagadesh
    1. Create two different Smartforms
    2. In Form Atributes Option -->General Attributes -->Language Tab -- there is a Optiona to select a Particular Language.( To select Language) there <b>select the EN</b> for 1st optin and <b>ES for Spanish</b>, Normally it will be in To all Language.
    3. Create a report with Radiobutton (bz Check Box have an attributes to check both the Options)
       when option1 = 'EN'.
            call form1 with EN language
      when option2 = 'ES'.
           call forms 2 with ES Language.
    Reward me if its useful.
    Regards,
    Nagulan

  • Printer selection in Forms 10g

    Hello,
    I am looking for a suggestion, to realize a printer selection in Forms 10g.
    For a migration I have to replace the command
    win_api_dialog.select_printer with something similar.
    Some threads suggest to implement a java class.
    Under
    How i select printer in Forms9i
    exist an example.
    The implementation there is based on the JDK 1.4.
    I need an implementation based on JDK 1.3.
    Inside of the JDK 1.3 exist only a simple printer dialog.
    (compare http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4645377 )
    Probably exist the option to use the C-API of WebUtil. The C-API could be used to start a printer dialog of a dll. I like to avoid this option, but if you an example for that option, I appreciate to see an example for that.
    In all other respects, I hope on your suggestions.

    I invest some more time on that topic, but did not found a solution to display a printer selection on the client.
    The only thing that i found in forum was that you can read the standard printer out the registry. But I would need all local installed printers.
    I hope on your help.

  • I am trying to print a fillable form.  It will not print and I get two error messages "document could not be printed" and "there were no pages selected to print."  Th latter is not true.  Won't print all, the page I am on, nor any series of pages inserted

    I am trying to print a fillable form - - an application for a Chinese visa.  It will not print and I get two error messages:  "document could not be printed" and   "there were no pages selected to print."  The latter is not true.  Won't print at all, the page I am on, nor any series of pages inserted.
    Am using a MAC desktop and a Cannon PIXMA MX922 printer.
    I need to print this form now that it is filled out?  What can I do? 

    Hello PW, I am having this problem and all suggestions haven't worked yet. Where is the Preferences|Documents you are referring to? I am on a PC and using Windows.
    EDIT: I found it and did, but still not working.

  • Printing Reports directly from to a printer via 10g forms (Linux)

    Hi all,
    I need to be able to print Reports directly from a form to a printer (bypassing the form output) on Linux (RHEL 5). The trick here is this is Linux, not windows so, wasn't sure how to deal with printers in this case.
    I have the option working where I can run a report and set the options to "Cache" and PDF and it displays my outputted report directly in a new browser window w.
    I use the SET_REPORT_OBJECT_PROPERTY, RUN_REPORT_OBJECT, and WEB.SHOW_DOCUMENT properly for the PDF in a window.
    a.) I want to send them directly to a printer, preferably to a user's default printer on their PC, bypassing the output screen. How can I accomplish this?
    b.) I also would like the ability to generate a PDF (bypassing the output on a browser window) and put the form in a specified directory on a client's PC (which is what I used in 6i Client/Server). I believe I need to utilitize the WebUtil to allow this to happen. Otherwise, I'm thinking I just build a queue for the user on the Linux server and build a screen that shows all the reports they've generated for the past X amount of days and let them open them up and print from there.
    Any help (particulary for Part A) would be very beneficial.
    Chris

    1)
    if your app server is on a Linux server, for direct printing to work, the printer must be setup and accessible under Linux server using system-config-printer command, for PDF printout you probably want a postscript option checked
    if you print to screen (PDF) and then use print option then your windows client machine must have access to the printer
    2)
    you must pass this printer name as part of the report parameters.
    set_report_object_property(oRptObj, report_destype, Printer);
    and
    hidden_action := hidden_action ||'&report='|| cRptSrcFile; -- source of report program to call
    hidden_action := hidden_action ||'&destype='|| cDesType;
    hope this helps

  • Problem in Printing of mutiple form on single click

    Hi all
    I m wrking on AFS and i had created a page for printing multiple invoice print on single click.
    A range of invoice is given as input and get out in the form of print preivew or print wat v choose .
    I mean a print pop is open for multiple invoice in a single click.
    Problem in printing of multiple form is speed .its going to be slow when click for printing .OR
    v can say that creation of multiple page in printing gets more time .Is ther  any way to solve  this .
    Plz suggest me some solution for that .
    Regards,
    Ravi

    Hi
    Check if Note 353518 - Selection of outputs takes much time and Note 910976 - Selection of output from billing (VF31) are relevants.
    Other suggestion. Do a trace with ST05 and check if you have any bottleneck in the coding that you can have in your Smartform or in your SAPscript, so check in tcode V/40 what form you are using . Also see Note 185530 - Performance: Customer developments in SD.
    I hope this helps you
    Regards
    Eduardo

  • How to print " Duplicate " in FORM ( either Sap Script or Smart Forms )

    hi,
       How to print  " Duplicate " in FORM ( either Sap Script or Smart Forms ) if trying to take second Print Out and the FORM is already Printed.
    Please let me know the condition that we should go for.If possible let me know the SAMPLE code since this will be used in most of the FORMS.
    Regards
    Avi

    Hi
    It depends on which print you're working.
    If it's a print of standard document you can check the NAST (VSTAT field) table in order to know if the document was printed.
    If a message is created you can find the hit in NAST table:
    VSTAT = 0, document not printed;
    VSTAT = 1, documment printed
    VSTAT = 2, print is failed
    If you mean a custom print I believe you need to create a log like NAST table.
    Max

  • I can't print my PDF form after it is filled out.  Only the form prints not the text that I put in

    I can't print my PDF form after filling it out.  Only the form prints and not the text I put in.

    That's a limitation of Apple's AirPrint framework that Adobe Reader depends on.  We are considering an alternate solution that may resolve this issue though.
    Thanks for your feedback.
    -Gaurav

  • Can I print a PDF form that has fields that have been overfilled?

    The form is set up as an evaluation and the field has been filled out past the viewable area so it turns into a scrollable field. I'd like to print so all of the text prints from each form field.

    Not directly.
    You could use the "Compile returned forms"  to put the form data into Excel.
    Or you could export the form to an FDF and them make a version of your form with larger field sizes and import the FDF.

Maybe you are looking for

  • JDeveloper 10.1.3.4: text-align for table column has no effect

    Hi, I am using JDeveloper 10.1.3.4. In a tabe I have a column that displays numbers, which are left-aligned by default: Applied $50.00 $2,160.00 $50.00 $2,260.00I want to have them aligned to the right to look neater: Applied          $50.00       $2

  • Help please itunes update error

    now when i try to install on my iphone the latest iphone software i get an error (9) what i have to do ?

  • Skype credit reduced for no reason

    Hi, I was checking my skype account on my windows laptop. The skype credit I had was $14.xx. I had a contact request and I was checking it. Suddenly I see skype credit has been reduced to $8.69. Why has my skype credit reduced without making any char

  • Select Multiple lines in GR PO

    Here's the short version: I need to select and delete multiple rows in a Good Receipt PO. HOW? Long version: I support a business where thousands of lines of PO's are entered in,  but when (or if) they will ever arrive is up in the air.  When they sh

  • Time Machine suddenly refuses to backup to non case-sensitive drive

    There is another thread on this which for some reason is marked as resolved, so I thought I'd post a new thread. Suddenly after months of no complaints I get the following error: *+Time Machine Error+* +A volume you are backing up is case-sensitive,