PDF silent printing

Hi all
i have a pdf that i generate with FOP then i want to print it in silent mode.I have try the FOAWTRenderer,PDFBox and the basic javax.print but the results are very far from the Acrobat or Foxit print.
Any idea for this problem?
Thanks

OK, thanks.
I've decided to convert the PDFs using Flashpaper and it's working well.
Regards
Marion

Similar Messages

  • AIR and PDF showing/silent printing

    Is there a way of showing PDF in an AIR application? What about PDF  silent printing?
    Thanks for any ideas.

    update: using the javascript injection method described in the links above works fine with dynamically created html elements, and will launch the print window for multiple pdfs ..  Below is my jquery code, it's quick and dirty but it works...  I've got a button with the ID #print_list in my html file and a div with the id #pdf_holder to hold the objects.  There is a dynamically created list of links in teh #pdf_target div.
    The callPdfFromJavascript() function assumes that the pdf has the corresponding javascript already loaded.  I have modified this function slightly to include the increment variable allowing each object to have a unique ID.
    See link posted by chris above for the function that goes in the pdf.
    I still need to figure out how to do this without the objects appearing but getting this far makes me happy
    $(document).ready(function() {
         if(air.HTMLLoader.pdfCapability == air.HTMLPDFCapability.STATUS_OK) 
              air.trace( "PDF content can be displayed" );
              //print button
              $('#print_list').click(function() {
                   var i='1';
                   $('#pdfdad_target a').each(function() {
                        var pdfLink = $(this).attr('href');
                        var pdfObjectHtml = '<object id="PDFObj'+ i + '" data="'
                             + pdfLink + '" type="application/pdf"></object>';
                        $('#pdf_holder').html();
                        $('#pdf_holder').append(pdfObjectHtml);
                        air.trace(i);
                        //send message to pdf to print
                        callPdfFunctionFromJavascript('Print', i);
                        i++;
         else 
              air.trace("PDF cannot be displayed. Error code:", HTMLLoader.pdfCapability);
    //function that sends print command to pdf
    function callPdfFunctionFromJavascript(arg, i){
         air.trace('got this far');
         var pdfObjectId = "PDFObj" + i;
         pdfObject = document.getElementById(pdfObjectId);
         air.trace(pdfObjectId);
         try {
              pdfObject.postMessage([arg]);
         catch (e) {
              alert("Error: \n name = " + e.name + "\n message = " + e.message);

  • Silent print in AIR application

    hi,
       I am struggling with the problem 2 days now. I created a touch screen app and as the final step, app should print a confirmation for user. Because it is standalon point-of-sale, I don't want any confirmation dialogs etc outside of my application. I have created a PDF file with FxPDF library from Tour de Flex. However, it cannot be printed using PrintJob. So I save the file and then use NativeProcess to call AcroRd32.exe with params to silently print it. The problem is, I cannot install Reader in folder of my choice and I don't want to update application each time new Reader is published. Second thing is, Reader window does not close after print, and I will finish with hundreds of open windows in the background after some time.
      My question is, is it possible to do silent printing in AIR in other ways? It does not have to be PDF, perhaps I could prepare layout of text to print another way. I really appreciate any tip, I've digged up internet for several hours, and haven't found any suitable answer.
    Regards,
    Akeen

    i wrote an article how to open and show and silent print pdfs in Windows and Mac OSX with examples (using native commands):
    http://www.onyrix.com/2012/04/adobe-air-pdf-silent-print-with-acrobat-reader/
    bye
    d
    even if is for Adobe Air you can you native commands examples for any other programming language

  • Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed

    We are planning to Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed. I have tried using the AIR appliaction and it worked, But our requirement is NO INSTALL to the user machine for the silent printing. It is just from web page and silent printing to the default printer to the desktop/Laptop. Can anyone share your thoughts and experience with us. It will be very helpful..
    For AIR : I tried the thread Re: AIR and PDF showing/silent printing

    Hey CodeMonkey & Ross,
    Did you either of you ever find a solution? I'm stuck too, it seems I can get remote printing on all these PDFs to work but it just prints a blank page since I've been using Javascript in the browser, not Adobe's (they are Engineering drawings that I do not have permission to edit so I can't just insert code into them but I need to make work instructions). I've been scouring the internet for hours now, it seems that this thread is the only relevant/useful one at this point. No one else was trying to achieve this for similar reasons to mine.
    Thanks guys,
    Lox

  • How can I/Is it possible to silently print a PDF with specific print settings and obtaining the resulting job id (in windows at least)?

    Greetings,
    I have a specific application for Windows I'm developing where I need to silently print a PDF to a real printer.  The trick is I need to set specific printing preferences ... such as color/monochrome, # of copies, page size / source tray, etc.   The printer is always set to spool documents, and it is key that I know the job id (even if its already done printing) of the resulting print job.
    With windows APIs mixed in, I would imagine something like ...
    OpenPrinter(printername)
    StartDocPrinter(...)
    -----> some SDK call to print the document based on the handles I pass it...or perhaps one page at a time after I call StartPagePrinter()
    EndDocPrinter(...)
    ClosePrinter()
    I've been searching for something for days that would give me this sort of control, but I've been finding the documentation very difficult to find on silently printing a PDF through any means other than a command line which doesn't appear to give me the information or control I need.
    Is this possible with the Adobe SDK? 
    I've seen other posts accomplish this by changing the printing defaults for the printer, and then sending the job silently with a commandline.  This has two problems for me: 1) I still don't know the Job ID of the print job, and 2) I can't rely on the idea that other unrelated print jobs will not be sent while I'm processing the PDF ... making it difficult to use defaults as a means of controlling the settings without causing a lot of side effects.
    Even just a point in the right direction would be a huge help for how I could accomplish this.  
    Thanks a lot,
    Wayne

    You cannot uninstall Kit Kat from your phone. BTW what kind of phone do you have??

  • Print PDF Silently

    I am looking for a straight answers as to if it is possible to print a PDF silently, perhaps using Adobe SDK?
    The criteria are:
    Print from Windows 7,
    Using .Net/ C#.
    No GhostScript
    No Adobe Reader popup.
    No Printer Dialog (Printer properties will be set through .Net)
    I am reading a lot of interest on this, and I understand previous versions of Adobe did silent printing but it may have been removed due to security reasons.
    I have created the following code, but it requires the printer to understand postscript and I cannot guarantee this: Ideally what I am looking for is an open source way to pull each page in a PDF, convert it to an image and print it separately.
    ProcessStartInfo psInfo = new ProcessStartInfo();
    psInfo.FileName = "print";
    psInfo.Arguments = String.Format(@" /d:{0} {1}", sSelectedPrinter, sFileToPrint);               
    psInfo.WindowStyle = ProcessWindowStyle.Hidden;
    psInfo.CreateNoWindow = true;
    psInfo.UseShellExecute = true;
    psInfo.ErrorDialog = true;
    Process process = Process.Start(psInfo);
    process.WaitForExit();

    Can anyone provide an example of printing from the Adobe SDK?
    I need to specify a printer programmatically.
    I do not want to see a printer dialog popup
    And do not want to see an Adobe viewer popup.
    I am trying Ghostscript.Net, but when printing a color document such as PDF/JPEG/PNG, adds a color shadow which makes the document appear blurry.
    The scenario is for a given .PDF (provided), print it silently to the printer (no user action required), OR break it up into BMP,JPEG,PNG etc.., paginate through this list of files AND send each image to the printer separately (no user action required).
    Getting desperate!
    Best Regards,
    Kelly

  • Can we silently print a PDF file programmatically without opening Adobe Reader using DDE messages

    Hi,
    Can anyone help to solve this.
    I want to silently print a PDF file without opening the Adobe reader window.
    Thanks,
    Chandu. G.

    I would like to do that same thing.  Did you ever find an answer to this question?

  • Load a PDF and Print it Without User Seeing the PDF

    I have a client who has a need to allow users via a web browser to print PDFs wihtout gaining direct access to them.  Ignoring all the flaws in this logic , I am new to Flex and am having difficulty determining if this is possible.  So, here are the details:
    1) This is a web browser application.
    2) The files reside on a server.
    3) The user will view a list of available PDF files in their browser.
    4) There will be a print icon next to each one.
    5) When they click on the print icon we need to pull in the PDF from the server and initiate a print, all without the user seeing the PDF.  So once they click the print icon the next thing they see is thier browser's print dialog box.
    I have 1-4 done, I just need help with the most important one, #5.
    So, can Flex (without AIR) load a PDF in without displaying it and print it?
    I am using Flash Builder 4.6, if it matters.
    Thanks in advance for any input.

    Well, that's going to be difficult. Before everything else, a silent printing in general, is not what Browser is all about. A print dialog is thrown by the browser when a user selects a print option. Same thing if an application is trying to print using built into it conventional methods of printing - you get Print dialog. It gets even harder if you want to print PDF files silently. You will need to make sure that a file is available to print in case it's generated on the fly. The following code will print your PDF without dialogs to a selected (var printer) printer:
    var WshShell = new ActiveXObject("WScript.Shell");
    var fs = new ActiveXObject("Scripting.FileSystemObject");
    var fi = "AcroRd32.exe /N /T " + '"c:\\temp\\' + "filename" + '" ' + printer;
    WshShell.Run(fi, 0, false);
    As you notice, the file is on the local system. Or you can try printing over the network.
    This code will be a part of a JS function in your html wrapper. You will call this function from Flex using ExternalInterface.
    AcroRd32.exe is an Adobe free PDF reader.  I would suggest starting from the end - have a file on the local system and working on everything esle.
    HTH

  • Adobe 9.3.3 Silent Print issue

    I upgraded from Adobe Acrobat 9.3.2 to 9.3.3. Now when I launch an xfdf to populate it's PDF and pass the print parameters (only occurs when it is a silent print) it does the following:
    The print completes as expected but I receive the following mgs boxes:
    Adobe Acrobat
    Expected a dict object.
    and
    Fatal Error:
    Acrobat failed to send a DDE command.
    The fatal error closes Adobe and requests a Microsoft Error Report.
    This is also happening on Adobe Reader version 9.3.3
    I am on Windows XP Pro version 2002 with service pack 2
    Any ideas?
    Thanks,
    Doug

    Looks like this is not happening outside the several hundred users that have reported this to me.
    Another note: the final fatal error in Reader states:
    Runtime Error!
    C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe
    R6025
    - pure virtual function call
    I submitted a bug report to Adobe but no response.
    Unfortunately our company will have to use a third party viewer and all my JavaScript work will be for nothing.
    Thanks,
    Doug

  • Silent Print and Annoying Printing Security Prompt

    Hello all,
    I finally managed to get my silent print JavaScript to work but I can’t figure out how to get rid of the annoying security prompt "This document is trying to print. Do you want to allow this?". I tried adding the JavaScript folder to the trusted sites under Security (Enhanced) but I am still being nagged with this prompt. Is this feature only for PDF files or can it be used for JavaScript files? I added a button so the user can just click and the PDF document will save in a specified location using PDFCreator. Yes, I know it is strange that I am printing a PDF file to a PDF but I have my reasons. Is it possible to get rid of this message or am I going to have to put up with it. Here is my code:
    function silentprint()
    var pp = this.getPrintParams();
    pp.interactive = pp.constants.interactionLevel.silent;
    pp.printerName = 'PDFCreator';
    this.print(pp);
    function toolbar()
    app.beginPriv();
    app.addToolButton({
    cName: "myToolButton",
    cLabel: "Flatten Active Form",
    cExec: "silentprint();",
    cTooltext: "Click to flatten active form.",
    cEnable: true,
    nPos: 0
    app.endPriv();
    toolbar();

    Hi Shawnny,
    Here are a few points:
    You can (or should be able to) bypass the security warning on your machine.
    There is no way you can set up the doc so other users won't see that warning. Security prefs are on by default.
    Setting up a privileged location should work. Try trusting the file and/or the folder on your machine.
    If that doesn't work, choose to Trust Always from the yellow message bar.
    If that doesn't work, look at the registry and see if you file is indeed trusted for silent printing and JavaScript. Details here: 9   Trust Methods — Acrobat Application Security Guide. Feel free to post your registry prefs here.
    The last option is un-check Enhanced Security in your preferences.
    hth,
    Ben

  • Silent Print Issue

    Dear all,
    I have used javascript silent print command for printing pdf document. This functionality is working fine for last 1 year. Recently my user has reported issue in the functionality. I have checked functionality at my end and its still working fine. When I tried similar on my user's machine, its not working. Only difference which I can make out is that I have only Adobe Reader 9.4.3, where as my user has Adobe Reader 9.4.1 along with writer.
    Can you please help?
    - Is it due to different version fo adobe reader?
    - Is is due to some settings in adobe reader?
    - Does it anything to do with javascript for silent print?
    - Does it related to some windows version / registry settings around default printer?
    Regards,
    Satty

    Hi,
    No error message as such.
    The popup appears "This document is trying to print. do you want to allow this?" and on clicking on "Yes", nothing happens. Where as in my machine (9.4.3), on clicking "Yes", document is sent to the default printer for printing and it works fine.
    Regards,
    Satish

  • Silent Printing

    We are creating PDF documents via Java and iText and would like them to do a silent print (i.e with no print dialog box). We add the following javascript to the PDF document:
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("/home/webopt3/public_html/batesfurniturecompany/reports/customerQuoteRe port" + customerQuoteHandler.getCustomerQuoteID() + ".pdf"));
    document.open();
    writer.addJavaScript("this.print({bUI: false, bSilent: true, bShrinkToFit: true});");
    When the document is opened everything is fine however we are still receiving the following pop-up confirmation box with the message:
    "This document is trying to print. Do you want to allow this?"
    Is there anyway to have it print automatically without having this confirmation box pop up?
    Thanks in advance for your help!
    Jack

    Apparently this is considered a security thing, and there is no
    bypass.
    Aandi Inston

  • Silent print

    Hi all
    I have the usually problem of the developer : the silent printing!!!
    Then,i have a FOP document and i want to silent printing the pdf,i try some method:
    1) autogenereted PCL(by FOP)
    2)by postscript
    This solution give me horrible results,the print doesn't mantein size,line,image....
    The other solution is to print by the Acrobat Dll ,is works fine but there is two problem
    1)i don't want to use only Acrobat Reader but other reader like Foxit
    2)for simulate the silent print i have to open and close the preview and this give me a beautiful behaviour of the monitor!
    Any solution?

    Not possible. How would you experience if you visit some website and in a sudden the printer prints a bulk of paper without any authorization from you?

  • How to disable security warning while printing(Silent Print) from Javascript?

    We have a webapplication through which, we are creating a pdf document and trying to print it sliently ("Silent Print").
    Users who are having latest Adobe version, were getting javascript warning message. However, those with older versions able to "Silent Print", without any warning messages.
    How to disable this security warning while printing from Javascript?
    Warning message: "A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?".
    Appreciate for your kind help.
    Thanks.

    It's a security warning so it can't be bypassed by anything within the file.

  • Convert a web report into pdf and print (in BW 3.5)

    Hello gurus,
    i have few web reports ( created using WAD). i am looking for a possibility to convert a web report (viewed in a browser by a user) into pdf and print them and this should be done by pressing a button.
    Is it possible in BW 3.5 version?.
    could anyone please help me?
    Any how to docs. would be really helpful.
    thanks and regards
    kumar

    Here it is
    <HTML>
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_DATA_PROVIDER"/>
             <param name="NAME" value="DATAPROVIDER_1"/>
             <param name="DATA_PROVIDER_ID" value=""/>
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="ZPD_ADHOC_PAGE"/>
             <param name="MENU_BACK" value=""/>
             <param name="MENU_BACK_TO_START" value=""/>
             <param name="SUPPRESS_WARNINGS" value="X"/>
             <param name="MENU_FILTER" value=""/>
             <param name="MENU_FILTER_ON_AXIS" value=""/>
             <param name="MENU_SELECT_FILTER" value=""/>
             <param name="MENU_FILTER_ON_AXIS_CHART" value=""/>
             <param name="MENU_FILTER_CHART" value=""/>
             <param name="MENU_FILTER_DRILL_DOWN" value=""/>
             <param name="MENU_DRILL_UP_GIS" value=""/>
             <param name="MENU_DRILL_DOWN" value=""/>
             <param name="MENU_EXCHANGE_OBJECTS" value=""/>
             <param name="MENU_REMOVE_DRILL_DOWN" value=""/>
             <param name="MENU_SWITCH_AXIS" value=""/>
             <param name="MENU_HIERARCHY_NODE_DRILL" value=""/>
             <param name="MENU_HIERARCHY_DRILL" value=""/>
             <param name="MENU_HIERARCHY_STATE" value=""/>
             <param name="MENU_SORT" value=""/>
             <param name="MENU_CALCULATE_RESULT" value=""/>
             <param name="MENU_CALCULATE_VALUE" value=""/>
             <param name="MENU_CUMULATE_VALUE" value=""/>
             <param name="MENU_DISPLAY_DOCUMENTS" value=""/>
             <param name="MENU_DOCUMENT_CREATE" value=""/>
             <param name="MENU_DISPLAY_DOCUMENT_PROP" value=""/>
             <param name="MENU_DISPLAY_DOCUMENT_SELEC" value=""/>
             <param name="MENU_RRI" value=""/>
             <param name="MENU_EXPORT_TO_CSV" value=""/>
             <param name="MENU_EXPORT_TO_XLS" value=""/>
             <param name="MENU_BOOKMARK" value=""/>
             <param name="MENU_CHARACTERISTIC_PROPERTIES" value=""/>
             <param name="MENU_VALUE_PROPERTIES" value=""/>
             <param name="MENU_QUERY_PROPERTIES" value=""/>
             <param name="MENU_VARIABLE_SCREEN" value=""/>
             <param name="MENU_CURRENCY_CONVERSION" value=""/>
             <param name="MENU_ENHANCED" value=""/>
             TEMPLATE PROPERTIES
    </object>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
    <TITLE>SAP BW Reporting Print Page</TITLE>
    <link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
    <script type"text/javascript">
    <!--
    //   Global Variable Definition
    var dataTable = "";
    var pageRowCnt = 0;
    var prevPage = 0;
    var ColumnCnt = 0;
    var PrintDateTimeStamp = new Date();
    var rptWidth = 0;
    //DATE STAMP FUNCTION
    function datestamp(){
               var Today = new Date()
               document.write(Today);
    function getReportTitle() {
                    var myQueryString = window.location.search;
                    var startOfRptTitle = myQueryString.indexOf("QTITLE=");
                    if (startOfRptTitle != -1)
                         var endOfRptTitle = myQueryString.indexOf("&", startOfRptTitle + 7);
                         var myTitle = unescape(myQueryString.substring(startOfRptTitle + 7, endOfRptTitle));
                         var rpttitle = "";
                         for(i=0;i<myTitle.length;i++){
                             if (myTitle.substring(i,i+1) == "+"){
                                 rpttitle = rpttitle + ' ';
                             else
                                 rpttitle = rpttitle + (myTitle.substring(i,i+1));
                    else
                         var rpttitle =  "Unspecified Query Title";
                    return rpttitle;
    queryTitle=getReportTitle();
    function getHeading2() {
                    var myQueryString = window.location.search;
                    var startOfHdr2 = myQueryString.indexOf("HDR2=");
                    if (startOfHdr2 != -1)
                         var endOfHdr2 = myQueryString.indexOf("&", startOfHdr2 + 5);
                         var myHdr2 = unescape(myQueryString.substring(startOfHdr2 + 5, endOfHdr2));
                         var hdr2 = "";
                         for(i=0;i<myHdr2.length;i++){
                             if (myHdr2.substring(i,i+1) == "+"){
                                 hdr2 = hdr2 + ' ';
                             else
                                 hdr2 = hdr2 + (myHdr2.substring(i,i+1));
                    else
                         var hdr2 =  "#";
                    return hdr2;
    header2=getHeading2();
    function getHeading3() {
                    var myQueryString = window.location.search;
                    var startOfHdr3 = myQueryString.indexOf("HDR3=");
                    if (startOfHdr3 != -1)
                         var endOfHdr3 = myQueryString.indexOf("&", startOfHdr3 + 5);
                         var myHdr3 = unescape(myQueryString.substring(startOfHdr3 + 5, endOfHdr3));
                         var hdr3 = "";
                         for(i=0;i<myHdr3.length;i++){
                             if (myHdr3.substring(i,i+1) == "+"){
                                 hdr3 = hdr3 + ' ';
                             else
                                 hdr3 = hdr3 + (myHdr3.substring(i,i+1));
                    else
                         var hdr3 =  "#";
                    return hdr3;
    header3=getHeading3();
    function getAsOfDate() {
                    var myQueryString = window.location.search;
                    var startOfRelevance = myQueryString.indexOf("ASOFDATE=");
                    if (startOfRelevance != -1)
                         var endOfRelevance = myQueryString.indexOf("&", startOfRelevance + 9);
                         var myRelevance = unescape(myQueryString.substring(startOfRelevance + 9, endOfRelevance));
                         var asof = "";
                         for(i=0;i<myRelevance.length;i++){
                             if (myRelevance.substring(i,i+1) == "+"){
                                 asof = asof + ' ';
                             else
                                 asof = asof + (myRelevance.substring(i,i+1));
                    else
                         var asof =  "";
                    return asof;
    asofDateTime=getAsOfDate();
    function getPaperSize() {
                    var myQueryString = window.location.search;
                    var startOfPaperSize = myQueryString.indexOf("PSIZE=");
                    if (startOfPaperSize != -1)
                         var endOfPaperSize = myQueryString.indexOf("&", startOfPaperSize + 6);
                         var myPaperSize = unescape(myQueryString.substring(startOfPaperSize + 6, endOfPaperSize));
                         var psize = "";
                         for(i=0;i<myPaperSize.length;i++){
                                 psize = psize + (myPaperSize.substring(i,i+1));
                    else
                         var psize =  "0";    // default if none supplied  (normal 8x11)
                    return psize;
    varPaperSize=getPaperSize();
    var PaperSizeParamString='&PSIZE=' + escape(varPaperSize);
       switch(varPaperSize){
            case "0":    // Landscape - Letter
                           var WidthMax = 910;
                           var RowsPerPageMax = 38;
                           break;
            case "1":    // Landscape - Legal
                           var WidthMax = 1190;
                           var RowsPerPageMax = 38;
                           break;
            case "2":    // Portrait - Letter
                           var WidthMax = 660;
                           var RowsPerPageMax = 54;
                           break;
    function getTotalColumns() {
       var myHTML = dataTable.rows[1].innerHTML;
       var TotalTDs = 0;
       var nextTD = 0;
       for (i=0;i<myHTML.length;i++) {
           nextTD =  myHTML.indexOf("<TD", i);
           if (nextTD != -1) {
              i=nextTD;
              TotalTDs++;
           else break;
       return TotalTDs;
    function GetPageHeadings() {
       var headingHTM = "";
       var leftspancnt = 0;
       var rightspancnt = 0;
       var headingspancnt = 2;
       if (header2 != '#') headingspancnt = headingspancnt + 1;   // adjust for extra headings
       if (header3 != '#') headingspancnt = headingspancnt + 1;  
       if (currPage > 1) {
          headingHTM += '<TR style="page-break-before:always; display:none; visibility:hidden; "><TD Colspan="' + ColumnCnt + '"></td></tr>';
       else {
          headingHTM += '<TABLE  id="THEREPORT" name="MYREPORT" cellSpacing=0 cellPadding=0 width=' + WidthMax + ' border=0>';
       if (ColumnCnt == 1) {
          headingHTM += '<TR><TD vAlign=top align=left nowrap><font Size=3><STRONG>';
          headingHTM += queryTitle;
          headingHTM += '</STRONG></font></TD><TD Rowspan="' + headingspancnt + '" align="right" vAlign="top"><input type="image" border="0" name="SAPLogo" src="/sap/bw/Mime/Customer/Images/images.jpg" alt="SAP Logo"></TD></TR>';
          if (header2 != '#') headingHTM += '<TR><TD vAlign="top" align="left"><FONT Size=1>' + header2 + '</FONT></TD></TR>';
          if (header3 != '#') headingHTM += '<TR><TD vAlign="top" align="left"><FONT Size=1>' + header3 + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left"><FONT Size=1>' + asofDateTime + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left" Colspan="2"><hr size=2 color=black align=left></TD></TR>';
          headingHTM += '<tr>' + dataTable.rows[0].innerHTML + '<TD> </TD></TR>';
       else {
          leftspancnt = Math.floor(ColumnCnt/2);
          rightspancnt = ColumnCnt - leftspancnt;
          headingHTM += '<TR><TD vAlign=top align=left nowrap Colspan="' + leftspancnt + '"><font Size=3><STRONG>';
          headingHTM += queryTitle;
          headingHTM += '</STRONG></font></TD><TD Rowspan="' + headingspancnt + '" Colspan="' + rightspancnt  + '" align="right" vAlign="top"><input type="image" border="0" name="SAPLogo" src="/sap/bw/Mime/Customer/Images/images.jpg" alt="SAP Logo"></TD></TR>';
          if (header2 != '#') headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + leftspancnt + '"><FONT Size=1>' + header2 + '</FONT></TD></TR>';
          if (header3 != '#') headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + leftspancnt + '"><FONT Size=1>' + header3 + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + leftspancnt + '"><FONT Size=1>' + asofDateTime + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + ColumnCnt + '"><hr size=2 color=black align=left></TD></TR>';
          headingHTM += '<tr>' + dataTable.rows[0].innerHTML + '</TR>';
       return headingHTM;
    function GetPageFooting() {
       var footingHTM = "";
       var leftspancnt = 0;
       var rightspancnt = 0;
       if (ColumnCnt == 1) {
          footingHTM += '<TR><TD vAlign="top" align="left" Colspan="2"><hr size=2 color=black align=left></TD></TR>';
          footingHTM += '<TR><TD vAlign="top" align="left" nowrap><FONT Size=1>Prepared: ';
          footingHTM += PrintDateTimeStamp;
          footingHTM += '</FONT></TD><TD vAlign="top" align="right"><FONT Size=1>';
          footingHTM = footingHTM + 'Page ' + currPage.toString() + ' of ' + varPageTotal.toString();
          footingHTM += '</FONT></TD></TR>';
       else {
          leftspancnt = Math.floor(ColumnCnt/2);
          rightspancnt = ColumnCnt - leftspancnt;
          footingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + ColumnCnt + '"><hr size=2 color=black align=left></TD></TR>';
          footingHTM += '<TR><TD vAlign="top" align="left" nowrap Colspan="' + leftspancnt + '"><FONT Size=1>Prepared: ';
          footingHTM += PrintDateTimeStamp;
          footingHTM += '</FONT></TD><TD vAlign="top" align="right" Colspan="' + rightspancnt + '"><FONT Size=1>';
          footingHTM = footingHTM + 'Page ' + currPage.toString() + ' of ' + varPageTotal.toString();
          footingHTM += '</FONT></TD></TR>';
       return footingHTM;
    function GetReportFooting() {
       var footingHTM = "";
       footingHTM += '</TABLE>';
       return footingHTM;
    function formatToPrint() {
       var PrintHTM = "";
       PrintHTM += GetPageHeadings();
       if (ColumnCnt != 1) {
          for (var i=1;i<dataTable.rows.length;i++) {
               (currPage > prevPage)?prevPage=currPage:"";  //increment current page count
               if ((pageRowCnt + 1)>RowsPerPageMax){
                   PrintHTM += GetPageFooting();
                   pageRowCnt = 0;
                   currPage++;
               if (prevPage != currPage) {
                   PrintHTM += GetPageHeadings();
               else
                   PrintHTM += '<tr>' + dataTable.rows<i>.innerHTML + '</tr>';
                   pageRowCnt++;
       PrintHTM += GetPageFooting();       
       PrintHTM += GetReportFooting();
       return PrintHTM;
    function DisplayPrintNotice() {
    // Paper Size "0" is Letter with Landscape
    // Paper Size "1" is Legal with Landscape
    // Paper Size "2" is Letter with Portrait
    if (varPaperSize == "0") {var varMessage ="nn From your browser File Menu, select Page Setup and do the following: nn 1) Adjust the Printer Orientation to Landscape n 2) select Print menu, then select the Print button.";}
    if (varPaperSize == "1") {var varMessage ="nn From your browser File Menu, select Page Setup and do the following: nn 1) Adjust the Paper Size to Legal n 2) Adjust the Printer Orientation to Landscape n 3) select Print menu, then select the Print button.";}
    //if (varPaperSize == "2") {var varMessage ="nn From your browser File Menu, select Page Setup and do the following: nn 1) Adjust the Paper Size to Letter n 2) Adjust the Paper Source (if necessary) n 3) Adjust the Orientation to Portrait (default) n 4) Select the Okay button nn Again select the File Menu, select Print, then select the Print button.";}
    alert(varMessage);
    //window.print()
    /*   SAP BW Reporting Stylesheet Revisions        */        
    function writeStyleRevisions() {
    function writeDynamicFontRevisions(dynafont) {
    //Writes the Dynamic Stylesheet
    -->
    </script>
    </HEAD>
    <BODY>
    <TABLE  id="tp1" cellSpacing=0 cellPadding=0 width=660 border=0 >
        <TR>
        <TD vAlign=top align=left nowrap>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="MYQUERY"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="GENERATE_LINKS" value=""/>
             <param name="WIDTH" value="660"/>
             <param name="BORDER_STYLE" value="NO_BORDER"/>
             <param name="SUPPRESS_REPETITION_TEXTS" value=""/>
             <param name="BLOCK_SIZE" value="3500"/>
             <param name="SHOW_PAGING_AREA_TOP" value="X"/>
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1"/>
             ITEM:            MYQUERY
    </object>
        </TD>
      </TR>
    </TABLE>
    <SCRIPT type="text/javascript">
    <!--
            var tbls = document.body.getElementsByTagName("TABLE");
            for (var i=0;i<tbls.length;i++) {
                  if (tbls<i>.name == "MYQUERY"){
                        var dataTable = tbls<i>;
                        break;
            document.title = queryTitle;
            rptWidth = dataTable.clientWidth;
            rptHeight = dataTable.clientHeight;
            originalRptWidth = rptWidth;
            originalRptHeight = rptHeight;
            originalRowHeight = Math.floor(rptHeight/(dataTable.rows.length+1));
            rptPageHeightMax = 580;                                                                                //660 less basic header and footer of 80
            if (header2 != '#') rptPageHeightMax = rptPageHeightMax - 20;   // adjust for extra headings
            if (header3 != '#') rptPageHeightMax = rptPageHeightMax - 20;  
            if (dataTable.rows.length == 1) {
                ColumnCnt = 1;                //No Applicable Data found message
            else {
                ColumnCnt = getTotalColumns();
            startingFont = 65;
            varFontSize = startingFont;
            if (rptWidth > WidthMax) {
                while ((rptWidth > WidthMax) && (varFontSize > 15))
                    writeDynamicFontRevisions(varFontSize);
                    rptWidth = dataTable.clientWidth;
                    rptHeight = dataTable.clientHeight;
                    varFontSize = varFontSize - 5;
                // calculate max rows per page
                rowHeight = Math.floor(rptHeight/(dataTable.rows.length+1)) + 1;        // add 1 for 2 row heading, add 1 for padding
                RowsPerPageMax = Math.floor(rptPageHeightMax/rowHeight) - 2;   // adjust for column headings
            if (dataTable.rows.length == 1) {
                varPageTotal = 1;                //No Applicable Data found message
            else {
                totalRows = dataTable.rows.length-1;                                       // total rows less headings
                varPageTotal = Math.floor(totalRows/RowsPerPageMax);       // compute total pages
                if (totalRows != (varPageTotal * RowsPerPageMax)) {
                    varPageTotal = varPageTotal + 1;                                        // if not a complete last page, add 1 for partial page
            currPage = 1;
            document.write(formatToPrint());
            document.all.tp1.style.display = "none";
            document.all.tp1.style.visibility = "hidden";
    //        DisplayPrintNotice();
    -->
    </SCRIPT>
    <STYLE>
    input.ie55   { display: none }
    </STYLE>
    <!-- special style sheet for printing -->
    <STYLE media=print>
    .noprint     { display: none }
    </STYLE>
    <script defer>
    function window.onload() {
        if (!factory.object) {
            return
        else {
    //     factory.printing.header = "SAP"
    //     factory.printing.footer = "SAP"
            if ( varPaperSize == "2" ) { factory.printing.portrait = true; }
            else { factory.printing.portrait = false; }
            factory.printing.Print(true);
            // enable control buttons
      /*  var templateSupported = factory.printing.IsTemplateSupported();
           var controls = idControls.all.tags("input");
           for ( i = 0; i < controls.length; i++ ) {
               controls<i>.disabled = false;
               if ( templateSupported && controls<i>.className == "ie55" )
                  controls<i>.style.display = "inline";
    </script>
    <P>
    <div id=idControls class="noprint" style="VISIBILITY: hidden">
    <input disabled type="button" value="Print this page"
    onclick="factory.printing.Print(true)">
    <input disabled type="button" value="Page Setup..."
    onclick="factory.printing.PageSetup()">
    <input class=ie55 disabled type="button" value="Print Preview..."
    onclick="factory.printing.Preview()">
    <input class=ie55 disabled type="button" value="Landscape"
    onclick="factory.printing.portrait=false">
    <input class=ie55 disabled type="button" value="Portrait"
    onclick="factory.printing.portrait=true">
    </div>
    </BODY>
    </HTML>

Maybe you are looking for

  • NOKIA E51 - Is it possible to search contacts in a...

    I have a new Nokia E51, very great device, but I have to manage 2243 contacts (!). The (new) actual searching contacts way is just crazy for me: if I try to write the word john... the phone shows me hundreds of contacts with that part of word. I'd li

  • Please check actionsipt3 as not working

    I am trying to convert a flash folio to actionscript 3 I will endevour to describe my timeline setup followed by the frame code that I cannot get to work. At the moment the time frame keeps looping, buttons and AC3 loader/ progress components. I feel

  • Verizon can't keep the service working

    About 3 weeks ago, VDOT was doing road work and cut my phone line. No blame there, stuff happens. Verizon came out and ran a temporary line through my yard and over into the next yard (not the greatest solution but oh well). About 5 days later, the t

  • Adding new state, it is not blank. CS6

    when i create a new state some images from the first state appear on the stage and are locked and unselectable. I do not have a page set as master and all layers are unlocked. how do i create a blank state?

  • Error in BEX Analyzer

    Hi, When i try to execute or open a query with characterstics it works fine but when i execute or open the query with keyfigures then gives me the error critical program error closing the program for further information see the trace when i go to RSR