Multi-Page Printing in Adobe AIR

I developed a commercial application for a client in Adobe
AIR about 3 months ago. Now my client wants to add a printing
feature. The problem is it requires multi-page printing based on
the number of rows in a SQLite table.
BUT I FOUND OUT TO MY AMAZEMENT that I'm limited to less than
3K vertical pixels (or about less than 3 or 4 pages of printout,
depending on the vertical size of the page in the set)!
I was really dumbfounded (AND EMBARRASSED WITH MY CLIENT) to
see this rather fundamental shortcoming in Adobe AIR. It is
supposed to revolutionize desktop application development, but
AIR's lack of such an important printing support as multi-page
printing is really very disappointing.
Most desktop applications require and are expected to provide
multi-page printing. I hope the members of the AIR development team
are listening to this well-justified criticism and will roll up
their sleeves and work on it!
Thanks!

quote:
Originally posted by:
ab1301
Unfortunately, in this case I think no news is bad news. I
have seen people mentioning AIR's printing problems all over the
place, and I haven't seen word 1 from anyone at Adobe. On any other
issue, the "evangelists" always seem to be out in force. I think
that means no one is even working on this, and no one wants to talk
about a negative that doesn't have a fix around the corner or even
on the horizon. (If you don't have anything good to say, don't say
anything at all). Its really a shame, since printing is so vital to
the desktop and AIR is supposed to be the bridge between the
desktop and web.
There are a couple bug reports on this issue that you might
vote for if interested:
https://bugs.adobe.com/jira/browse/SDK-13895
https://bugs.adobe.com/jira/browse/ASC-3300
Of course the status of the bugs is "deferred" and the
priority is "none," which only reinforces my belief that Adobe
doesn't intend to address this any time soon.
If this is true, then its really bad
I already had selected AIR for my University Project, and If
adobe doesnt add printing support within 6 months, then im going to
have a hard time
Is there any article which talks about those semi printing
ways like Save to HTML or simialr?

Similar Messages

  • Multi-page Printing Trouble

    Equipment:
    - Win XP Pro SP2
    - Acrobat 8.1.2
    - Network printer HP LaserJet 8000, JetDirect EX Plus
    Problem no multi-page printing ANYWAY
    Any document, neither official Adobe guides or exported or distilled PDFs of any standard result is one. Only first page. However, I can choose any page I like and print it. But only ONE at ONE time.
    I've seen discussions on this theme, but no solution.
    Drivers were uninstalled, deleted, destroyed and carefully installed again. In fact, JetDirect make it automatically, I'm not so familiar with it. Without effect.
    What can I check? What can I do?
    (I can't change the printer. Low-budget office)

    All? Really? I'm no so ignorant, despite of I'm illiterate.
    Anyway, thanks for advice.
    Let's wait for next irradiations of knowledge.

  • Multi-Page Printing (Please I need realy help)

    Dear Friend !
    Please Help me. My Dateline is running out quickly.
    I have a problem, I could not Print multi-page text document which are directly retrive from MS Access DataBase.
    I send by code for your easy understanding. Please, I realy need help.
    It prints multi-page but prints dublicate the first page.
    For multi-page print, look at Bolded Text in the Last Part of the code.
    Thank u very much.
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.awt.print.*;
    import java.sql.*;
    import java.util.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    import java.text.SimpleDateFormat;
    public class printBalance{
    int maxPage=1;
    int pHight=0;
    int header=0;
    FontMetrics fontMet2;
    private final static int POINTS_PER_INCH=15;
    Paper paper=new Paper();
    //paper.setSize(612,792);
    public printBalance () {
    //--- Create a new PrinterJob object
    PrinterJob printJob = PrinterJob.getPrinterJob ();
    //--- Create a new Book to add pages to
    Book book = new Book ();
    //--- Add the cover page using the default page format for this print job
    // book.append (new IntroPage (), printJob.defaultPage ());
    //--- Add the document page using a landscape page format
    PageFormat documentPageFormat = new PageFormat ();
    paper.setImageableArea(15,15,580,648);
    documentPageFormat.setPaper(paper);
    documentPageFormat.setOrientation (PageFormat.PORTRAIT);
    book.append (new Document (), documentPageFormat);
    //--- Add a third page using the same painter
    book.append (new Document (), documentPageFormat);
    //--- Tell the printJob to use the Book as the Pageable object
    printJob.setPageable (book);
    //--- Show the print dialog box. If the user clicks the
    //--- print button, we then proceed to print, else we cancel
    //--- the process.
    if (printJob.printDialog()) {
    try {
    printJob.print();
    } catch (Exception PrintException) {
    PrintException.printStackTrace();
    private class Document implements Printable {
    public int print (Graphics g, PageFormat pageFormat, int page) {
    //--- Create the Graphics2D object
    Graphics2D g2d = (Graphics2D) g;
    //--- Translate the origin to 0,0 for the top left corner
    g2d.translate (pageFormat.getImageableX (), pageFormat.getImageableY ());
    //--- Set the drawing color to black
    g2d.setPaint (Color.black);
    //--- Print the title
    DataLink dbTitle=new DataLink();
    ResultSet rsTitle;
    String TitleQuery="Select Com_ID,Com_Name,Com_Road,Com_House,Com_Add,Com_City from Company_Profile where Com_ID='001'";
    Vector tempAdd=new Vector();
    //--- Compute the horizontal center of the page
    FontMetrics fontMetrics = g2d.getFontMetrics ();
    try{
                   rsTitle=dbTitle.stmt.executeQuery(TitleQuery);
                   rsTitle.next();
    String titleName=rsTitle.getString(2);
    tempAdd.addElement(rsTitle.getString(3));
    tempAdd.addElement(rsTitle.getString(4));
    tempAdd.addElement(rsTitle.getString(5));
    tempAdd.addElement(rsTitle.getString(6));
    String titleAdd=(tempAdd).toString();
    Font titleFont2 = new Font ("helvetica", Font.PLAIN, 13);
    //titleFont2.getFont(titleName);
    g2d.setFont (titleFont2);
    //--- Compute the horizontal center of the page
    //--- Compute the horizontal center of the page
    double titleX = (pageFormat.getImageableWidth () / 2) - (fontMetrics.stringWidth (titleName) / 2);
    //System.out.println(titleName);
    double titleY =POINTS_PER_INCH;
    g2d.drawString (titleName, (int) titleX, (int) titleY);
              double titleX3 = (pageFormat.getImageableWidth () / 2) - (fontMetrics.stringWidth (titleAdd) / 2);
              //System.out.println(titleAdd);
              double titleY3 =POINTS_PER_INCH+fontMetrics.getHeight();
    g2d.drawString (titleAdd, (int) titleX3, (int) titleY3);
    catch(SQLException ex){System.out.println(ex);}
    DataLink dbDate=new DataLink();
    ResultSet rsDate;
    String Qr="Select * from TimeSchedule where Com_ID='001'";
    Vector tempDate=new Vector();
    SimpleDateFormat dateformat = new SimpleDateFormat("MMMMMMMM. dd, yyyy",Locale.getDefault());
    FontMetrics fontMet = g2d.getFontMetrics ();
    try{
                   rsDate=dbDate.stmt.executeQuery(Qr);
                   rsDate.next();
    tempDate.addElement("BALANCE SHEET AS AT ");
    tempDate.addElement(String.valueOf(dateformat.format(rsDate.getDate(2))));
    String BalanceDate=(tempDate).toString();
    Font titleFont2 = new Font ("helvetica", Font.PLAIN, 13);
    //titleFont2.getFont(titleName);
    g2d.setFont (titleFont2);
    //--- Compute the horizontal center of the page
    //--- Compute the horizontal center of the page
    double DateX = (pageFormat.getImageableWidth () / 2) - (fontMet.stringWidth (BalanceDate) / 2);
    //System.out.println(BalanceDate);
    double DateY =POINTS_PER_INCH+POINTS_PER_INCH+fontMet.getHeight();
    g2d.drawString (BalanceDate, (int) DateX, (int) DateY);
    catch(SQLException ex){System.out.println(ex);}
    Rectangle2D.Double borderHead = new Rectangle2D.Double (0,
    fontMetrics.getHeight()+fontMetrics.getHeight()+fontMet.getHeight()*2,
    pageFormat.getImageableWidth (),
    fontMet.getHeight());
    Font font=new Font("Arial",Font.PLAIN,12);
    g2d.setFont (font);
    g2d.drawString("CAPITAL & LIABILITIES",POINTS_PER_INCH,fontMetrics.getHeight()*5);
    g2d.drawLine(POINTS_PER_INCH*14,(fontMetrics.getHeight()*4)+4,POINTS_PER_INCH*14,fontMetrics.getHeight()*5);
    g2d.drawString("AMOUNT",POINTS_PER_INCH*14+12,fontMetrics.getHeight()*5);
    g2d.drawString("PROPERTY & ASSETS",POINTS_PER_INCH*20,fontMetrics.getHeight()*5);
    g2d.drawLine(POINTS_PER_INCH*33,(fontMetrics.getHeight()*4)+4,POINTS_PER_INCH*33,fontMetrics.getHeight()*5);
    g2d.drawString("AMOUNT",POINTS_PER_INCH*34,fontMetrics.getHeight()*5);
    //--- Draw a border around the page using a 12 point border
    //g2d.setStroke (new BasicStroke (12));
    Rectangle2D.Double border = new Rectangle2D.Double (0,
    fontMetrics.getHeight()+fontMetrics.getHeight()+fontMet.getHeight()+fontMet.getHeight()*2,
    pageFormat.getImageableWidth (),
    pageFormat.getImageableHeight ());
    g2d.draw (borderHead);
    g2d.draw (border);
    /*Line2D.Double line = new Line2D.Double ();
    int j=(int)pageFormat.getImageableWidth()/2;
    line.setLine (j,0,j,pageFormat.getHeight());
    g2d.draw (line);*/
    int j=(int)pageFormat.getImageableWidth()/2;
    g2d.drawLine(j,fontMetrics.getHeight()+fontMetrics.getHeight()+fontMet.getHeight()*2,j,(int)pageFormat.getHeight());
    Vector temp=new Vector();
    //--- Print page 1
    if( page >= maxPage )
                   return NO_SUCH_PAGE;
    //if (page == 0) {
    DataLink db=new DataLink();
    DataLink db2=new DataLink();
    DataLink dbMinus=new DataLink();
              ResultSet rs;
              ResultSet rs1;
              DataLink dbMinus2=new DataLink();
              ResultSet rsSub;
    String Qry="SELECT Account_Name, Com_ID FROM Authorised_Capital Where Com_ID='001' GROUP BY Account_Name,Com_ID";
    //System.out.println(Qry);
    String getAccount="";
    String getDes="";
    double getAmount=0;
    String Amount="";
    DecimalFormat df=new DecimalFormat("###,###");
    int GrandTotal=0;
    int sum=0;
    int sum2=0;
    String val="";
    int k=0;
    int i=0;
    int U=0;
    int W=0;
    int J=0;
    int Z=0;
                   String ab = " ";
                   String FPart="";
                   String LPart="";
                   String strt="";
    String SubValu="";
                   try{
                   rs=db.stmt.executeQuery(Qry);
                   i=0+fontMetrics.getHeight()+fontMetrics.getHeight()+fontMet.getHeight()+fontMet.getHeight()*2;
                   while(rs.next())//where 1
    getAccount=rs.getString(1);
    //font//helvetica
    fontMet2 = g2d.getFontMetrics ();
    Font titleFont = new Font ("Arial", Font.PLAIN,10);
    g2d.setFont (titleFont);
    System.out.println("Font titleFont = new Font Arial, Font.PLAIN,10) =="+fontMet2.getHeight());
                   //--- Print the text one inch from the top and left margins
                        g2d.drawString (getAccount, POINTS_PER_INCH, POINTS_PER_INCH+i);
                        g2d.drawLine (POINTS_PER_INCH,POINTS_PER_INCH+i+10,POINTS_PER_INCH+140, POINTS_PER_INCH+10+i);
    String Qry2="SELECT Account_Name,Des,Amount,Formula FROM Authorised_Capital where Account_Name='"+getAccount+"' And Com_ID='001' And Formula='PLUS'";
    String Qry_Minus="SELECT Account_Name,Des,Amount,Formula FROM Authorised_Capital where Account_Name='"+getAccount+"' And Com_ID='001' And Formula='MINUS'";
    // Plus Row Count
    ResultSet count;
    count=db2.stmt.executeQuery(Qry2);
    int Cun=0;
    while(count.next())
    Cun =Cun+1;
    //Minus Row Count
    ResultSet Rs_Minus;
    Rs_Minus=dbMinus.stmt.executeQuery(Qry_Minus);
    int Minus_Count=0;
    while(Rs_Minus.next())
    Minus_Count =Minus_Count+1;
    //System.out.println(Minus_Count);
    rs1=db2.stmt.executeQuery(Qry2);
    k=i+20;
    sum=0;
    while(rs1.next())
    if(Cun>1){// multipule row
    getDes=rs1.getString(2);
    int ln= getDes.length();
    if(ln>19){
    boolean tr=false;
    ab = " ";
    FPart="";
    LPart="";
    strt=getDes.substring(19);
              int length=strt.length();
    //System.out.println("Length="+length);
                        for(int st=0; st<length; st++)
                        char ch=strt.charAt(st);
                        String vlu=String.valueOf(ch);
                        //System.out.println(vlu);
                        if(ab.compareToIgnoreCase(vlu)==0)
    tr=true;
                                  int Final=strt.indexOf(vlu);
                                  FPart=getDes.substring(0,19+Final);
                                  LPart=strt.substring(Final+1);
                                  g2d.drawString (FPart, POINTS_PER_INCH, POINTS_PER_INCH+k);
                                  k=k+10;
    g2d.drawString (LPart, POINTS_PER_INCH, POINTS_PER_INCH+k);
    break;
    }//end for
    if(tr==false)
    g2d.drawString (getDes, POINTS_PER_INCH, POINTS_PER_INCH+k);
                             }//end ln (if)
                        else {
                             g2d.drawString (getDes, POINTS_PER_INCH, POINTS_PER_INCH+k);
    String valComa=String.valueOf(df.format(Double.parseDouble(rs1.getString(3))));
    val=rs1.getString(3);
    Amount=val;
    int getAount=Integer.parseInt(Amount);
                        int len=valComa.length();
                        int B;
                        U=0;
                        for(B=len;B>0;B--)
    char num=valComa.charAt(B-1);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+170-U, POINTS_PER_INCH+k);
                        U =U+5;
    sum =sum+getAount;
    k =k+10;
                        }//end if // multipule row
                        else {
              getDes=rs1.getString(2);
    ab = " ";
    FPart="";
    LPart="";
    strt=getDes.substring(19);
              int length=strt.length();
    //System.out.println("Length="+length);
                        for(int st=0; st<length; st++)
                        char ch=strt.charAt(st);
                        String vlu=String.valueOf(ch);
                        if(ab.compareToIgnoreCase(vlu)==0)
                                  int Final=strt.indexOf(vlu);
                                  FPart=getDes.substring(0,19+Final);
                                  LPart=strt.substring(Final+1);
                                  //System.out.println(FPart+"\n"+LPart);
    g2d.drawString (FPart, POINTS_PER_INCH, POINTS_PER_INCH+k);
    k=k+10;
    g2d.drawString (LPart, POINTS_PER_INCH, POINTS_PER_INCH+k);
    //Only for Grand Total
    int Gnd=Integer.parseInt(rs1.getString(3));
    GrandTotal=GrandTotal+Gnd;
                        System.out.println(GrandTotal);
    val=String.valueOf(df.format(Double.parseDouble(rs1.getString(3))));
                        int len=val.length();
                        int C;
                        int D=0;
                        for(C=len;C>0;C--)
    char num=val.charAt(C-1);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+250-D, POINTS_PER_INCH+k);// Total
                        D =D+5;
    k =k+10; }//end else*/
                        }//end Where
                        // Calculate Total
                        if(Minus_Count>=1) //if 1
    if(!(sum==0.0)) //if 2
    String valComa=String.valueOf(df.format(sum));
                        int len=valComa.length();
                        int y;
                        int P=0;
                        W=10;
                        W=W+k;
                        for(y=len;y>0;y--)
    char num=valComa.charAt(y-1);
                        g2d.drawLine (POINTS_PER_INCH+80, POINTS_PER_INCH+k,200,POINTS_PER_INCH+k);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+170-P, POINTS_PER_INCH+W);
                        P =P+5;
                        }//end for
                   }//end if 2
                   rsSub=dbMinus2.stmt.executeQuery(Qry_Minus);
    int X=20;
    X=X+W;
    while(rsSub.next()) //while ##
    if(Minus_Count>1){//// for multipul line
    getDes=rsSub.getString(2);
    // System.out.println(getDes);
    int ln= getDes.length();
    if(ln>19){// for line is geter than 19
    boolean tr=false;
    ab = " ";
    FPart="";
    LPart="";
    strt=getDes.substring(19);
              int length=strt.length();
    X=X+10;
                        for(int st=0; st<length; st++)
                        char ch=strt.charAt(st);
                        String vlu=String.valueOf(ch);
                        //System.out.println(vlu);
                        if(ab.compareToIgnoreCase(vlu)==0)
    tr=true;
                                  int Final=strt.indexOf(vlu);
                                  FPart=getDes.substring(0,19+Final);
                                  LPart=strt.substring(Final+1);
                                  g2d.drawString (FPart, POINTS_PER_INCH, POINTS_PER_INCH+X);
                                  X=X+10;
    g2d.drawString (LPart, POINTS_PER_INCH, POINTS_PER_INCH+X);
    //X=X+10;
    break;
    }//end for
    if(tr==false)
    g2d.drawString (getDes, POINTS_PER_INCH, POINTS_PER_INCH+X);
                             }//end ln (if) // for line is geter than 19
                        else {
                             getDes=rsSub.getString(2);
                             int ln2= getDes.length();
                             /*if(ln2>19){
                             boolean tr=false;
                             ab = " ";
                             FPart="";
                             LPart="";
                             strt=getDes.substring(19);
                             int length=strt.length();
                             X=X+10;
                             for(int st=0; st<length; st++)
                             char ch=strt.charAt(st);
                        String vlu=String.valueOf(ch);
                        if(ab.compareToIgnoreCase(vlu)==0)
    tr=true;
                                  int Final=strt.indexOf(vlu);
                                  FPart=getDes.substring(0,19+Final);
                                  System.out.println("First part= "+Final);
                                  LPart=strt.substring(Final+1);
                                  System.out.println("Last part= "+LPart);
                                  g2d.drawString (FPart, POINTS_PER_INCH, POINTS_PER_INCH+X);
                                  X=X+10;
    g2d.drawString (LPart, POINTS_PER_INCH, POINTS_PER_INCH+X);
    //X=X+10;
    break;
    }//end for
    if(tr==false)
    g2d.drawString (getDes, POINTS_PER_INCH, POINTS_PER_INCH+X);
                        System.out.println("Plane line= ");
                             }//end ln (if)*/
                             g2d.drawString (getDes, POINTS_PER_INCH, POINTS_PER_INCH+X);
                             }//end else
    String valComa=String.valueOf(df.format(Double.parseDouble(rsSub.getString(3))));
    val=rsSub.getString(3);
    Amount=val;
    int getAount=Integer.parseInt(Amount);
                        int len=valComa.length();
                        int B;
                        U=0;
                        for(B=len;B>0;B--)
    char num=valComa.charAt(B-1);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+170-U, POINTS_PER_INCH+X);
                        U =U+5;
    sum2 =sum2+getAount;
    }//end if //for multipul line
    else {
    SubValu=rsSub.getString(2);
    int ln= SubValu.length();
              if(ln>19){// for line is geter than 19
              boolean tr=false;
              ab = " ";
              FPart="";
              LPart="";
              strt=SubValu.substring(19);
              int length=strt.length();
              X=X+10;
              for(int st=0; st<length; st++)
              char ch=strt.charAt(st);
              String vlu=String.valueOf(ch);
              //System.out.println(vlu);
              if(ab.compareToIgnoreCase(vlu)==0)
                             tr=true;
                        int Final=strt.indexOf(vlu);
                        FPart=SubValu.substring(0,19+Final);
                        LPart=strt.substring(Final+1);
                        g2d.drawString (FPart, POINTS_PER_INCH, POINTS_PER_INCH+X);
                        X=X+10;
                             g2d.drawString (LPart, POINTS_PER_INCH, POINTS_PER_INCH+X);
                             //X=X+10;
                             break;
                   }//end for
                   if(tr==false)
                   g2d.drawString (SubValu, POINTS_PER_INCH, POINTS_PER_INCH+X);
                   }//end ln (if) // for line is geter than 19
    else{
    //SubValu=rsSub.getString(2);
                        g2d.drawString (String.valueOf(SubValu), POINTS_PER_INCH, POINTS_PER_INCH+X);
    String valComa=String.valueOf(df.format(Double.parseDouble(rsSub.getString(3))));
    SubValu=rsSub.getString(3);
    int LessAount=Integer.parseInt(SubValu);
                        int Sublen=valComa.length();
                        int B;
                        int G=0;
                        for(B=Sublen;B>0;B--)
    char SubNum=valComa.charAt(B-1);
                        g2d.drawString (String.valueOf(SubNum), POINTS_PER_INCH+170-G, POINTS_PER_INCH+X);
                        G =G+5;
    int Actual_Value=sum-LessAount;
    String valCom=String.valueOf(df.format(Actual_Value));
                        int Lesslen=valCom.length();
                        int T;
                        int Q=0;
                        for(T=Lesslen;T>0;T--)
    char LessNum=valCom.charAt(T-1);
                        g2d.drawString (String.valueOf(LessNum), POINTS_PER_INCH+250-Q, POINTS_PER_INCH+X+10);
                        Q =Q+5;
                        k =X+20;
                   //}//end else
    }//end else*/
                        }//while ##
    if(Minus_Count>1){
    if(!(sum2==0.0)) //if 2
                   //System.out.println("Khaled");
    String valCom=String.valueOf(df.format(sum2));
                        int lent=valCom.length();
                        int y;
                        int P=0;
                   Z=10;
                        //System.out.println(X);
                        Z=Z+X;
                        //System.out.println("X="+X);
                        for(y=lent;y>0;y--)
    char num=valCom.charAt(y-1);
                        g2d.drawLine (POINTS_PER_INCH+80, POINTS_PER_INCH+Z,200,POINTS_PER_INCH+Z);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+170-P, POINTS_PER_INCH+Z+10);
                        P =P+5;
                        }//end for
                   k =Z+20;
                   }//end if 2
                        // }//end if(Minus_Count>1)
                        int FinalValue=sum-sum2;
                        //System.out.println("FinalValue="+FinalValue);
                        String valCom=String.valueOf(df.format(FinalValue));
                        int lent=valCom.length();
                        int y;
                        int P=0;
                   //Z=10;
                        //System.out.println(X);
                        //Z=Z+X;
                        for(y=lent;y>0;y--)
    char num=valCom.charAt(y-1);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+250-P, POINTS_PER_INCH+Z+10);
                        P =P+5;
                        }//end for
    }//if(Minus_Count>1)
                             }//end if 1
                   else{
                        //i =i+20+k;
    if(!(sum==0.0)) //if 2
    String valComa=String.valueOf(df.format(sum));
                        int len=valComa.length();
                        int y;
                        int z=0;
                        for(y=len;y>0;y--)
    char num=valComa.charAt(y-1);
                        g2d.drawString (String.valueOf(num), POINTS_PER_INCH+250-z, POINTS_PER_INCH+k);// Total
                        z =z+5;
                        }//end for
                   }//end if 2
                   }//end else*/
    i=k+30;
              }//end where 1
                   catch(SQLException ex)
                        System.out.println(ex);
    // For Grand Total
    String valComa=String.valueOf(df.format(GrandTotal));
                   int len=valComa.length();
                   int y;
                   int z=0;
    int h=0;
    h=k+40;
                   for(y=len;y>0;y--)
                   char num=valComa.charAt(y-1);
                   g2d.drawLine (POINTS_PER_INCH+255, POINTS_PER_INCH+h-10,POINTS_PER_INCH+250-z,POINTS_PER_INCH+h-10);
                   g2d.drawString (String.valueOf(num), POINTS_PER_INCH+250-z, POINTS_PER_INCH+h);// Total
                   z =z+5;
                   System.out.println(valComa);
                   }//end for
    /* String RowCount="SELECT * FROM Authorised_Capital where Com_ID='001'";
    DataLink dbCount=new DataLink();
    int RowCun=0;
    ResultSet roCount;
    try{
                        roCount=dbCount.stmt.executeQuery(RowCount);
                        while(roCount.next())
                        RowCun =RowCun+1;
                   catch(SQLException ep){}*/
    int header =fontMetrics.getHeight()*5;
    System.out.println("Header ="+header);
    int H=fontMet2.getHeight();
    int row=H + fontMet2.getDescent();
    System.out.println("Page row= "+row);
    pHight=(int)pageFormat.getImageableHeight();
    System.out.println("Page Height= "+pHight);
    int rowPerPage = (pHight-header)/row;
    System.out.println("Row per page= "+rowPerPage);
    double rowN = h-header;
    double rowNumber = rowN/row;
    System.out.println("Row Numbe= "+rowNumber);
    maxPage = Math.max( (int)Math.ceil(rowNumber/(double)rowPerPage), 1);
    System.out.println("maxPage ="+maxPage);
    return (PAGE_EXISTS);
    //--- Print page 2
    /*else if (page == 2) {
    //--- Print the text one inch from the top and left margins
    g2d.drawString ("This the content of the second page: " + page, POINTS_PER_INCH, POINTS_PER_INCH);
    return (PAGE_EXISTS);
    //--- Validate the page
    //return (NO_SUCH_PAGE);
    }// end public int print (Graphics g, PageFormat pageFormat, int page)
    Message was edited by:
    khaled200
    Message was edited by:
    khaled200

    I implemented an example here.
    http://java-sl.com/Pagination_In_JEditorPane_Print.html
    Regards,
    Stas

  • Multi Page Forms in Adobe Muse

    Hi,
    Im trying to create a multi page form in Muse. Now I understand about just changing the landing page after form has been sent (as below) HOWEVER how can you delete the email field?...I want to do this as if I have a multi page form, each time I put a form on a page im going to have an email field which I dont want - I only want this on the first page.
    Thanks
    Paul
    You can achieve this by changing the landing page in "After Sending " dropdown.
    http://screencasts.worldsecuresystems.com/Sanju/2013-11-19_1851.png
    For example insert forms in pages , then change the landing page through "After sending" setting to another page , so that user from front end submits the form and then lands to another page which has the next step of the form. This way multi-step form can be created.
    But each form will notify you separately on submissions.
    If you are using Business Catalyst to publish then you can perform the same through BC by changing the action url of the form.
    Thanks,
    Sanjit

    quote:
    Originally posted by:
    ab1301
    Unfortunately, in this case I think no news is bad news. I
    have seen people mentioning AIR's printing problems all over the
    place, and I haven't seen word 1 from anyone at Adobe. On any other
    issue, the "evangelists" always seem to be out in force. I think
    that means no one is even working on this, and no one wants to talk
    about a negative that doesn't have a fix around the corner or even
    on the horizon. (If you don't have anything good to say, don't say
    anything at all). Its really a shame, since printing is so vital to
    the desktop and AIR is supposed to be the bridge between the
    desktop and web.
    There are a couple bug reports on this issue that you might
    vote for if interested:
    https://bugs.adobe.com/jira/browse/SDK-13895
    https://bugs.adobe.com/jira/browse/ASC-3300
    Of course the status of the bugs is "deferred" and the
    priority is "none," which only reinforces my belief that Adobe
    doesn't intend to address this any time soon.
    If this is true, then its really bad
    I already had selected AIR for my University Project, and If
    adobe doesnt add printing support within 6 months, then im going to
    have a hard time
    Is there any article which talks about those semi printing
    ways like Save to HTML or simialr?

  • Printing with Adobe Air and Flex

    Hi
    I have an Advanced printing application, developped using
    C++. we want to port it to the web;
    we are studying Flex and Adobe Air to see if we can have what
    we want.
    the most important thing is to be capable to
    print automatically I mean without choosing printer
    configuration; we want to choose automatically paper size, paper
    source, ... and all possible printer configuration.
    Is that possible using Flex And/Or Adobe Air?
    I searched and I see that there is one class to print,
    without advanced options?
    If not, can I develop plugins for Adobe Air?
    Thank you

    My blog has an example of whats possible when printing using
    Flex/AIR - you can print directly setting orientation etc. but I
    can't find a way to set source (paper trays)
    http://thorntononflex.blogspot.com/

  • Printing in Adobe AIR (JavaScript / Ajax) whereas skipping the print dialogue

    Hi,
    Can I do what the topic says? Basically I would like to check with a timer a URL and once something appears there I want it to be sent directly to my default printer.
    Is that possible? And if Yes, how?
    thank you,
    George

    Hi, I have not investigated exactly your problem as yet but this seems to be related to it:
    http://anirudhs.chaosnet.org/blog/2008.02.15.html
    For me it was printing only the upper-left corner
    but specifing a Rectangle for size for PrintJob.addPage() second argument fixed that
    please consult
    http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00000334.html
    for help on Rectangle. You can use geom instead of display;
    frameworks/libs/air/AIRAliases.js contains an alias directly to geom:
    air.Rectangle = window.runtime.flash.geom.Rectangle;
    so you may use directly air.Rectangle to construct the size.
    It works on AIR 1.5 as well as AIR 2 beta
    Code snippet I have used and worked:
    function doPrintAir()
        var pjob = new window.runtime.flash.printing.PrintJob;
        if ( pjob.start() )
            var poptions = new window.runtime.flash.printing.PrintJobOptions;
            var rectangle = new air.Rectangle(0, 0, 800, 800);
            poptions.printAsBitmap = true;
            /* poptions.pixelsPerInch = 300; */
            try
                pjob.addPage(window.htmlLoader, rectangle, poptions);
                pjob.send();
            catch (err)
                alert("exception: " + err);
        else
            alert("PrintJob couldn't start");
    //comment the line below if you do not want to mess with existing
    //window.print
    window.print = doPrintAir;
    this make js window.print() available for use as one would normay do.
    Let me know if this helps and fixes your problem.
    Best regards,
    Daniel Baragan - Adobe AIR Engineer

  • Memory Foot Print OF Adobe Air Application

    I have to create adobe air application for peer to peer application which will be run on (gateway)embedded Linux.
    The problem is memory in the device is very low <= 2 mb.
    I wanted know what is the memory foot print of the adobe air application if the code size is 200kb.

    Hi, here is an update to my problem. 
    After enabling legacy CAS policy in my configuration file, the memory is released immediately!
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <runtime>
    <legacyCasPolicy enabled="true" />
    </runtime>
    </configuration>
    I am still hoping to receive feedback about the problem. What is going on? Is this the right solution? Will it work in the future?
    Is it because our project has to run only as a 32-bit process?
    Thanks in advance
    Michel Miranda

  • How to print from Adobe AIR with on the iPad?

    Is it possible to print from an Adobe AIR app on the iPad? I've searched and I know PrintJob won't work. Is there another way to print? I'm developing in Flash CS5.5 and have Flash web app that already prints using PrintJob.

    Has anyone seen an example of how to create one for printing? I need this functionality for Android and iOS.

  • Printing from Adobe AIR using Reader/Acrobat.

    I have a product created using Adobe AIR.
    I have a portion where a pdf is loaded into a window, and
    they print it. When we change what paper they are going to print on
    (different dimensions), it does not take effect.
    We have to load it in a native PDF application (Acrobat) and
    change the settings, then print the piece off again.
    This is horrible for efficiency.
    Has anyone had this problem?
    Help!
    Andrew

    Hi,
    If your PDF has embedded javascript, your AIR application can
    talk to this javascript function where you can call the Print()
    method.
    Take a look at
    http://www.adobe.com/devnet/air/flex/quickstart/scripting_pdf.html
    Make sure you set the location of HTML control to a HTML file
    (which has the object tag pointing to a PDF) using file:/// url
    scheme. I remember a bug where if you point to it using the app://
    or you don't specify any scheme, scripting between PDF and AIR
    won't work.

  • Error on first page of multi page print run

    When I select a number of drawings to print from a directory list, all at A3, the the first page always prints an enlarged section of part of the drawing all following pages print the full extent of the drawing as required. how can I fix this problem?

    I think the following SAP Note would help you
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313335333133303330%7D.do]
    Regards,
    Raghavendra

  • Page print in Adobe Form

    Hi Friends,
    I  developed a Adobe form with 2 master pages. I dont want to display my 2nd Master page if a field eq 'MANAGER'. This field is displayed on Master Page. When I am giving print my 2nd page is also printing I dont want my 2nd master page to print if the field is 'MANAGER'. How can i do this ?
    How can we do this in javascript or in Formcalc. ?

    Or You can do this...
    Create a Subform in the first page , create the condition for that only if the particular field is MANAGER then only this should be displayed. HIDE the subform , in the properties you can check.
    This subform properties Place that on Top of  Next page or choose the Master page content area which you want.
    So when manager only this forms will trigger and the corresponding details will be shown.

  • Printing in Adobe Air with css print media rule

    I am new to air and I am having a big problem with printing, I got some come snippet that triggers printing but the main problem is that the <code>window.htmlLoader</code> is passed to the addPage() and the print renders a screeshot of the first page.
    This is not what I want, I defines a media print style rule and I want the print to print some portion of the page regrding the print media rule, is there any option or help. I have a deadling, the programming with JS is not the problwm but the printing is the problem. Is there any better API that can streamline this, I am running out of time.
    Thanks in advance

    Can you explain exhaustive abour your problem i can answer your question www.ticaretsicili.net

  • AP Check Multi-pages printing VOID checks only

    Hello -
    I have developed an RTF for AP Checks in Oracle R12.1 which works fine for a single page. But when printing multiple pages, it prints only VOID checks on all of the pages. Whereas, it is supposed to print actual check on the LAST page.
    I am using the following condition:
    Choose When
    <?when:PaymentStatus/Code='VOID_BY_OVERFLOW'?>
    Print VOID Check
    Else
    Print Live Check
    End Choose
    I am calling the sub-template from the page footer.
    Any help is appreciated. I can send RTF and XML file if necessary
    Thanks
    Rajeev Goyal
    Edited by: rajeevgoyal on Sep 17, 2009 3:57 PM

    Hi Ron Moore,
    I am afraid if you want to print checks for those misc vendors, you need to create at least one vendor so that you can print regular check with stub. This vendor's name can be changed from time to time but with the same code.
    Thanks,
    Gordon

  • Slow multi-page printing

    I'm using the PrintJob class in AS3 to print a multipage list. There is a little graphic header, my company logo in the footer and then just a long text list. It varies from 2 to 6 or so pages.
    Everything seems to be working, but it seems to take an awful long time to get all the pages out. I'm wondering if anybody has any ideas of where to look? Or is it just always slow?
    Here is the code I'm using:
    private function doPrint(a:Array) {
         var pj:PrintJob=new PrintJob();
         if (pj.start()) {
              var orgScale:Number=a[0].scaleX;
              var count:Number=0;
              for (var i=0; i<a.length; i++) {
                   a[i].width=pj.pageWidth;
                   a[i].scaleY=a[i].scaleX;
                   pj.addPage(a[i]);
                   count++;
              if (count>0) {
                   pj.send();
         pj=null;
         a[0].scaleX=a[0].scaleY=orgScale;
    The array is an array of the various movieclips that make up the pages.

    Thanks. The pages are pretty simple except for a lot of text. I had tried printing it as a bitmap but that didn't seem to help. Do you mean using the addPage printJobOptions parameter? Or do you mean drawing them to a bitmapdata kind of thing?
    The slowness doesn't seem to be in the Flash processing part. The print dialog comes up quickly and then while I watch my print monitor I'll see all the pages showing up -- it'll say "printing 1/6." It just seems to take forever to spool to the printer. Much longer than if I print from something like Word or my browser, and those pages are usually far more complex that what I'm sending from Flash.
    I don't expect that it will be super quick, but it just seems like there is something going on. And I'm not even sure where to look.

  • What's the easiest way to extract data out of a multi page document in adobe acrobat 8 pro.?

    We have landers that are now sending us lists with multiple social security numbers in a single pdf with multiple pages, before they used to break it up into which departments they go to, so I installed acrobat 8 pro on the users machines, now we need to get certain lines of data within that document and make a single document for different departments out of that 1 document, i tried the crop tool and made a document from cropped image but it pastes it in the corner extremely small for some reason, and I dont see how you can extract that data and bring it into either word or make it a seperate pdf document, because it dosent keep any of the formatting????
    Please help

    You might just try to do a save as DOC. The formatting may be lost, depending on how the PDF was made.

Maybe you are looking for