Trouble printing HTML document

On http://technet.oracle.com/oramag/webcolumns/2003/techarticles/clevenger_jumpstart2.html, there is no 'print' button or print friendly version of this Article. Trying to print this fine Article by Robert Clevenger results in the right margin (and words) being chopped off. If there was a frame that could be printed or if a user could hit an available 'print' button to eliminate the clutter on the left and top-hand sides, that would be a big help.
Thanks, Charles Funderburke

Hi Charles,
This forum is specifically for issues relating to the OTN documentation pages at: http://otn.oracle.com/documentation/index.html
Please try the Member feedback forum instead at:
Community Feedback (No Product Questions)
regards,
Les

Similar Messages

  • Print html document

    Hi, I'm trying to print a html document with this following java code but doesn't works:
      public void onActionPrintEncuestaPDF(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPrintEncuestaPDF(ServerEvent)
         try{
              Robot robot = new Robot();
              // Ctrl+P
              robot.keyPress(KeyEvent.VK_CONTROL );          
              robot.keyPress(KeyEvent.VK_P );          
              robot.keyRelease(KeyEvent.VK_CONTROL);
              robot.keyRelease(KeyEvent.VK_P );
              Thread.sleep(500);
              //Alt+U
              robot.keyPress(KeyEvent.VK_ALT );
              robot.keyPress(KeyEvent.VK_U );
              robot.keyRelease(KeyEvent.VK_ALT );
              robot.keyRelease(KeyEvent.VK_U );
              Thread.sleep(500);
              //entrée
              robot.keyPress(KeyEvent.VK_ENTER);
              robot.keyRelease(KeyEvent.VK_ENTER );
              Thread.sleep(500);
         catch(Exception e){  }
        //@@end
    This is not working because java.awt.Robot is a part of AWT package and intended for the client site, how I can make an action that when the
    client push the print button. Print the html document automatly.
    Regards,
    Gabriel

    I create into KM Content on portal a file called print.html and I put the following code:
    &#65279;<html>
      <head />
      <body onLoad="window.parent.focus(); window.parent.print();">
      </body>
    </html>
    Because window.paren.print(); printed the code of actual iFrame. And into Web Dynpro I created a button that call the following function.
    public void onActionPrintEncuestaPDF(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPrintEncuestaPDF(ServerEvent)     wdContext.currentPrintElement().setAtrURL("/irj/go/km/docs/documents/print/print.html");
       //@@end

  • All of a sudden, I can't print .html documents on Firefox (I can on IE.) What happened?

    As of yesterday, I cannot print an .html document while on Firefox. I print a lot of recipes from different sites and also was trying to print a credit card bill. I went to Internet Explorer and can print just fine there. What is going on?

    See this: <br />
    http://kb.mozillazine.org/Problems_printing_web_pages

  • HT5364 I installed OX X Moutain Lion and now I have trouble printing pdf documents--get messages like "plug in failed" or "no pages selected on printer" when clearly pages are selected

    I installed OS X Mountain Lion on my desktop MAC and since then I cannot print pdf documents---I get messages like "plug in failed" or sometimes "no pages selected on printer" when clearly pages are selected

    DO NOT USE PREVIEW TO FILL OUT PDF FORMS, IT WILL DESTROY PDF FILES. Sorry, but I had to shout here to prevent damage to your PDF files.
    Here is one of the symptoms when you fill out a PDF form with Preview: If you save it and return it to the author, they will not be able to see the text that you've added to form fields - unless they click on a field, which will reveal the contents of just that field. You can recover from this problem, but Preview will also remove other field types, and will actually rewrite your complete PDF while ignoring what it does not understand. Take a look at this blog post for more information about the damage that Preview will cause: Preview.app - Killer of PDF Files

  • Print html document from presentation server with no intervention of user

    Hello,
    I have been able to create HTML output for my smartform.
    They are saved on my machine.
    I need to print these HTML outputs as a part of process without intervention of the user.
    Is it possible?
    I have tried method 'EXECWB' of 'cl_gui_html_viewer', but that gets fired only on some action and shows the Print dialog for the selection of printer.
    It would be great if anyone can help me with us.
    Thanks
    Mona

    PDL -- thank you for your reply.
    What you gave me did spawn the print dialog allowing me to select a printer. However, when the document printed, the number of pages in the document was correct but the pages were empty except for the page x of y along the top and the name of the document along the bottom. Have you seen this before and do you know how to correct? Also, how do you suppress the info across the top and bottom of the report from printing?
    Thanks

  • How to Print Html Document (more than one page)

    I've a problem with printing my html page. I can print one page of html file, But my document is longer than one page. and i can't print it.
    who know how to print . Please Reply

    A recent article in JavaPro has a nice solution for this problem. Check out
    http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    It describes a way of using Views to break down the pages.

  • Printing HTML documents in SAP GUI for HTML

    Hi,
    I created an SAP Transaction iView with the transaction PR05 (Travel Expense Manager). Now I'd like to print the selected trips via the print function either in html or pdf.
    I already created a pdf printer and it works fine. Is there also a possibility to print and save the output of the trips as an html doc?
    Thanks in advance for your answers.
    Regards
    Joachim

    Please search for front end printing for sapgui for html and you should see some details...

  • Trouble Printing Pages Document

    I have created a two page, Pages document, I used one of the templates for a news letter. It has text and 15 pictures imported from my photos in iphoto.
    When I print lower quality draft versions it works fine. But when i want a high quality print, the printer stops near the bottom of the first printed page and just stalls. Whats going on?
    Here is what I have
    Slot loading iMac, 400 MHz Power PC G3, 512 ram memory (1slot)
    128 GB internal hard drive, Mac OS X 10.4.8
    Pages version 1.0.2 ( 2 page document w/ 15 pctures & text, size 8.3 MB)
    Printer Canon Pixma iP 1500 ( Installed latest driver from Canon last night)
    Most of the pictures are pretty small, 1-1/2" x 2", would it be better to reduce the image MB size by using iPhoto to export it as a smaller size version, and replace the images in my document to make the overall document size smaller?
    Carlson
    Slot loading imac   Mac OS X (10.3)  

    I've had the same problem.
    Try this for printing:
    - in print dialogue go to Paper Handling and set to 'scale document to paper size A4' (or whatever size you are using)
    And try this for e-mailing:
    - open print dialogue window, in the bottom left corner click on PDF and 'Save as Postscript'
    - you get a huge PS file. Open it with Acrobat (or Preview) and you will get a compact PDF file which is good for e-mailing or printing.
    If you have a full version of Acrobat there is also and option 'Reduce file size'.
    I struggled a lot while trying to find a way to create mailable files from Pages. The three step solution (Pages-PostScript-PDF) seems to work best.
    I've published several articles on this at
    http://i-work-in-pages.blogspot.com
    Hope this helps,
    Sashura
    Normandy
    iMac, iBook   Mac OS X (10.4)  

  • Trouble printing converted document - no "Shink Oversized Pages" option in Word

    Hi gurus
    I have a document which was originally created in Word, apparently to print as A2.  I now have it in PDF format only.  It prints fine in A4 size due to the selection Shink Oversized Pages defaulting on in Adobe Reader. 
    Of course, I need to edit the document, so I converted it to Word.  I now have problems printing, as there is apparently no such equivalent option and I have to either resize everything (not feasible - it would be quicker to create the document from scratch) or save back to PDF then print from PDF rather than Word.
    There must be an easier way?  Can't the PDF conversion/export software be set to A4?
    Thanks
    Lynton

    If the conversion software exported as A4, Word would reflow the layout in the same way it would when you do Page Setup in Word - the layout would be utterly destroyed. What ExportPDF won't do is shrink as it exports to A4. (Perhaps a useful option, but certainly not what everyone would want or need).
    You could always reconvert your Word back to PDF for printing.

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

  • Print only a specific control or indicator on a front panel to HTML document

    Is there any way to print a specific control or indicator (not the whole front panel) to HTML document? I am trying to print a report that has a graph and some indicator value on it.

    There is a VI called "Append Control Image to Report.vi" which will allow you to do this. It's located in the Functions>>Report Generation pallette. Take a look at this and see if it's what you're looking for.
    J.R. Allen

  • Photosmart C6180 prints too many copies of PDFs and HTML-documents

    Hi,
    My Photosmart C6180 prints multiple copies of documents even if I haven't asked for it. This seems to only apply to PDFs and HTML-documents, I haven't seen it happen with Word/Excel. It's not consistent, it happens most of the time but now always for these documents. When I look at the console, when it has started printing I see shortly the status "Printing - Restarting". That's probably when it starts the 2nd copy. Sometimes it stops by itself, other times it seems to be looping and I have to turn the printer off and delete the document from the queue.
    HP solution center SW is updated, I run Vista with latest service packs on a Thinkpad T400s.
    Any ideas?
    Thanks!

    My C6180 printed multiple copies of any document from my Vista OS laptop ( wireless connection ), but not from my
    XP OS desktop ( USB connection), even though I selected 1 copy on the print menu. Unchecking "Enable bidirectional support" in the Properties / Ports dialog box solved the problem. Hope this helps someone too.

  • I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and d

    I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and downloaded Adobe Reader X instead and that still doesn't work. I have Windows 7.

    Hello,
    Please follow the link to troubleshoot the printing issues with Adobe Reader:- Troubleshoot PDF printing | Acrobat, Reader.
    Regards,
    Nakul

  • Printer issues for HTML document.

    Hello,
    We are facing a critical problem.In our project we are using sql server 2005,from one of the SP we are generating an HTML document.Ideally this document should be printed in 2 pages.When we print that with Laser JET 2430 printer it gets printed in two pages but when we print that with other version printer it gets printed in four pages.Our client has different version printer due to which they get that document printed in four pages which they want to be in two pages only.
    Workflow of this Document generation is as foloows:
    1)When this SP is executed it generates a HTML document and places at some shared folder.
    2)Then we open the document and apply follwing settings to document in order to view and print it properly as:
    View>>Text Size>>Medium.
    Also check if the size is A4 and margins are set to default values by doing the following.
    Go to
    File>>Page Setup
    Size: A4
    Left: 0.166 Right: 0.166
    Top: 0.166 Bottom: 0.266
    And then click on Print Preview.
    When the document is previwed it should be on two pages only.
    Basically here problem is that document gets printed perfectly when its Top margin is set to 0.166 but each printer has its own minimum Top margin settings due to which in different printers it takes different Top margin values for e.g when we print the document with HP Laser Jet P3005x its minimum Top margin are 0.196 then that document expands to 3 pages.Even we try to set this to 0.166 it gets overwritten with 0.196.
    Can you please tell us what changes should be done to SP which is generating the HTML so that its setting doesnt change printer wise and document gets printed in two pages only.Or else can you please suggest the links of forums where we can discuss this issue.

    Hi
    Quest_RG,
    This is actually very simple question, but it is an CSS question and not sql :-) once you open the HTML document the part of the SQL is over.
    You can use CSS to configure the printing way. using page-break-before and
    page-break-after you can insert CSS breaks where ever you want. for example:
    content here
    <DIV style="page-break-after:always"></DIV>
    content here
    I Hope this will help you,
    [Personal Site] [Blog] [Facebook]

  • I am having trouble printing  and am only getting part of the document which i have no margins set any help??

    i am having trouble printing  and am only getting part of the document  i have no margins set any help??

    What version of Pages?
    What Printer?
    If it is Pages '09, turn Comments off.
    Peter

Maybe you are looking for

  • Ipod Touch 4th generation problem

    I could really use some help here... Ok so the sleep/wake/lock button on the top of my ipod doesn't work anymore. I've tried restarting it and updating it, but nothing is working. I haven't dropped it or anything so I'm unsure what the problem is. Th

  • Problem with zone alarm.

    Hi everyone, this is the first time I get a Toshiba Lap top and I had a problem after installing Zone Alarm PRO edition. The module is just not starting, the icon appears but nothing else happens, I already tried with an older version and cleaning th

  • FMS 4, Can't mak make NetStream to work remotely with RTMP

    Hi, We are working with FMS 4 server for a while for a 2 directions video application, and it works great with rtmp. We now want to use its rtmfp abilities after we used Cirrus for testing in the last few days and it also worked well. Locally - every

  • HT204380 FaceTime, iMessage ,wifi , iPad

    I can't get my face time to work on my iPad 2 , my wifi is turn on and it is working , I am signing on with the right apple Id , but it keeps coming up check network or app Id , I'm finding the same prob when I try to do the iMessage, it is all Work'

  • Creating next and previous options

    i want to make my jsp page will display at a time only 10 ads and then go to next views the same way what we have in mailbox sytem.