Printing ical with details shown on screen

I've not used ical much but we have a trip going to Europe and I entered all of our hotels phone #s, email addresses and other trip details into ical while on the "month" setting. All the details and #s show on the screen but when I go to print copies to family and friends to keep track of us, it only prints the first 7 or 8 words and the rest is not shown. I can't even "select all" to copy and drop into word. Any help? I'm a slug not a wiz so thanks for any words. The system is old and this may be the cause
David

I too am having the same issue. I am trying to print out a monthly calendar like I see on the screen. At the most on any given day I have 4 lines of text. It shows on the screen but when I print it puts 3 little dots above that particular day to let me know there is more to it and refuses to print more than 3 items. I have tried with different page set ups and all I am doing is wasting ink. What's worse, is that there is PLENTY of room left on the paper. There is so much room between the month label and where the calendar starts there certainly has to be a way to adjust this. (I would hope!) Anyone please help! Thanks in advance.

Similar Messages

  • Why doesn't mail print the .ics details shown on screen?

    I have colleagues using outlook and I of course use mail.
    When they send me meeting requests I get a .ics file I can use in iCal.
    The details of the .ics file (e.g. agenda) displays OK in mail.
    But when I want to print the mail to take to the meeting, it just shows the .ics icon, nothing else.
    Browsing the discussions, this was a problem back in 2007 in Tiger, but fixed there and subsequently.
    Why have we got this "feature" back now in Lion? (The old fix - print from Get Info in iCal - doesn't work in Lion.  Must be the cheap leather finish)
    Any cures?

    Have you tried using the '''Print''' item at the bottom if that eBay page? <br />
    Or is that what you are using?
    Overall it isn't unusual for "print" to be a bit different than what shows on the "screen", that page may use @media for "screen" and for "print". The '''Print''' item on that page could be the difference, or the web browser might be following that code is you used the '''Print ''menu item or button''''' in Firefox. <br />
    http://www.w3.org/TR/CSS2/media.html#media-types
    Typically, the '''@print''' CSS code is used to hide navigation menu's ''(can't "navigate" to a different web page from a sheet of paper)'' and maybe advertisements ''(can't "click" on an ad that is on paper)'' from being printed out so that only the text of an article is printed to paper.
    Basically, it's probably not a fault with Firefox, but rather Firefox following the commands on the page put there by the person who authored that page, or a standard CSS "style sheet" used by eBay.

  • I want to print iCal with Mondays in the left hand side column. My calendar prints with Tuesday in the left hand column even though it displays Mondays in the left hand column when in normal use.

    I want to print iCal with Mondays in the left hand side column. My calendar prints with Tuesday in the left hand column even though it displays Mondays in the left hand column when in normal use.

    Thank you for your advice, it works.  I have struggled for hours to find the solution I am very grateful.

  • CS6 in combination with FileMaker - Pictures are printed to big but shown on screen correct size

    I'm using FileMaker since more than 10 years together with pictures made in PS (since version CS2) saved as .jpg / 100dpi
    it always worked perfect!
    Now I got CS6 and any new picture is shown in the correct size but when I print it out of FM it gets much to large

    when I print it out of FM it gets much to large
    If the parameters are correct in Photoshop then the problem would seem to lie with FileMaker and thus not necessarily be a rewarding subject for a Photoshop Forum.
    Do the files output correctly from other applications (Indesign, Preview, …)?

  • When printing slides with notes, only notepart shown on screen is included

    Hi
    I make presentations with really long presenters notes. During presentation I can scroll the presenters notes on screen with U and D, but my problem is when printing the slides with notes, only the part of the notes that is shown on screen is printing, so I sometimes half of the note section on a slide.
    Is there a work around, or is it just the way life is?
    Thanks in advance.

    I too am having the same issue. I am trying to print out a monthly calendar like I see on the screen. At the most on any given day I have 4 lines of text. It shows on the screen but when I print it puts 3 little dots above that particular day to let me know there is more to it and refuses to print more than 3 items. I have tried with different page set ups and all I am doing is wasting ink. What's worse, is that there is PLENTY of room left on the paper. There is so much room between the month label and where the calendar starts there certainly has to be a way to adjust this. (I would hope!) Anyone please help! Thanks in advance.

  • Is there a way to create a year at a glance with detail and print?

    Is there a way to create a year at a glance with detail and print?

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • My reminders are gone from my Ical since upgrade.  What do I need to do to input reminders in Ical and be able to print reminders with my ical.  Thank you

    My reminders are gone from my Ical since upgrade.  What do I need to do to input reminders in Ical and be able to print reminders with my ical.  Thank you

    I totally agree.  I just wasted .5 hrs trying to figure out how to manipulate and sync the reminders with the iCAl.  Thanks for posting this thread online, I can stop wasting my time now.  Apple, please change it back or make these apps sync. 
    Side note.  I was creating my to do list and found the ability to asign a date by draging the task to the calendar in the bottom right.  Then I discovered that I can drag that same reminder/to-do task into iCal and it will be created as an event. Would be great if I could simply sync the reminders to iCal instead of draging them over though.  Then when I make the change in one the other can update with the next sync.  This also prevents human error if I drag and drop the reminder onto the wrong date in iCal.

  • Screen print imac with bootcamp and windows 7 64 bit

    I have a new 27" Imac i7. I have boot camp installed and windows 7 64 bit. I have auto-cad installed for college. There are several assignments that require a screen print to turn in. I have not been able to figure this out. I have been using the snipping tool, but in certain instances i need a menu drop down included in the screen print. With the snipping tool the menu goes away. I have looked for some ways to do a screen print while in windows, and have been unsuccessful. I have a wireless apple keyboard, the shorter one. The F keys are enabled to be used as the real F keys without using the fn key on the windows side. So when i hit F10 for example it is the real F10 function. Does anyone have any ideas?

    I can get those keys to work if i make the keyboard use the shortcut keys that are listed on the top. For example, if i want to use the f10-f12 keys to control the volume without having to hit the fn key. If i set the keyboard up that way that key combo will work. But if i set up the keyboard to use the f keys really be f keys without hitting the fn key, it will not work. Would you know how to get it like that? I have tried just leaving the fn key out of that combo and it will not work.

  • Printing Separations with Halftones in Photoshop with SCREEN button has been disabled

    I want to start a discussion on trying to reimplement as an addon the SCREEN button in the print output in Photoshop CS5 and up. It's a very important feature for the idustry that I am in.
    This is a huge upset for the screen printing industry, as we cannot easily output channels from indesign or illustrator from the file. I use photoshop to print separations for multicolor prints with halftones, and the screen button lets me dcide what lpi/dpi I would output to my postscript printer. I have contacted someone at Adobe, and they have notified in fact that the SCREEN button on the print output options has been removed. I would like to make a petition to get this button back, as I have to upgrade, and I will not be able to use the software for my needs. Thank you.

    http://forums.adobe.com/thread/945132?tstart=0
    You can lend your support to an existing request
    http://feedback.photoshop.com/photoshop_family/topics/screen_function_for_separation_outpu t

  • Print ical weekly view with fewer hours

    When I print iCal in a weekly view, It prints 24 hours.  Obviously that isn't necessary.  How can I get it to print only 12 hours or the hours I have on my schedule?

    I was able to figure it out.  Apparently I had the times in wrong for an event and it went from pm one day to am the next day, hence prining 24hr.  When I corrected this is solved my problem.  Thanks for your patience.

  • Print JTable with Multiple pages and rows

    I took the printing example at http://java.sun.com/developer/onlineTraining/Programming/JDCBook/advprint.html#pe and modified it a bit to include the following:
    1) To Print Multiple pages
    2) To wrap lines that is too long for the column
    3) To print with a more proffesional style, so that it doesn't look like a screen capture is printed
    4) To align the numbers to the right and center column headings
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.print.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.Dimension;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    import java.text.*;
    public class Report implements Printable
         private final int LEFT_ALIGN = -1;
         private final int CENTER_ALIGN = 0;
         private final int RIGHT_ALIGN = 1;
         private JFrame frame;
         private JTable tableView;
         private String lastPrintDate;
         private Font defaultFont;
         private Font headerFont;
         private Font footerFont;
         private int headerHeight;
         private int footerHeight;
         private int cellBuffer = 5;
         private boolean first_pass;
         private ArrayList pages;
         public Report()
              frame = new JFrame("Sales Report");
              frame.addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
              final String[] headers =
                   "ID",
                   "Description",
                   "open price",
                   "latest price",
                   "End Date",
                   "Quantity"
              int count = 0;
              final Object[][] data =
                   {new Integer(count++), "Box of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of BirosBox of Biros ppppppppppppppp", "1.00", "4.99", new Date(), new Integer(200000)},
                   {new Integer(count++), "Blue Biro", "0.10", "0.14", new Date(), new Integer(1)},
                   {new Integer(count++), "legal pad", "1.00", "2.49", new Date(), new Integer(1)},
                   {new Integer(count++), "tape", "1.00", "1.49", new Date(), new Integer(1)},
                   {new Integer(count++), "stapler", "4.00", "4.49", new Date(), new Integer(1)},
                   {new Integer(count++), "Box of Biros", "1.00", "4.99", new Date(), new Integer(2)},
                   {new Integer(count++), "Blue Biro", "0.10", "0.14", new Date(), new Integer(1)},
                   {new Integer(count++), "legal pad", "1.00", "2.49", new Date(), new Integer(1)},
                   {new Integer(count++), "tape", "1.00", "1.49", new Date(), new Integer(1)},
                   {new Integer(count++), "stapler", "4.00", "4.49", new Date(), new Integer(1)},
                   {new Integer(count++), "Box of Biros", "1.00", "4.99", new Date(), new Integer(2)},
                   {new Integer(count++), "Blue Biro", "0.10", "0.14", new Date(), new Integer(1)},
                   {new Integer(count++), "legal pad", "1.00", "2.49", new Date(), new Integer(1)},
                   {new Integer(count++), "tape", "1.00", "1.49", new Date(), new Integer(1)},
                   {new Integer(count++), "stapler", "4.00", "4.49", new Date(), new Integer(1)},
                   {new Integer(count++), "Box of Biros", "1.00", "4.99", new Date(), new Integer(2)},
                   {new Integer(count++), "Blue Biro", "0.10", "0.14", new Date(), new Integer(1)},
                   {new Integer(count++), "legal pad", "1.00", "2.49", new Date(), new Integer(1)},
                   {new Integer(count++), "tape", "1.00", "1.49", new Date(), new Integer(1)},
                   {new Integer(count++), "stapler", "4.00", "4.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "Box of Biros", "1.00", "4.99", new Date(), new Integer(2)},
                   {new Integer(count++),  "Blue Biro", "0.10", "0.14", new Date(), new Integer(1)},
                   {new Integer(count++),  "legal pad", "1.00", "2.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "tape", "1.00", "1.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "stapler", "4.00", "4.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "Box of Biros", "1.00", "4.99", new Date(), new Integer(2)},
                   {new Integer(count++),  "Blue Biro", "0.10", "0.14", new Date(), new Integer(1)},
                   {new Integer(count++),  "legal pad", "1.00", "2.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "tape", "1.00", "1.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "stapler", "4.00", "4.49", new Date(), new Integer(1)},
                   {new Integer(count++),  "Box of Biros", "1.00", "4.99", new Date(), new Integer(2)}
              TableModel dataModel = new AbstractTableModel()
                   public int getColumnCount() { return headers.length; }
                   public int getRowCount() { return data.length;}
                   public Object getValueAt(int row, int col)
                        return data[row][col];
                   public String getColumnName(int column)
                        return headers[column];
                   public Class getColumnClass(int col)
                        return getValueAt(0,col).getClass();
                   public boolean isCellEditable(int row, int col)
                        return (col==1);
                   public void setValueAt(Object aValue, int row, int column)
                        data[row][column] = aValue;
              tableView = new JTable(dataModel);
              JScrollPane scrollpane = new JScrollPane(tableView);
              scrollpane.setPreferredSize(new Dimension(500, 80));
              frame.getContentPane().setLayout(new BorderLayout());
              frame.getContentPane().add(BorderLayout.CENTER,scrollpane);
              frame.pack();
              JButton printButton= new JButton();
              printButton.setText("print me!");
              frame.getContentPane().add(BorderLayout.SOUTH,printButton);
              // for faster printing turn double buffering off
              RepaintManager.currentManager(frame).setDoubleBufferingEnabled(false);
              printButton.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent evt)
                        doPrint();
              frame.setVisible(true);
          * Reset variables before printing
         private void prepareForPrint()
              pages = new ArrayList();
              first_pass = true;
          * Display a print dialog with some hardcoded defaults
          * The print fonts are also hardcoded
         public void doPrint()
              try
                   String jobName = "Java Report";
                   defaultFont = new Font("Arial", Font.PLAIN, 8);
                   footerFont = new Font("Arial", Font.PLAIN, 6);
                   headerFont = new Font("Arial", Font.BOLD, 10);
                   PrinterJob prnJob = PrinterJob.getPrinterJob();
                   prnJob.setPrintable(this);
                   PrintRequestAttributeSet prnSet = new HashPrintRequestAttributeSet();
                   prnSet.add(new Copies(1));
                   prnSet.add(new JobName(jobName, null));
                   prnSet.add(MediaSizeName.ISO_A4);
                   PageFormat pf = prnJob.defaultPage();
                   pf.setOrientation(java.awt.print.PageFormat.PORTRAIT);
                   prnJob.setJobName(jobName);
                   PrintService[] services = PrinterJob.lookupPrintServices();
                   if (services.length > 0)
                        if (prnJob.printDialog(prnSet))
                              * Get print date
                             String dateFormat = "dd/MM/yyyy HH:mm:ss";
                             DateFormat m_DateFormat = new SimpleDateFormat(dateFormat);
                             lastPrintDate = m_DateFormat.format(new Date()).toString();
                             prepareForPrint();
                             prnJob.print(prnSet);
                   else
                        JOptionPane.showMessageDialog(frame, "No Printer was found!!", "Printer Error", JOptionPane.ERROR_MESSAGE);
                        return;
              catch (PrinterException e)
                   e.printStackTrace();
         public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException
               * Check if this is the first time the print method is called for this print action.
               * It is not guaranteed that the print will be called with synchronous pageIndex'es,
               * so we need to calculate the number of pages and which rows appear on which pages.
               * Then the correct page will be printed regardless of which pageIndex is sent through.
              if (first_pass)
                   calcPages(g, pageFormat);
              first_pass = false;
              // Stop printing if the pageIndex is out of range
              if (pageIndex >= pages.size())
                   return NO_SUCH_PAGE;
              Graphics2D     g2 = (Graphics2D) g;
              g2.setColor(Color.black);
              // The footer will be one line at the bottom of the page, cater for this.
              g2.setFont(footerFont);
              footerHeight = g2.getFontMetrics().getHeight() + g2.getFontMetrics().getDescent();
              g2.setFont(defaultFont);
              FontMetrics fontMetrics = g2.getFontMetrics();
              int fontHeight = fontMetrics.getHeight();
              int fontDescent = fontMetrics.getDescent();
              double pageHeight = pageFormat.getImageableHeight() + pageFormat.getImageableY();
              double pageWidth = pageFormat.getImageableWidth();
              double tableWidth = (double) tableView.getColumnModel().getTotalColumnWidth();
              // Shrink or expand the table to fit the page width
              double scale = pageWidth / (tableWidth+ (cellBuffer * tableView.getColumnCount()));
              // Calculate the width in pixels for each column
              double[] columnWidths = new double[tableView.getColumnCount()];
              for(int i = 0; i < tableView.getColumnCount(); i++)
                   columnWidths[i] = (double)tableView.getColumnModel().getColumn(i).getWidth() * scale;
              // Reset the view to the start of the page
              g2.translate(0, 0);
              // Draw a rectangle to see the printable area
              g2.draw3DRect((int)pageFormat.getImageableX(),
                        (int)pageFormat.getImageableY(),
                        (int)pageFormat.getImageableWidth(),
                        (int)pageFormat.getImageableHeight(),
                        false);
              // Calculate the header height
              g2.setFont(headerFont);
              fontMetrics = g2.getFontMetrics();
              // Print the headers and retreive the starting position for the data
              int next_row = printLine(g2, pageFormat, fontMetrics, -1, (int)pageFormat.getImageableY() + fontHeight, columnWidths);
              g2.setFont(defaultFont);
              fontMetrics = g2.getFontMetrics();
              // Start printing the detail
              ArrayList page = (ArrayList)pages.get(pageIndex);
              int start = ((Integer)page.get(0)).intValue();
              int end = ((Integer)page.get(1)).intValue();
              for (int i = start; i <= end; i++)
                   next_row = printLine(g2, pageFormat, fontMetrics, i, next_row, columnWidths);
              // Print the footer
              g2.setFont(footerFont);
              String pageFooter = "Page " + (pageIndex + 1) + " - " + lastPrintDate;
              g2.drawString(pageFooter,
                             (int)pageFormat.getWidth() / 2 - (fontMetrics.stringWidth(pageFooter) / 2),
                             (int)(pageHeight - fontDescent));
              return PAGE_EXISTS;
          * We can't guarantee that the same amount of rows will be displayed on each page,
          * the row heights are dynamic and may wrap onto 2 or more lines.
          * Thus we need to calculate the height of each row and then test how may rows
          * fit on a specific page. eg. Page 1 contains rows 1 to 10, Page 2 contains rows 11 to 15 etc.
         public void calcPages(Graphics g, PageFormat pageFormat) throws PrinterException
              Graphics2D     g2 = (Graphics2D) g;
              g2.setColor(Color.black);
              // The footer will be one line at the bottom of the page, cater for this.
              g2.setFont(footerFont);
              footerHeight = g2.getFontMetrics().getHeight() + g2.getFontMetrics().getDescent();
              g2.setFont(defaultFont);
              FontMetrics fontMetrics = g2.getFontMetrics();
              int fontHeight = fontMetrics.getHeight();
              int fontDescent = fontMetrics.getDescent();
              double pageHeight = pageFormat.getImageableHeight() - fontHeight;
              double pageWidth = pageFormat.getImageableWidth();
              double tableWidth = (double) tableView.getColumnModel().getTotalColumnWidth();
              // Shrink or expand the table to fit the page width
              double scale = pageWidth / (tableWidth+ (cellBuffer * tableView.getColumnCount()));
              // Calculate the width in pixels for each column
              double[] columnWidths = new double[tableView.getColumnCount()];
              for(int i = 0; i < tableView.getColumnCount(); i++)
                   columnWidths[i] = (double)tableView.getColumnModel().getColumn(i).getWidth() * scale;
              // Calculate the header height
              int maxHeight = 0;
              g2.setFont(headerFont);
              fontMetrics = g2.getFontMetrics();
              for (int j = 0; j < tableView.getColumnCount(); j++)
                   String value = tableView.getColumnName(j).toString();
                   int numLines = (int)Math.ceil(fontMetrics.stringWidth(value) / columnWidths[j]);
                   if (numLines > maxHeight)
                        maxHeight = numLines;
              headerHeight = g2.getFontMetrics().getHeight() * maxHeight;
              g2.setFont(defaultFont);
              fontMetrics = g2.getFontMetrics();
              int pageNum = 0;
              int bottom_of_page = (int)(pageFormat.getImageableHeight() + pageFormat.getImageableY()) - footerHeight;
              int prev_row = 0;
              int next_row = (int)pageFormat.getImageableY() + fontHeight + headerHeight;
              int i = 0;
              ArrayList page = new ArrayList();
              page.add(new Integer(0));
              for (i = 0; i < tableView.getRowCount(); i++)
                   maxHeight = 0;
                   for (int j = 0; j < tableView.getColumnCount(); j++)
                        String value = tableView.getValueAt(i, j).toString();
                        int numLines = (int)Math.ceil(fontMetrics.stringWidth(value) / columnWidths[j]);
                        if (numLines > maxHeight)
                             maxHeight = numLines;
                   prev_row = next_row;
                   next_row += (fontHeight * maxHeight);
                   // If we've reached the bottom of the page then set the current page's end row
                   if (next_row > bottom_of_page)
                        page.add(new Integer(i - 1));
                        pages.add(page);
                        page = new ArrayList();
                        page.add(new Integer(i));
                        pageNum++;
                        next_row = (int)pageFormat.getImageableY()
                                       + fontHeight
                                       + ((int)pageFormat.getHeight() * pageNum)
                                       + headerHeight;
                        bottom_of_page = (int)(pageFormat.getImageableHeight()
                                            + pageFormat.getImageableY())
                                            + ((int)pageFormat.getHeight() * pageNum)
                                            - footerHeight;
                        //Include the current row on the next page, because there is no space on this page
                        i--;
              page.add(new Integer(i - 1));
              pages.add(page);
          * Print the headers or a row from the table to the graphics context
          * Return the position of the row following this one
         public int printLine(Graphics2D g2,
                                       PageFormat pageFormat,
                                       FontMetrics fontMetrics,
                                       int rowNum,
                                       int next_row,
                                       double[] columnWidths)
                   throws PrinterException
              int lead = 0;
              int maxHeight = 0;
              for (int j = 0; j < tableView.getColumnCount(); j++)
                   String value = null;
                   int align = LEFT_ALIGN;
                   if (rowNum > -1)
                        Object obj = tableView.getValueAt(rowNum, j);
                        if (obj instanceof Number)
                             align = RIGHT_ALIGN;
                        value = obj.toString();
                   else
                        align = CENTER_ALIGN;
                        value = tableView.getColumnName(j);
                   int numLines = (int)Math.ceil(fontMetrics.stringWidth(value) / columnWidths[j]);
                   if (numLines > maxHeight)
                        maxHeight = numLines;
                   if (fontMetrics.stringWidth(value) < columnWidths[j])
                        // Single line
                        int offset = 0;
                        // Work out the offset from the start of the column to display alignment correctly
                        switch (align)
                             case RIGHT_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value)); break;
                             case CENTER_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value)) / 2; break;
                             default: offset = 0; break;
                        g2.drawString(value,
                                       lead + (int)(pageFormat.getImageableX() + offset),
                                       next_row);
                   else
                        for(int a = 0; a < numLines; a++)
                             //Multi-Line
                             int x = 0;
                             int width = 0;
                             for(x = 0; x < value.length(); x++)
                                  width += fontMetrics.charWidth(value.charAt(x));
                                  if (width > columnWidths[j])
                                       break;
                             int offset = 0;
                             // Work out the offset from the start of the column to display alignment correctly
                             switch (align)
                                  case RIGHT_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value)); break;
                                  case CENTER_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value)) / 2; break;
                                  default: offset = 0; break;
                             g2.drawString(value.substring(0, x),
                                            lead + (int)(pageFormat.getImageableX() + offset),
                                            next_row + (fontMetrics.getHeight() * a));                    
                             value = value.substring(x);
                   lead += columnWidths[j] + cellBuffer;
              // Draw a solid line below the row
              g2.draw(new Line2D.Double(pageFormat.getImageableX(),
                             next_row + (fontMetrics.getHeight() * (maxHeight - 1)) + fontMetrics.getDescent(),
                             pageFormat.getImageableY() + pageFormat.getImageableWidth(),
                             next_row + (fontMetrics.getHeight() * (maxHeight - 1)) + fontMetrics.getDescent()));
              // Return the position of the row following this one
              return next_row + (fontMetrics.getHeight() * maxHeight);
         public static void main(String[] args)
              new Report();
    }

    Fixed some bugs and added a title. Just pass in a JTable and the class will do the rest.
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.print.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    import java.text.*;
    import java.math.*;
    public class PrintJTable implements Printable
         private final int LEFT_ALIGN = -1;
         private final int CENTER_ALIGN = 0;
         private final int RIGHT_ALIGN = 1;
         private JFrame m_parent;
         private String m_title;
         private JTable tableView;
         private String lastPrintDate;
         private Font defaultFont;
         private Font headerFont;
         private Font footerFont;
         private int headerHeight;
         private int footerHeight;
         private int cellBuffer = 5;
         private boolean first_pass;
         private ArrayList pages;
         public PrintJTable(JFrame parent, JTable table)
              m_parent = parent;
              tableView = table;
              doPrint();
         public PrintJTable(JFrame parent, String title, JTable table)
              m_parent = parent;
              m_title = title;
              tableView = table;
              doPrint();
          * Reset variables before printing
         private void prepareForPrint()
              pages = new ArrayList();
              first_pass = true;
          * Display a print dialog with some hardcoded defaults
          * The print fonts are also hardcoded
         public void doPrint()
              try
                   String jobName = "Java Report";
                   defaultFont = new Font("Arial", Font.PLAIN, 8);
                   footerFont = new Font("Arial", Font.PLAIN, 6);
                   headerFont = new Font("Arial", Font.BOLD, 8);
                   PrinterJob prnJob = PrinterJob.getPrinterJob();
                   prnJob.setPrintable(this);
                   PrintRequestAttributeSet prnSet = new HashPrintRequestAttributeSet();
                   prnSet.add(new Copies(1));
                   prnSet.add(new JobName(jobName, null));
                   prnSet.add(MediaSizeName.ISO_A4);
                   PageFormat pf = prnJob.defaultPage();
                   pf.setOrientation(java.awt.print.PageFormat.PORTRAIT);
                   prnJob.setJobName(jobName);
                   PrintService[] services = PrinterJob.lookupPrintServices();
                   if (services.length > 0)
                        if (prnJob.printDialog(prnSet))
                              * Get print date
                             String dateFormat = "dd/MM/yyyy HH:mm:ss";
                             DateFormat m_DateFormat = new SimpleDateFormat(dateFormat);
                             lastPrintDate = m_DateFormat.format(new Date()).toString();
                             prepareForPrint();
                             prnJob.print(prnSet);
                   else
                        JOptionPane.showMessageDialog(m_parent, "No Printer was found!!", "Printer Error", JOptionPane.ERROR_MESSAGE);
                        return;
              catch (PrinterException e)
                   e.printStackTrace();
         public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException
               * Check if this is the first time the print method is called for this print action.
               * It is not guaranteed that the print will be called with synchronous pageIndex'es,
               * so we need to calculate the number of pages and which rows appear on which pages.
               * Then the correct page will be printed regardless of which pageIndex is sent through.
              if (first_pass)
                   calcPages(g, pageFormat);
              first_pass = false;
              // Stop printing if the pageIndex is out of range
              if (pageIndex >= pages.size())
                   return NO_SUCH_PAGE;
              Graphics2D     g2 = (Graphics2D) g;
              g2.setColor(Color.black);
              // The footer will be one line at the bottom of the page, cater for this.
              g2.setFont(footerFont);
              footerHeight = g2.getFontMetrics().getHeight() + g2.getFontMetrics().getDescent();
              g2.setFont(defaultFont);
              FontMetrics fontMetrics = g2.getFontMetrics();
              int fontHeight = fontMetrics.getHeight();
              int fontDescent = fontMetrics.getDescent();
              double pageHeight = pageFormat.getImageableHeight() + pageFormat.getImageableY();
              double pageWidth = pageFormat.getImageableWidth();
              double tableWidth = (double) tableView.getColumnModel().getTotalColumnWidth();
              // Shrink or expand the table to fit the page width
              double scale = (pageWidth - (cellBuffer * tableView.getColumnCount())) / tableWidth;
              // Calculate the width in pixels for each column
              double[] columnWidths = new double[tableView.getColumnCount()];
              double test = 0;
              for(int i = 0; i < tableView.getColumnCount(); i++)
                   columnWidths[i] = (double)Math.floor(tableView.getColumnModel().getColumn(i).getWidth() * scale);
                   test += columnWidths;
              // Reset the view to the start of the page
              g2.translate(0, 0);
              // Draw a rectangle to see the printable area
              g2.draw3DRect((int)pageFormat.getImageableX(),
                        (int)pageFormat.getImageableY(),
                        (int)pageFormat.getImageableWidth(),
                        (int)pageFormat.getImageableHeight(),
                        false);
              // Calculate the header height
              g2.setFont(headerFont);
              fontMetrics = g2.getFontMetrics();
              // Print the headers and retreive the starting position for the data
              int next_row = (int)pageFormat.getImageableY() + fontMetrics.getHeight();
              if ((m_title != null) && (!m_title.equalsIgnoreCase("")))
                   g2.drawString(m_title,
                                       (int)(pageFormat.getImageableX()),
                                       next_row);
                   Color current_color = g2.getColor();
                   g2.setColor(Color.lightGray);
                   int y = next_row + fontMetrics.getDescent();
                   g2.draw(new Line2D.Double(pageFormat.getImageableX(),
                                  y,
                                  (pageFormat.getImageableY() + pageFormat.getImageableWidth()),
                                  y));
                   g2.setColor(current_color);
                   next_row += fontMetrics.getHeight();
              next_row = printLine(g2, pageFormat, fontMetrics, -1, next_row, columnWidths);
              g2.setFont(defaultFont);
              fontMetrics = g2.getFontMetrics();
              // Start printing the detail
              ArrayList page = (ArrayList)pages.get(pageIndex);
              int start = ((Integer)page.get(0)).intValue();
              int end = ((Integer)page.get(1)).intValue();
              for (int i = start; i <= end; i++)
                   next_row = printLine(g2, pageFormat, fontMetrics, i, next_row, columnWidths);
              // Print the footer
              g2.setFont(footerFont);
              String pageFooter = "Page " + (pageIndex + 1) + " - " + lastPrintDate;
              g2.drawString(pageFooter,
                             (int)pageFormat.getWidth() / 2 - (fontMetrics.stringWidth(pageFooter) / 2),
                             (int)(pageHeight - fontDescent));
              return PAGE_EXISTS;
         * We can't guarantee that the same amount of rows will be displayed on each page,
         * the row heights are dynamic and may wrap onto 2 or more lines.
         * Thus we need to calculate the height of each row and then test how may rows
         * fit on a specific page. eg. Page 1 contains rows 1 to 10, Page 2 contains rows 11 to 15 etc.
         public void calcPages(Graphics g, PageFormat pageFormat) throws PrinterException
              Graphics2D     g2 = (Graphics2D) g;
              g2.setColor(Color.black);
              // The footer will be one line at the bottom of the page, cater for this.
              g2.setFont(footerFont);
              footerHeight = g2.getFontMetrics().getHeight() + g2.getFontMetrics().getDescent();
              g2.setFont(defaultFont);
              FontMetrics fontMetrics = g2.getFontMetrics();
              int fontHeight = fontMetrics.getHeight();
              int fontDescent = fontMetrics.getDescent();
              double pageHeight = pageFormat.getImageableHeight() - fontHeight;
              double pageWidth = pageFormat.getImageableWidth();
              double tableWidth = (double) tableView.getColumnModel().getTotalColumnWidth();
              // Shrink or expand the table to fit the page width
              double scale = (pageWidth - (cellBuffer * tableView.getColumnCount())) / tableWidth;
              // Calculate the width in pixels for each column
              double[] columnWidths = new double[tableView.getColumnCount()];
              for(int i = 0; i < tableView.getColumnCount(); i++)
                   columnWidths[i] = (double)Math.floor(tableView.getColumnModel().getColumn(i).getWidth() * scale);
              // Calculate the header height
              int maxHeight = 0;
              g2.setFont(headerFont);
              fontMetrics = g2.getFontMetrics();
              headerHeight = 0;
              if ((m_title != null) && (!m_title.equalsIgnoreCase("")))
                   headerHeight = fontMetrics.getHeight();
              for (int j = 0; j < tableView.getColumnCount(); j++)
                   String value = tableView.getColumnName(j).toString();
                   int numLines = (int)Math.ceil(fontMetrics.stringWidth(value) / columnWidths[j]);
                   if (numLines > maxHeight)
                        maxHeight = numLines;
              headerHeight += g2.getFontMetrics().getHeight() * maxHeight;
              g2.setFont(defaultFont);
              fontMetrics = g2.getFontMetrics();
              int pageNum = 0;
              int bottom_of_page = (int)(pageFormat.getImageableHeight() + pageFormat.getImageableY()) - footerHeight;
              int prev_row = 0;
              int next_row = (int)pageFormat.getImageableY() + fontHeight + headerHeight;
              int i = 0;
              ArrayList page = new ArrayList();
              page.add(new Integer(0));
              for (i = 0; i < tableView.getRowCount(); i++)
                   maxHeight = 0;
                   for (int j = 0; j < tableView.getColumnCount(); j++)
                        String value = formatObject(tableView.getValueAt(i, j));
                        int numLines = (int)Math.ceil(fontMetrics.stringWidth(value) / columnWidths[j]);
                        if (numLines > maxHeight)
                             maxHeight = numLines;
                   prev_row = next_row;
                   next_row += (fontHeight * maxHeight);
                   // If we've reached the bottom of the page then set the current page's end row
                   if (next_row > bottom_of_page)
                        page.add(new Integer(i - 1));
                        pages.add(page);
                        page = new ArrayList();
                        page.add(new Integer(i));
                        pageNum++;
                        next_row = (int)pageFormat.getImageableY()
                                       + fontHeight
                                       + ((int)pageFormat.getHeight() * pageNum)
                                       + headerHeight;
                        bottom_of_page = (int)(pageFormat.getImageableHeight()
                                            + pageFormat.getImageableY())
                                            + ((int)pageFormat.getHeight() * pageNum)
                                            - footerHeight;
                        //Include the current row on the next page, because there is no space on this page
                        i--;
              page.add(new Integer(i - 1));
              pages.add(page);
         * Print the headers or a row from the table to the graphics context
         * Return the position of the row following this one
         public int printLine(Graphics2D g2,
                                       PageFormat pageFormat,
                                       FontMetrics fontMetrics,
                                       int rowNum,
                                       int next_row,
                                       double[] columnWidths)
                   throws PrinterException
              int lead = 0;
              int maxHeight = 0;
              for (int j = 0; j < tableView.getColumnCount(); j++)
                   String value = null;
                   int align = LEFT_ALIGN;
                   if (rowNum > -1)
                        Object obj = tableView.getValueAt(rowNum, j);
                        if (obj instanceof Number)
                             align = RIGHT_ALIGN;
                        value = formatObject(obj);
                   else
                        //align = CENTER_ALIGN;
                        value = tableView.getColumnName(j);
                   int numLines = (int)Math.ceil(fontMetrics.stringWidth(value) / columnWidths[j]);
                   if (numLines > maxHeight)
                        maxHeight = numLines;
                   if (fontMetrics.stringWidth(value) < columnWidths[j])
                        // Single line
                        int offset = 0;
                        // Work out the offset from the start of the column to display alignment correctly
                        switch (align)
                             case RIGHT_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value)); break;
                             case CENTER_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value)) / 2; break;
                             default: offset = 0; break;
                        g2.drawString(value,
                                       lead + (int)(pageFormat.getImageableX() + offset),
                                       next_row);
                   else
                        for(int a = 0; a < numLines; a++)
                             //Multi-Line
                             int x = 0;
                             int width = 0;
                             for(x = 0; x < value.length(); x++)
                                  width += fontMetrics.charWidth(value.charAt(x));
                                  if (width > columnWidths[j])
                                       break;
                             int offset = 0;
                             // Work out the offset from the start of the column to display alignment correctly
                             switch (align)
                                  case RIGHT_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value.substring(0, x))); break;
                                  case CENTER_ALIGN: offset = (int)(columnWidths[j] - fontMetrics.stringWidth(value.substring(0, x))) / 2; break;
                                  default: offset = 0; break;
                             g2.drawString(value.substring(0, x),
                                            lead + (int)(pageFormat.getImageableX() + offset),
                                            next_row + (fontMetrics.getHeight() * a));                    
                             value = value.substring(x);
                   lead += columnWidths[j] + cellBuffer;
              // Draw a solid line below the row
              Color current_color = g2.getColor();
              g2.setColor(Color.lightGray);
              int y = next_row + (fontMetrics.getHeight() * (maxHeight - 1)) + fontMetrics.getDescent();
              g2.draw(new Line2D.Double(pageFormat.getImageableX(),
                             y,
                             (pageFormat.getImageableY() + pageFormat.getImageableWidth()),
                             y));
              g2.setColor(current_color);
              // Return the position of the row following this one
              return next_row + (fontMetrics.getHeight() * maxHeight);
         public String formatObject(Object obj)
              String value = (obj == null) ? "" : obj.toString();
              return value;

  • Printer problems with Officejet Pro 8500 A910

    Dear all,
    I have been given as a present an Officejet Pro 8500 A910 (serie number CN16LDM020 and product number CM756A). The people whom I have got it from already had some problems with the printer heads. I have accepted the printer, because I want to have it working again. I do encounter some problems however. I hope you kind people on the forum can help me out and get this thing working again. As a side note: I am only interested in using the scanner, printer (only black and white - I do not print in colour) and e-printing (I understand that it is possible to email documents to printer, so that they are printed whilst you are somewhere else). 
    Upon installation I have conneted the internet to my wi-fi. Upon installation it made some test prints, whereby the black dots were good, but the cyan and other colours were not. When I now turn off the installed printer and switch it on again it takes the printer about 5 - 7 minutes to initialize. On the touch screen of the printer it is said "Checking printer, this might take 5 minutes", "Checking printheads", "Aligning printheads" and alike notifications. After 5 - 7 minutes the printer gives the following notification: " Failure notice. Alignment failed. Refer to device documentation for details." When I then push the question mark on the touch screen the following notidication is given: " Alignment failed. Check printer quality of the current print job. If it is not satisfactory, try aligning the printer to see if that improves the quality. To align the printhead again, touch (home), touch (arrow right), touch Tools, and then touch Align Printhead." When I follow these instructions, the same thing happens. I have tried the option "Clean printheads" under "Tools". The test prints that come out are again good in black and white and not good in colour. 
    The ink level of the cartridges is very low for Yellow, Magenta and Cyan. For Black the printer gives a question mark. The expiry date of the cartridges is in 2015. The information on the Self Test Diagnostic Page (you get when you print a report from checking the ink cartridges) gives the following status:
    Printhead status
    Printhead health: Good (for both Black/Yellow and Magenta/Cyan)
    Serial: 7735960 (Black/Yellow) and 7744345 (Magenta/Cyan)
    End of warranty: mid-2013
    Accumulated ink usage (ml): Black 99/Yellow 71, Magenta 57/Cyan 58
    Refilled supply:
    Detected in printhead/printer? For all cartidges "yes".
    When I try to print a document from Word on my MacBook (which runs on Mac OS X 10.6.8) and the printer is on stand-by, Word recognizes the printer, starts with the print order but then comes with the notifications "Printer offline" and "Cannot find printer" and postpones the print order. Today I reset the printer and the print job that I had before the reset (which was postponed) came out. 
    Today, I printed a document whilst the printer was not on stand-by (the touch screen was on home menu) and the print was well (it was only black and white). After the print, the printer also made a print report. Again, the colour was bad, but black ink was good. After that print report, the printer started aligning again. After 5 minutes it gave the above-mentioned failure notice (" Failure notice. Alignment failed. Refer to device documentation for details."). 
    I would assume that the first thing that I should do is get new cartridges. However, since I only print black and white, can't I just buy the Black Ink and disable the other cartridges? Then, I am thinking of not buying HP cartridges (since the warranty term is already over). What cartridges do you reccomend (price-quality)? If  new cartridges are installed (previous owner had same problems with full cartridges) and the problems (with print heads) are not solved, what should I do? 
    On a second note, I want to use the option of printing online. In other words, give a print order on my Iphone to the printer so that it starts printing at home. How do I set this up? How can I test this?
    I would be very obliged with your feedback on the above. 
    Kind regards,
    Onno

    Hey Onno,
    I see you have several items listed about your Officejet Pro 8500a (A910 series) printer.  The main issue that stands out is the print quality issue.  I would advise starting here with your printer.  
    From your information I can see that refill or remanufacture cartridges have been used in this printer at some point.  It is possible that the ink from these cartridges have damaged the internal ink system of the printer.  If you have performed all the troubleshooting steps for the print quality issue you are experiencing, then the next step is going to be replacing the printheads of the unit.
    Troubleshooting Print Quality Issues
    The 8500a requires all cartridges be available even if you are simply printing in B&W.  If the cartridges are low, then you will have to replace the cartridges as needed.  Typically by the design of this printer, however, print quality issues do not follow ink levels in the cartridges as ink is piped to the internal printheads, thus even with empty cartridges there is some ink remaining in the system.
    The printheads for the 8500a can be found at most HP certified retailers if you decide to attempt replacing them as a step towards resolving the issue.  As to the cartridges, I would advise using genuine HP cartridges as HP ink is designed with HP printers in mind.  For information about refilled/remanufactured cartridges please click here.
    Hope this helps in getting the print quality issue alleviated,
    Jason
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • Detailed pop up screen in selection screen - urgent

    hai experts,
    how can we give a detailed pop up screen in selection screen.
    My requirement is,
    To display Details of spool Nos taken for current porogram to take print out from end user.
    from OWN SPOOL REQUEST displays all other programs........
    can any one give a right solution?
    reward will avail for use full answer.
    thanks in advance.
    regards,
    jai.m

    Hi Jai
    May be you can use this FM POPUP_WITH_TABLE_DISPLAY_OK with the list of spool number populated into internal table.
    If you are particulary looking for selection screen, then decalre your selection screen as below
    Selection-screen begin of screen 9000.
    Selection-screen end of screen.
    Then use the statement Call selection-screen 9000 starting at x y.
    Hope this helps !
    Regards
    Ranganath

  • Please wait. printer preperation occurring. keeps showing on screen

    if i hook up with usb i can print but "please wait. printer preperation occurring". keeps showing on screen can anybody help me?

    Please read this post then provide some details.  What printer model? What operating system? 
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How to sync iCal with Google calendar (both ways)???

    I have been trying to sync my ical with my google calendar both ways.
    I got all new event created in google calendar syncing into iCal but i can't get the one created in iCal go into google calendar.
    Help please!!!!
    thx

    When entering a new event in iCal be sure your "google" calendar is highlighted on the left had side of your screen. That makes Google your default calendar as you add events. Or you can choose which calendar from the drop-down box in the details box when adding a new entry. The down side is that is seems you can only select one Calendar; so the "Home", "Work", "Untitled" options become moot if you want to sync back to google.
    If you already had events scheduled in iCal; you can right click on them, select "Calendar" and then choose your google calendar. When you refresh your google calendar that event should show up.
    You simply need to be sure what Calendar you're entering into. Also if you wait a few SECONDS the calendars DO sync without any need to manually synchronize them.
    So basically, ensure you're entering into the Google Calendar in iCal and wait a minute.

Maybe you are looking for

  • OneNote recordings "We're sorry, we can't open the file because it is in use by another program."

    Constantly, OneNote breaks and screws up my recordings that are synced with my lectures. It is such a fragile process and very frustrating. As soon as I'm done recording, I press stop. When I test the recording, it says, "We're sorry, we can't open t

  • Help reqd on Material Master uploading in LSMW by view steps....

    Hi all.... Pls understand my requirement and post ur replies...i dont need the basic LSMW learning steps for MM,Vendor etc.,like that... My problem is...im want to upload my material master datas by steps like 1st i want to uplaod the basic views 1&2

  • Displaying a query in web bex does not work

    hi, we have a new installed bi. (installed by our outsourcing-partner) when i open a query with query designer, and then execute it (via web) i get a message that the side coud not be opened. when i am looking to the link which is created, it begins

  • Java.lang.ClassNotFoundException but path is correct

    HELLO I AM USING JDEVELOPER AS AN APPLICATION TOOL. BELOW I AM SENDING MY APPLET AND HTML CODE. WHEN I AM TRYING TO RUN MY HTML FILE BY OC4J SERVER�(EMBEDDED) I AM FACING WITH THAT PROBLEM... java.lang.ClassNotFoundException: Applet1 at com/ms/vm/loa

  • Item Refresh in WAD

    is there any possibility to refresh only the analysis item without refreshing the whole page in Web Application Designer..