Java progarmming for printing graphics by Plotter

Hi All Visitor,
I want to write a program to take a print out of graphics by the plotter device. Any body who has experience to write a program for plotter are requested to share his experience.
thanking You.

Hi,
Would you mind reposting your question over on the Flex forums?  You'll most likely have better luck over there.
Thanks,
Chris

Similar Messages

  • Framework for printing graphics

    Hello!
    Can anyone suggest me a framework for print with java? For example I need print Frame Graphics or print simple text.
    Thanks!
    Tommaso Taruffi

    Daniel:
    Try checking the "Advanced" area of your Print Settings. You may have the "Omit for OPI" elements checked. Having them checked will omit ALL of those images in your document, not just the images you want to not print.
    If you want some images only to not print, either choose "nonprinting" in the Attributes palette, or move the images to a new layer and "hide" that layer and tell inDesign to only print "visible" layers

  • How to set up postscript Printer for printing graphics

    We have a requirement to print Structured graphics. I found out that we need to set up a postscript printer for it. After debugging I found out that the Device Type name should be either GRAPHICS or POSTGR or ZGRAP.
    How can we set up such a printer?
    Thanks in adv.

    Hi,
    The Device Type names that you have provided are not listed in the SAP Central Note for Printers/device Types
    https://service.sap.com/sap/support/notes/8928
    However, you can again re-check this note with your printer model and check what suitable device types should be used. As you will find inthis note:
    "Device type definitions are stored completely in tables and can be individually adapted, modified or enhanced. If SAP performs such an adjustment for a customer, it constitutes a consulting service, and is generally charged seperately"
    SAP has now released the SAP Printer Vendor Program - https://service.sap.com/sap/support/notes/1130927, printer manufacturers can develop and release device types for their printers.
    https://service.sap.com/sap/support/notes/1100779 contains a list of all participants
    Information about the support for new printer models is contained in the "Printer Vendor Wizard Note" of the relevant manufacturer. A complete list of all "Printer Vendor Wizard Notes" is available in Note 1097990. If your printer model is not listed in one of these "Printer Vendor Wizard Notes", proceed as described in Note 1103826.
    - Regards, Dibya

  • Accessing Webdynpro Java iview functionality for print from webdynpro code

    I know.. you would love to post me with n different blogs and forums discussion about how to print from webdynpro java application.
    But lets read before what i am looking for..
    There is standard "Print" function available on webdynpro for java iview.. and layout and all its just fine for us. though we want to trigger this event from a screen button. as going to iview properties is very user friendly.
    I was looking for some iview api which can help me.. We are on NW 7.01 SP6 at the moment. And this is for standard ESS applications.
    Thanks a lot for your inputs.
    Regards,
    Sudhir

    Hi
    You can write Java program for printing. Call the java class from screen (button or Url). Also you can write the content to XMl file.open the xml file in action. so that u will get print preview and print option.

  • Creating new graphics object from a existing one and sending it for print

    Hello,
    i have a graphics object which is big in size, I am creating a new graphics object from the existing one as given below
    //map is a graphic object
    Graphic g1 = (Graphic)map.create(x,y,width,height);
    Graphic g2 = (Graphic)map.create(x,y,width1,height1);
    Graphic g3 = (Graphic)map.create(x,y,width2,height2);
    arrayList.add(g1);
    arrayList.add(g2);
    arrayList.add(g3);
    Now I want to send the graphic object g1,g2,g3 for print in the method
    public int print (Graphics g, PageFormat pf, int idx) throws PrinterException {
    // Printable's method implementation
    if (curPageFormat != pf) {
    curPageFormat = pf;
    pages = repaginate (pf);
    if (idx >= 3)) {
    return Printable.NO_SUCH_PAGE;
    g = (Graphics) arrayList.get(idx);
    return Printable.PAGE_EXISTS;
    This is not working... what is wrong. can anybody suggest..
    I tried standardprint.java to print a object inside a scrollpane, it is not printing the entire diagram. so I am thinking of something like this.... Please let me know what to do....
    Thanks
    Serj

    The easy way to do this is create a copy using Windows Explorer.
    Open the project and go to File > Rename.
    Then you have your 2013 ready made project.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Can FW CS3 be used for graphic for printing?

    I am very familiar with FW but I do not like Photoshop,
    however I have both I preffer to use FW. As I have seen on one
    presentation new FW CS3 has CMYK pallete so my question is: can FW
    CS3 be used for preparation of graphic for printing or what are the
    obstacles? After preparing images in FW I will use InDesign for
    text or maybe the text in FW is wector and maybe I could use FW
    including text and not to use INDEsign far small projects? Does
    anyone has any experience with this subject?
    Regards
    Martin

    qnnick wrote:
    > I am very familiar with FW but I do not like Photoshop,
    however I have both I
    > preffer to use FW. As I have seen on one presentation
    new FW CS3 has CMYK
    > pallete so my question is: can FW CS3 be used for
    preparation of graphic for
    > printing or what are the obstacles?
    Fireworks does not operate or export in CMYK color space. It
    was
    developed for screen images only, and operates and exports in
    RGB color
    space. It is not recommended that you use it in preparation
    of images
    for print. You mentioned that you don't like photoshop. You
    might like
    Illustrator better.
    Linda Rathgeber [PVII] *Adobe Community Expert-Fireworks*
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    http://www.adobe.com/communities/experts/

  • How do I split a large wall graphic on Illustrator into sections for printing?

    I work in marketing and occasionally have to put together graphics on Illustrator.
    I am currently putting together a large wall graphic for an exhibition and want to find out how to split it into sections for printing. It has a total length of 5757mm but will need to be split into 6 panels (4x 980mm, 1x 841mm & 1x 996mm)
    It would be best for me to design this as one large graphic and then split it, however I'm not sure of the best way to do this.
    Any help would be greatly appreciated!

    Louise,
    There is just room enough for the whole artwork in 1:1 within the Workspace.
    You may create it as one entity, then create Artboards for each panel, but the exact way depends on a few things such as whether you are working with overlaps and whether the printer prints to the edge or has a non printing area.
    You may need two sets of the artwork with every second artboard on each so that you end up with overlapping artboards for printing/assembly.

  • I'm using Adobe Acrobat with the hope of editing a url on the graphic...a simple 3-letter change, save, close and send for printing..how do I get in edit mode to delete 3 letters and insert 3 new letters?

    ?I'm using Adobe Acrobat with the hope of editing a url on the graphic...a simple 3-letter change, save, close and send for printing..how do I get in edit mode to delete 3 letters and insert 3 new letters?

    pkg4ibm wrote:
    editing a url on the graphic...
    Not sure what you mean by that: is that URL in an image, or is it actual text?
    If it is in an image, then you need to extract the image, edit it with something like Photoshop, then add it back to the PDF.
    If the URL is actual text, I suggest that you remove the entire URL, then add the corrected link.

  • Need a Graphic Object for printing

    Hi,
    I generate a report with data from a database.
    At the moment I have an object that implements printable.
    Everytime the print method is called the report has
    to be created new.
    Now I want a seperate Graphics2D object in which teh report
    is created for once. And when a print
    job is started I want to copy it to the Graphics object
    in the printmethod.
    How can I create a Graphics2D Object for my own ?
    Thanx Stephan

    try:
    BufferedImage bufferedImage = new BufferedImage(500, 200, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = (Graphics2D) bufferedImage.getGraphics();
    g.drawString("Go to town!", 10, 10);This is how I did it when I needed to create images in a servlet. I expect it would also work for printing purposes... I guess I'll find out soon enough. :)

  • Looking for java script to print slide

    Hey everyone,
    The print widget and playbar print don't always work too well. Does anyone have a java script they are willing to share with me that will print a single slide and/or a set of slides?
    Thanks!
      Lori

    Hi Lori
    I think it may depend on your browser. If the browser is Microsoft Internet Explorer, sometimes you have make adjustments to coax something like a Flash file to print. You might try clicking File > Page setup... and see if you have the option for printing Background Colors and Images.
    Cheers... Rick

  • Scale Graphics g in jpanel for print

    hi, im having a simple problem.
    i am trying to make a program print something.
    i have looked at many printing scale functions
    but they have not worked for me.
    i am passing Graphics g to a class that is drawing on it.
    i do not want to change this class to draw with graphics2d.
    why isnt this scaling?
    any suggestions big or small appreciated!
    i dont know if it is worth mentioning that this method is inside a
    class that extends JPanel.
    public int print(Graphics g, PageFormat format, int pageIndex) {
    DrawSomething.doDrawing(g); // a class that draws onto g
    Graphics2D g2D = (Graphics2D) g;
    g2D.translate(format.getImageableX (), format.getImageableY ());
    // scale to fill the page
    double dw = format.getImageableWidth();
    double dh = format.getImageableHeight();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    double xScale = dw / (length of drawing, here 250);
    double yScale = dh / (height of drawing, here 250);
    double scale = Math.min(xScale,yScale);
    g2D.scale(scale, scale);
    return Printable.PAGE_EXISTS;
    }

    >
    return Printable.PAGE_EXISTS;
    }BTW, this is not a good idea. Your print job will probably continue indefinitely this way. do return page==0

  • How to retrieve the data from a jsp page for print?

    i have a dynamic jsp file which will get the data at runtime.I have a print button in the jsp.When i chick the print button it should capture the data from the jsp and print it as LANDSCAPE mode. Now i am using Java Api for this
              Following code is a working sample which prints some data in LANDSCAPE mode..This is working fine....How can i modify this to get the data from a jsp?....I am using weblogic workshop for development
              package Awtjava;
              //working example
              import java.awt.*;
              import java.awt.print.*;
              public class testPrint implements Printable {
              private static String s[];
              private static Font f;
              private static int nLines;
              public static void main (String arg[]){
              s = new String[10];
              f = new Font("Arial", Font.PLAIN, 11);
              int i;
              s[0] = "This is a printer test";
              for (i=1; i<10; i++){
              s[i] = "The next line";
              nLines = 10;
              testPrint.printa();
              public static void printa(){
              System.out.println("public static void printa () ");
              PrinterJob pj=PrinterJob.getPrinterJob();
              Book b = new Book();;
              PageFormat pf = new PageFormat();
              pf = pj.defaultPage(pf);
              b.append(new testPrint(), pf, 2);
              pj.setPageable (b);
              try{
              if (pj.printDialog()){
              pj.print();
              catch (Exception e) { System.out.println ("Error"); }
              public int print (Graphics g1, PageFormat pf, int n){
              System.out.println("public int print");
              int x,y,i,fa,fh;
              FontMetrics fm;
              Graphics2D g = (Graphics2D) g1;
              pf.setOrientation(PageFormat.LANDSCAPE);
              fm = g.getFontMetrics (f);
              fa = fm.getMaxAscent();
              fh = fm.getHeight();
              x = (int)pf.getImageableX();
              y = (int)pf.getImageableY() + fa;
              g.setFont (f);
              g.setColor(Color.black);
              if (n==1){
              for (i=0; i<10; i++){
              g.drawString (s, x, y);
              y += fh;
              return PAGE_EXISTS;
              else {
              for (i=10;i<10; i++){
              g.drawString (s[i], x, y);
              y += fh;
              return PAGE_EXISTS;
              Hope you will reply soon...
              Thanks in advance
              Maria

    Hey, I got a doubt that who will call the print method in the same program and what about the g.drawString() it is showing any output effect. Finally how the variable n will get initializing to 0 and 1 for two times respectively. Can u please elaborate on this...

  • SetFileName for print to file doesn't work

    I have a questions about print to file with java.awt:
    With Java 1.4, when I use setFileName in the JobAttributes class, as soon as the user clicks on Print to File, this file name shows.
    However, with Java 1.5, this file name does not show, a different file name shows. The reason why I want my file name to show is that I need a specific extension.
    I do need to use java.awt, I cannot use javax.swing, because for printing to the printer, I need to call my own paint.
    Please help.
    Thanks a lot!

    Well, I am saying:
    JobAttributes jobAttributes = new JobAttributes();
    jobAttributes.setFileName("out.ps");
    But even though this filename worked in Java 1.4 for printing to file, in Java 1.5 and Java 1.6, it doesn't recognize this filename, it always makes it "out.prn".
    Please help!
    Here is my total printing code:
    class PrintableComponent implements Printable
    public PrintableComponent()
    public void print()
    PrintJob printJob;
    PrinterJob printerJob;
    String string = new String();
    JobAttributes jobAttributes = new JobAttributes();
    PageAttributes pageAttributes = new PageAttributes();
    PageFormat pageFormat = new PageFormat();
    jobAttributes.setDialog(JobAttributes.DialogType.NATIVE);
    jobAttributes.setFileName("out.ps");
    pageAttributes.setOrigin(PageAttributes.OriginType.PRINTABLE);
    pageAttributes.setPrintQuality(PageAttributes.PrintQualityType.HIGH);
    printerJob = PrinterJob.getPrinterJob();
    printJob = Toolkit.getDefaultToolkit().getPrintJob(Basics.ananyaCurves, null, jobAttributes, pageAttributes);
    if (jobAttributes.getDestination() == JobAttributes.DestinationType.PRINTER)
    if (pageAttributes.getOrientationRequested() == PageAttributes.OrientationRequestedType.PORTRAIT)
    pageFormat.setOrientation(1);
    else if (pageAttributes.getOrientationRequested() == PageAttributes.OrientationRequestedType.LANDSCAPE)
    pageFormat.setOrientation(0);
    printerJob.setPrintable(this, pageFormat);
    printerJob.setCopies(jobAttributes.getCopies());
    printJob.end();
    try
    printerJob.print();
    catch (PrinterException printerException)
    System.out.println(printerException);
    printJob.finalize();
    else if (jobAttributes.getDestination() == JobAttributes.DestinationType.FILE)
    string = jobAttributes.getFileName();
    printJob.end();
    canvas.paintFile(string);
    printJob.finalize();
    public int print(Graphics g, PageFormat format, int pagenum)
    throws PrinterException
    Graphics2D g2D = (Graphics2D)g;
    g2D.translate(format.getImageableX(), format.getImageableY());
    if (pagenum > 0)
    return Printable.NO_SUCH_PAGE;
    canvas.paintForPrinter(g2D);
    return Printable.PAGE_EXISTS;
    Thanks for looking at this!

  • Help for printing textarea

    hi
    How can I print a long line.
    for exmple
    0123456789012345678901234567890123456789012345678901234567890123456789
    if i print a textarea with this content i get a printout that looks like this:
    012345678901234567890123456
    do i have to set anything so that the line is wrapped??
    my code looks like this:
    1st part:
    public class Ta extends JTextArea implements Printable{
         public Ta(){
              super();
              this.setPreferredSize(new Dimension(500,500));
         public Ta(int x, int y){
              super(x,y);
         public int print(Graphics g, PageFormat pf,int pi){
              if (pi >= 1) {
                   return Printable.NO_SUCH_PAGE;
              Graphics2D g2 = (Graphics2D) g;
              g2.translate(pf.getImageableX(),pf.getImageableY());
              Font f = new Font("Monospaced", Font.PLAIN,6);
              g2.setFont (f);
              g2.drawString(this.getText(),100,100);
              this.paint(g2);
              return Printable.PAGE_EXISTS;
    2nd:
              b.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        if(pj.printDialog()){
                             PageFormat pformat = pj.defaultPage();
                             pformat.setOrientation(PageFormat.PORTRAIT);
                             System.out.println(pj.defaultPage());
                             pj.setPrintable(ta,pj.pageDialog(pformat));
                             try{
                                  pj.print();
                             catch(PrinterException p){

    You got me wrong!My deepest regrets! :-)
    Wait, somewhere I had seen some example of just this.
    Ok... "found" it.
    (As you shall see, the code is actually decompiled -by some demo application not commercial, mind you- so to find this useful you need to try to understand what all this variables are used for)
    class NotepadPrinter implements Printable {
      public int print(Graphics g, PageFormat pageformat, int i) {
        Graphics2D graphics2d = (Graphics2D)g;
        try {
          return paintText(graphics2d, pageformat, i);
        } catch(Exception exception) {
          exception.printStackTrace();
        return 1;
      int paintText(Graphics2D graphics2d, PageFormat pageformat, int i) throws Exception {
        int j = (int)pageformat.getImageableHeight();
        int k = (int)pageformat.getHeight();
        graphics2d.translate(pageformat.getImageableX(), pageformat.getImageableY());
        graphics2d.setFont(getEditor().getGraphics().getFont());
        graphics2d.setColor(Color.black);
        String s = null;
        try {
          s = getEditor().getText(0, getEditor().getDocument().getLength());
        } catch(BadLocationException badlocationexception) {
          throw new Exception(badlocationexception.getMessage());
        java.awt.font.FontRenderContext fontrendercontext = graphics2d.getFontRenderContext();
        java.awt.geom.Rectangle2D rectangle2d = graphics2d.getFont().getMaxCharBounds(fontrendercontext);
        double d = rectangle2d.getWidth();
        double d1 = rectangle2d.getHeight() + 2D;
        double d2 = pageformat.getImageableWidth();
        int l = (int)(d2 / d);
        String as[] = getLines(s);
        int i1 = as.length;
        double d3 = d1 * (double)i1;
        int j1 = (int)((double)j / d1);
        int k1 = i1 / j1 + 1;
        int l1 = j1 * i;
        int i2 = getNumLinesForPage(as, i, j1);
        int j2 = (l1 + i2) - 1;
        if(l1 >= as.length)
          return 1;
        String as1[] = new String[i2];
        System.arraycopy(as, l1, as1, 0, i2);
        float f = 10F;
        LineMetrics linemetrics = graphics2d.getFont().getLineMetrics("A", fontrendercontext);
        double d4 = (double)linemetrics.getHeight() + 2D;
        for(int k2 = 0; k2 < as1.length; k2++) {
          graphics2d.drawString(as1[k2], 10F, f);
          f = (float)((double)f + d4);
        return 0;
      String[] getLines(String s) {
        StringTokenizer stringtokenizer = new StringTokenizer(s, "\n");
        Vector vector = new Vector();
        while(stringtokenizer.hasMoreTokens())
          vector.add(stringtokenizer.nextToken()));
        return (String[])vector.toArray(new String[0]);
      int getNumLinesForPage(String as[], int i, int j) {
        if(as.length < (i + 1) * j) {
          int k = as.length - i * j;
          return k;
        } else {
          return j;
    }

  • Print Graphical Representation of Binary Search Tree

    I need to print out a graphical representation of a binary search tree. Here is the source code I'm working with but it doesn't display the children correctly sometimes, especially with large trees.
    Stack globalStack = new Stack();
    globalStack.push(root);
    int nBlanks = 32;
    boolean isRowEmpty = false;
    System.out.println("************************************************");
    while (isRowEmpty == false) {
    Stack localStack = new Stack();
    isRowEmpty =true;
    for (int i=0; i < nBlanks; i ++);
    System.out.print(' ');
    while (globalStack.isEmpty()==false) {
    Node temp = (Node)globalStack.pop();
    if (temp != null) {
    System.out.print(temp.data);
    localStack.push(temp.leftChild);
    localStack.push(temp.rightChild);
    if (temp.leftChild != null || temp.rightChild != null)
    isRowEmpty = false;
    } else {
    System.out.print(" -- ");
    localStack.push(null);
    localStack.push(null);
    for (int i = 0 ; i < nBlanks*2-2; i++)
    System.out.print(' ');
    } //end while loop isEmpty is false
    System.out.println();
    nBlanks /= 2;
    while (localStack.isEmpty()==false)
    globalStack.push (localStack.pop());
    }//end while loop isRowEmpty is false
    System.out.println("************************************************");
    Here is an example (here the bottom children aren't aligned correctly)
                                    4
                    3                              20
             --                --               11              23
         --        --        --        --        --       15       --        --

    Well, using System.out is not really the best way for a Graphical representation...
    May be java.awt.Graphics would be far better, both for the programmer and the user of your application. And please use  tags when you post code, - makes it readable.

Maybe you are looking for

  • Can't remove address from autofill

    I've got a macbook air Version 10.7.5   (Safari Version 6.1.6 (7537.78.2)  And I can't delete the auto fill addresses. In fact, the name doesn't show in "previous recipiets" but shows up when I begin to type her name when composing an email... What I

  • How do I submit a form to a LC process using the process fields component in LC Designer

    I have a PDF Form with the Process Fields component attached.<br /><br />In the FSSubmit component, I have set the URL to <br />http://localhost:8080/soap/services/SAPS_Submission?wsdl, <br />where SAPS_Submission is the name of my process.<br /><br

  • TS4337 How do I highlight an entry in the calendar on my iPad?

    I am trying to highlight entries in my calendar and am wondering how to do this.  Help?

  • Date sorting in internal table

    Dear Friends    I wish to know how i perform the date operations in internal table... I am looking for the most recent record from the internal table for that i am supposed to look at chdate and chtime fields gives me the information on most correntl

  • Add fields in PO header ME21n Org data tab

    I want to add 3 new fields in the ME21n transaction in the Org. Data tab. Program SAPLMEGUI Screen 1221. Please help in detail how to proceed with exit/Badi name, changes in database table to add fields and required Code to write.