Printing and converting to pdf

Hi,
any ideas how should I do following tasks? I have a chart which I need to print or convert into pdf. Following code does the basics and now I need some advices.
import java.awt.event.*;
import java.awt.*;
import javax.swing.SwingUtilities;
import javax.swing.JPopupMenu;
import javax.swing.JMenuItem;
public class MyChart extends Frame  {
     final Draw panel;
     public MyChart(){     
          addWindowListener(new WindowAdapter()     {     
               public void windowClosing(WindowEvent ev)           
               dispose();               
               System.exit(0);
          setBounds(1,1,670,450);     
          panel = new Draw();     
          add(panel);          
          setVisible(true);
          MouseListener ml = new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
               if (SwingUtilities.isRightMouseButton(e)) {
                 Point p = e.getPoint();
                 System.out.println("Mouse pressed");
            }//mousePressed
            public void mouseReleased(MouseEvent e) {
              if (SwingUtilities.isRightMouseButton(e)) {
                    Point p = e.getPoint();
                    MyPopupMenu jPopupMenu1 = new MyPopupMenu();
                    jPopupMenu1.show(panel, p.x, p.y);
                    System.out.println("Mouse released");
            }//mouseReleased
          };//mouseListener
          panel.addMouseListener(ml);
     public class Draw extends Panel{     
          int xt[] = {1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1};     
          int yv[] = {40,15,30,90,105,128,120,98,199,250,269,203,90,210,200,145};          
          int sx = 40;     
          int sy = 30;     
          public Draw(){     
               super();     
               setBackground(Color.pink);
          public void paint(Graphics g){      
               g.setColor(Color.white);     
               for (int i=0; i < 21; i++)     {          
                    g.setColor(Color.white);          
                    g.drawLine(i*30+sx,sy,i*30+sx,sy*10);          
                    g.setColor(Color.blue);          
                    g.drawString(""+i*30,i*sy+sy+2,30*10+30/2);     
               for (int i=0; i < 10; i++)     {          
                    g.setColor(Color.lightGray);          
                    g.drawLine(sx,i*30+sy,20*30+sx,i*30+sy);          
                    g.setColor(Color.blue);          
                    g.drawString(""+i*30,10,i*sy+sy+2);     
               g.setColor(Color.black);     
               for (int i=0; i < xt.length-1; i++)     {          
                    if (xt[ i ] == 1)          
                         g.drawLine(i*30+sx,yv[ i ]+sy,(i+1)*30+sx,yv[ i+1 ]+sy);     
          public void update(Graphics g){     
               paint(g);
     public class MyPopupMenu extends JPopupMenu {
          JMenuItem menuItem, menuItem2;
          public MyPopupMenu() {
                    menuItem = new JMenuItem("Print chart");
                    menuItem.addActionListener(new ActionListener() {
                      public void actionPerformed(ActionEvent e) {
                        System.out.println("Printing...");
                    menuItem2 = new JMenuItem("Convert to pdf");
                    menuItem2.addActionListener(new ActionListener() {
                      public void actionPerformed(ActionEvent e) {
                        System.out.println("Converting...");
                    add(menuItem);
                    add(menuItem2);
     public static void main(String[] args ) {     
          new MyChart();
}

I wrote a document a while back describing how to use JFreeChart and iText to generate charts in PDF format. You can download it from the JFreeChart project page on SourceForge:
http://sourceforge.net/projects/jfreechart
Look in the 'Files' section under 'Documentation' for a file called 'jfreechart2pdf-v2.pdf'. It should give you some pointers.
Regards,
Dave Gilbert
JFreeChart Project Leader

Similar Messages

  • How do you scan a document from printer to convert to PDF?

    How do you scan a document from printer to convert to PDF?

    Have the scanner connected to the computer.
    Have the scanner software installed.
    Check the scanner manufacturer's website for the most recent / updated drivers and install same.
    Have Acrobat XI installed.
    While Acrobat XI can make use of Windows WIA drivers Acrobat "likes" TWAIN drivers best.
    So, if available, have the latest-greatest TWAIN.
    Acrobat can communicate with the scanner via the scanner software.
    An alternative --
    Scan directly to TIFF. Then use Acrobat to create PDF from the TIFF.
    Some scanners come with software to output to PDF directly; if present you could use that.
    Be well...

  • I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    Hi Brian,
    You can create it in Word or excel and then you can Convert it into .pdf Format
    Here's a feature list that depicts benefits of PDF pack: Convert Word to PDF, Convert PDF to Word & Merge PDFs | Adobe PDF Pack
    Please revert back if you have any other questions or need any help.
    Regards,
    Rahul

  • With Adobe Illustrator I may open doc documents(word) and convert to pdf

    With Adobe Illustrator I may open doc documents(word) and convert to pdf ?

    Ise,
    You can, although (maybe) only the first page of the .doc; this may depend on the Illy version.

  • Printing or Converting to PDF and outputting in current folder?

    Hi all,
    I've got a bunch of Word docs in a bunch of different folders and I'm looking for an easy way to convert them to PDF without much intervention.  I can go into my Adobe PDF printing preferences and specify each folder before I select all the Word docs and print them, but then I have to change the output folder each time.  I'm looking for a way to specify it to just output the PDF to the current folder by default and not bring up a dialog box to rename the file.
    Is there an easy way to do this?  I have docs separated into about 50-100 different folders.  I'd like to just point it to the root folder and click print or convert, but if I have to go into each folder individually, select all and print/convert then that would be more acceptable than the way we have to do it currently.
    Thanks for your time!

    BobLevine wrote:
    Won't do much good if it's a just an image saved as EPS. Of course if it's an Illy EPS that would be the best route.
    Bob
    Quite so, but transparency implied vector to me.

  • Will buzzword allow to upload word template, edit and convert to PDF.

    Hi,
    we have a module in our project where we need to Upload a word template - Edit the template - and save the changes - and attach exisitng uploaded files (for e.g. Word, excel and pdf file) and convert the word template along with the attached file into single PDF.
    So is this possible?
    Can any one help me in this?
    Is there any free download?

    Hello,
    Buzzword is an online word processor that will absolutely allow you to upload a word .doc, edit it in Buzzword format, then export as a PDF. The one part that you can't do with Acrobat.com is to merge files - so you'd either need to merge the word .docs first and then upload, or use Adobe Acrobat desktop software if you need to merge PDF files. There is nothing to download as this is an online tool. Basic accounts are free - you can sign up at www.acrobat.com.
    Please let me know if you have additional questions or concerns.
    Kind Regards,
    Michelle

  • Read a Word/Excel doc and convert to PDF

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java
    Thanks,
    Satya

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

  • Read word/excel doc and convert to pdf

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

  • Download and convert to pdf

    I am attempting to convert a file to a pdf file. It has been sitting on my screen as an upload but has not completing the action. What do I do?

    HI,
    Please try to use another browser if you are using CreatePDF web ui(https://createpdf.acrobat.com/signin.html). If you are using Adobe Reader X or XI then restart Reader then try it again.
    Or try the other way as follows:
    Using Web UI
    Log into https://createpdf.acrobat.com/signin.html with your Adobe ID and password
    Select “Convert to PDF”
    Click “Select Files” button then choose your file
    Click “Download” button in the progress bar after completion of the process to download the PDF file to your computer.
    Using Adobe Reader:
    Launch Adobe Reader X or Reader XI
    Select “Tools” and click “Sign In” link to sign in with your Adobe ID and password
    Select “Create PDF” then click “Select File” button
    Click “Convert” after select your file
    Click “Download Converted File” to download the PDF file to your computer.
    Click “Download Converted File” link to download the file to your computer after the process is completed.
    thank you.
    Hisami

  • Printing of Web Reporting  and Convert into  PDF

    Hi friends,
        I want to give print of my web report from Browser.. what is the procedure for this... my brwser  10 pages of data.. i want to give  specific  page  for    printout...
    And also.. i want to convert my webreport into PDF format... how can i do this...
    can any body tell me what is the procedure for this..
    Thanks.. and    Points will be assigned..
    @jay

    Hi,
    BW Web Publisher Toolbar
    The version of the toolbar that you use with the Web Publisher, depends on whether you store the Web templates on the BW server or the ITS server (see Determining Path and ITS Settings).
    If you have chosen the ITS as the server, the toolbar has the following functions:
    Symbol
    Function
    Create new ITS Web template
    You use this function to create a new Web template.
    Check out ITS Web Template
    You use this function to check out an ITS Web template, and store it locally. Storing the ITS Web template locally, means that you are able to change it, by adding a new item, for example. You either overwrite the old ITS Web template, or create a new one. You have to store the new ITS template under a new name.
    Check in ITS Web Template
    The ITS Web template is checked in, and saved in the BW system.
    Publish to ITS
    The ITS Web template is stored on the ITS you select.
    Display Web template in the Browser
    The Web template that has been checked in and published on the ITS, is displayed in the Web Browser.
    Copy HTML tag to clipboard
    You use this function to save the item as an HTML tag on the clipboard.
    Wizard
    This function takes you to the Web Publisher Wizard.
    See also:
    Creating Web Reports with the Web Publisher Wizard
    If you have chosen BW as the server, the toolbar has the following functions:
    The publish function is deactivated, because it is only used in conjunction with ITS Web templates. The other symbols have the same functions as described in the above table, but they refer instead to Web templates that are stored on the BW server.
    Views
    The saved query views that the Web reports are based on, are displayed in the Views field. You use the Switch Workbook button to get to the Open dialog, where you open queries in other workbooks.
    Items
    The items that are already available for the view you have chosen are displayed in the Items field.
    Choose New Item  to create a new item, and to specify the item type used (map, chart, table, navigation block, and so on).
    Choose Change Attribute  to determine the value of the highlighted attribute for the item you have chosen.
    Choose Save item  to save the item you have been editing.
    Choose Delete item  to delete the selected item.
    Properties of the Current Item
    In the Properties of the current item field, the attributes that correspond to the item type you have selected are displayed. Depending on the type of attribute, you activate or deactivate attributes by double-clicking on the relevant attribute, and you determine the value of the attribute with either a double-click, or by choosing the Change Attribute... function.
    You can convert the spool to PDF using the program RSTXPDFT5 or
    using the fun module CONVERT_ABAPSPOOLJOB_2_PDF.
    then you can mail it to others using the fun module
    SO_NEW_DOCUMENT_ATT_SEND_API1.
    Hareesh

  • Freehand and converting to pdf problem

    for some reason when i try to convert a freehand document to pdf ready for printing im losing an "inline" effect around some of the text.
    i've put an example to illustrate
    http://simonboard.com/photos/pdf.html
    can anyone on these forums help?

    Distiller is part of Acrobat Pro and used to set up files for output to an imagesetter.
    How are you printing these? Is the printer going to make films for burning plates or is this direct from computer to printer?
    If it's direct, as I suspect, then merely save the file as an EPS, then import it into Illustrator to check it over and make sure everything is good. Or just import it into Preview to look at it. They should be able to print from a Freehand EPS, but best to check with them first.
    Instead of using Freehand's export to PDF simply print then instead of clicking on the Print button on the right, look to the left for a button that says "Save as PDF". This would probably be better than the EPS file, but either one can be imported into Illustrator.

  • Illustrator cs6 produces blank document when printing or converting to pdf. can someone help?

    I use illustrator cs6 tryout. when trying to convert the doc to pdf or print, it is producing blank document. i tried taking help online by trying to click layers but print option in layers is unchecked and greyed out.....so cant do much there...any help?

    You will have top provide screenshots of the AI document, exact PDF settings, system info and other details.
    Mylenium

  • Fax the output type and convert to PDF and then to save in UNIX Directory

    Hi,
      I wan to Fax the my sales order acknowldement and at the same time I want to convert that output into PDF and save in the UNIX Directory .
    I also need the code for faxing the sales order acknowledgement.
    Thanks in Advance
    Moderator message: please search for available information/documentation before asking, also see Brad's remarks below.
    Edited by: Thomas Zloch on Dec 20, 2010 9:51 PM

    These are standard processes which are covered in the help files and have been discussed many times here.  This is NOT a training forum for newbies where experts just give you the solution for your requirement.  Once you have proven that you've actually made an effort to solve the issue yourself and have a SPECIFIC technical question, you'll get some help...

  • Automator keeping JPG keyword tags and converting to PDF?

    I scanned a bunch of documents and put them into iPhoto and meticulously tagged them.
    Now I've decided I'd rather have them as PDFs so I can run OCR on them)
    I do not want to lose my keywords.
    I can export the images from iPhoto and preserve the keywords
    the problem is... whether I use Acrobat Pro or Preview, there's no way to convert the JPGs to PDF and keep that embedded metadata.
    How can I export from iPhoto and get my keywords put into the file's spotlight comments?
    Some way with Automator?

    A solution is now available thanks to me. I wrote the author of the Photoshop CS3 Automator Action Pack and upon my suggestion he has added a new Copy IPTC data to Spotlight Comments action.
    Now you can use Photoshop and Automator to convert iPhoto exported JPGs with Keywords embedded in the IPTC field to PDF's with Spotlight comments.

  • ABAP list to spool and converting to pdf problem in QAS

    Hi
             i am converting the report output to PDF by submitting the spool. i done evrything. but my problem is
    in DEV -everything is ok.when i downalod pdf is coming fine with all fields.
    in QAS- pdf is coming with half page. some fields are cutting off.
    in program i given the format like this.
    wa_pri_params-paart = 'X_65_80'.
        wa_pri_params-linsz = '185'.
      can anyone suggest?? and also can i increase programatically the size becoz it is displaying with small size??

    Programatically you can specify the size by giving
    REPORT XXXXXX NO STANDARD PAGE HEADING
                                         LINE-SIZE 255
                                         LINE-COUNT 90

Maybe you are looking for

  • Problem when installing Oracle 11g R2 x64 on rhel 5.8 x86_64

    Hi All, I'm trying to install oracle 11g software only to upgrade my database from 10g to 11g and i install all required packages listed in installation prerequisites but the below error appeared error in invoking target 'mkldflags ntcontab.o nnfgt.o

  • Problem in BDC program when executed using scheduled job

    I have developed a BDC program for J1I5 T-code whcih updates RG1 Register. This is working as expected when run in foreground as well as in background. But it is not giving expected results when scheduled in Job. It is not giving any error message, j

  • How to identify ERNAM in table ADRC

    Dear all, if you edit sales partners in SD documents, in table ADRC a new line is added. I'm looking now for the responsible person for the change. In CDHDR and CDPOS only the changes in the sales order are moniotored, not changes on sales order part

  • PSE 9.0 unable to open organizer.  App error (0xc0000005)

    This problem began a few days ago.  When I try to open the organizer I get the error message.  I can open the editor and have tried to open the organizer from the editor with no luck.  I have read alot of posts online from alot of others with the sam

  • Changing HDD for SSD QUESTION (U410)

    Is any data held on the 500GB drive at time of reset? Basically my question is, can I simply swap the 500gb HDD for a 250gb SSD without problems of so when I reset the Windows8 install etc will work as usual? I will use the one click recovery button,