Printing problem with RTF file in java

Hi,
i actually got code to print the RTF doc using java, it works fine if we give small content (some text), but throws error 'java.io.ioException: Too many close-groups in RTF " when actual bill content is pass.
Thanks in advance

Can you please share the code to print the RTF file using java API

Similar Messages

  • Printing problem with ads on as java when printing large files

    hi all
    we have an wd for java application running on as java 7.0 sp18 and adobe document service if we print
    small files everything works fine with large files it fails with the following error (after arround 2 minutes)
    any ideas
    #1.5^H#869A6C5E590200710000092C000B20D000046E16922042E2#1246943126766#com.sap.engine.services.servlets_js
    p.server.HttpHandlerImpl#sap.com/tcwddispwda#com.sap.engine.services.servlets_jsp.server.HttpHandlerImp
    l#KRATHHO#8929##sabad19023_CHP_5307351#KRATHHO#63a60b106ab311de9cb4869a6c5e5902#SAPEngine_Application_Thr
    ead[impl:3]_15##0#0#Error#1#/System/Server/WebRequests#Plain###application [webdynpro/dispatcher] Process
    ing HTTP request to servlet [dispatcher] finished with error.^M
    The error is: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException:
    Failed to  UPDATEDATAINPDF^M
    Exception id: [869A6C5E590200710000092A000B20D000046E1692201472]#

    Hello
    on which support package level is the java stack  ?
    kr,
    andreas

  • C6150 Photosmart Print problem with photo files only

    Operating system : Microsoft Windows Vista Ultimate 32 
    Connected to your PC : Wireless Network
    Problem description : Attempting to print photos with Adobe Photoshop or MS Office Picture Manager fails. The job appears in the print queue, the size gets to 48 bytes but no further. Attempting to delete the job from the print queue also fails. The Status changes from Printing to Deleting but it fails to delete until the PC is restarted.
    I have experienced this problem occasionally over the past several months but lately it appears to be permanent. I believe the problem is with the Windows Vista software because all other files (e.g. MS Word, Adobe PDF, MS IE, emails, etc.) all print normally without any problem. Also, the fact that the job in the print queue acknowledges the Delete command but fails to execute it arouses suspicion.
    So, although this is probably not an HP problem, maybe someone reading this might have some knowledge of how I can resolve it and be able to print my photos once more. Any advice will be greatly appreciated.
    I would describe my skill level as Intermediate

    Dear 8lives
    Thank you for your suggestions. I ran the "sfc/scannow" ploy. When it finished it said the Windows resource protection found corrupt files but was unable to fix some of them. Details are included in the CBS Log. It gave a path to the CBS log, but when I tried to follow it it came back "Access is denied". Ain't Window wonderful! It has been around all these years, made all that money, but still becomes corrupt no matter how much you spend on anti-virus software and maintenance routines, and then it denies access to what is corrupted, and cannot be uncorrupted without spending money to get the problem fixed. If computers were not so darned essential I wouldn't have one. Next one won't be a Windows PC!
    No, I haven't tried re-installing anything because I believe the only thing that might solve my problem is to reinstall Windows. As an Intermediate, that is too scary. I will carry on as best I can, finding fewer and fewer of the resources I paid for usable, until I give up and bite the bullet and see if life is any better if I purchase an iMac. Fingers crossed!
    Gerrry

  • HP Officejet100 Mobile L411a intermittent Bluetooth printing problems with PDF files

    Hello,
    Our company provides computer-hosted medical devices controlled by an application running on Windows7 computers we supply. We are currently using the HP Officejet 100 as a Bluetooth printer. In some of our customer offices, we experience printing problems using the printer in Bluetooth mode (there are never problems if the printer is connected by a USB cable.)
    The printing problems typically affect PDF files printed through Adobe Reader 10, and the symptom is one of the following:
    Send a print job to the printer. It doesn't print and eventually the print queue shows an "Error Printing" message. If any print jobs are removed and the printer is power-cycled, the problem goes away for the time being.
    2.  Same as above but power-cycling does not cure the problem and nothing will print, even a test page.
    In either of these cases there are no problems if a USB cable is used.
    The PDF files we are trying to print are typically 5 pages with 3 of the pages having a lot of graphics and the remainder being text only.
    Has anyone seen this behavior and is there anything we can do about it?
    Thanks.

    I don't anything about this printer, but I do know that bluetooth is really flaky with large files since it's got a crappy transfer rate, could be that the transfer is dropping and freezing the printer up. Does it have encryption turned on?

  • Strange......problem with batch file in java

    hi,
    my problem is that i have created one bat file and i want to run that file in java but it is not running properly. the problem is .......
    i have created one bat file named "file1.bat" & content of this file is as follows :-
    [ ag > b.txt]
    (and content of file "ag" is "aaaaaaa" )
    now i am trying to run this bat file in java and want to read this b.txt in which i have redirected the content of file "ag".
    for that i have written the code like this:-file name is "runbf.java"
    import java.awt.*;
    import java.lang.Runtime;
    import java.io.*;
    public class DriveVol
    public static void main(String args[]) throws IOException
    int volumn;
    Runtime r = Runtime.getRuntime();
    r.exec("ss.bat");
    FileInputStream fp;
    fp = new FileInputStream("b.txt");
    flush();
    do
    volumn = fp.read();
    System.out.print((char)volumn);
    }while(volumn != -1);
    fp.close();
    when i am running this programme first it is not displaying the content of b.txt. but when u run this prog twice then only it 'll give the correct ans. what i mean is, i'll explain that stepwise.
    1. as per my prog. -- r.exec("aa.bat") -- this line 'll execute first. so content of ag 'll redirect to file "b.txt"
    2. now i am trying to read the file "b.txt" using FIleInputStream...
    3. but first time it is giving some garbbage value.when i give --c:jdk1.3\bin>java runbf
    4. but the very next moment when again i run that file - c:jdk1.3\bin>java runbf
    it 'll give the correct value.
    5. again when i change the content of file ag(suppose "bbbbbbb"). & try to run "runbf.java" like this-
    -- c:jdk1.3\bin>java runbf --
    6. then it 'll display the value "aaaaaa". now when again i run that file
    it 'll give the correct value "bbbbbb"
    7. so every time i have to run that "runbf.java" twice for printing the correct
    value of file "b.txt"
    so what i think is that, it is not refreshing the data of file "b.txt". after executing this line
    r.exec("aa.bat");
    so is there any method to refresh the data of file "b.txt"??????
    i think u 'll try to understand my problem...
    so please help me to get the ans.......
    thx.........

    pls can anyone hlp............

  • Printing problem with PDF files

    Hello. I recently have bought mac book (10.9). When I try to print pdf files, it does not work. I can print word files, but when I open a pdf file either by acrobat reader or preview, it does not print. Thank you very much for your help.

    Also having other "permission" based problems as well. Other people cannot open my PDFs even though I have not used any security. I'm thinking about getting a previous version of Accrobat Pro and installing that.

  • Reading an RTF file in Java

    Hi,
    Can someone tell me how can we read the data from an .rtf files like we do with text files in Java.
    I have seen solutions using Swing rtfeditor etc.. But I just need to read the data, I do not want to open rtf page.
    Any help would be appreciated.
    KK

    If you are not to "read" but to obtain bytes then you can modify this:
    //try{
      InputStream stream = new FileInputStream("cc.rtf");//file name is arbitrary
                                                                             //or BufferedInputStream can be used
       int n=0;
    while((n=stream.read())!=-1){
                System.out.print(Integer.toString(n));
                System.out.print(" ");
        System.out.println();
       if(stream!=null) stream.close();
    //   catch(IOException ioe){
    //       throw ioe;
    //  }

  • Creation of .RTF file in java

    Hi,
    I want to create/edit .RTF file through java application. In my RTF file, I should be able to edit data(formatting), inserting tables. This is already done. Now I want to create chart (like pie-chart) using java. I searched the net for the last couple of days but I couldn't get the proper help. I can do that in SWING but its of no use.
    can anyone help me in this?
    Thanks & Regards,
    mrP

    Hi,
    Can someone please point me in the right direction? I'm trying to create an RTF file from data in a database, so I have no need to use JTextPanel or any GUI components. I've been trying to use the RTFEditorkit with a DefaultStyledDocument, but can only manage to insert one line into the document(!) Does anyone have any suggestions or examples that would explain how to do this?
    Any ideas would be appreciated.
    Thanks in advance,
    Gillian

  • Printing problems with hp laserjet 1018

    - printing problem with my hp laserjet 1018 (no *.pdf files!), all other documents were printed
    - hp photosmart premium c309 works with all file types
    Windows 7 64 bit
    Adobe Acrobat Pro 10.1.7
    Acrobat Reader 11.0.3

    Also having other "permission" based problems as well. Other people cannot open my PDFs even though I have not used any security. I'm thinking about getting a previous version of Accrobat Pro and installing that.

  • Printer problem with AW 6.2.9

    I have a recurring printer problem with both hp deskjet 5150 and Epson R220. After much work with techs at both, we have determined that it is an AW problem (v. 6.2.9) Other files print okay. I've searched through recent posts and found similiar questions, but the answers aren't specific to my problem. I gather that it involves trashing certain AW files, such as Appleworks.plist and other Appleworks prefs. It will help it I know the specific files to trash and as much detail about how to find them on the HD. I will be infinitely grateful for any help.
    OSR
    Mac G4 Mac OS X (10.4.6)
    Mac G4   Mac OS X (10.4.6)  

    Welcome to Apple Discussions
    You are correct that deleting the AppleWorks preferences can fix some printing problems. I'm surprised that in finding that information you didn't come across a post with the specific information or a tip to my user tip, AppleWorks has stopped working correctly, that explains which preference files ot delete.
    Make sure you have the newest printer driver for each printer. Also, use Disk Utility to repair permissions after any system update or upgrade.

  • How to show print Preview of an file in java

    Hi,
    Suppose i have a file like "bina.xls". Now i want to see the print preview of this file from java code. How is this possible? I s there anybody can help me? now i am in serious trouble with this? I can generate an excel file. But i can not show this file with JExcelApi. i can know that this is possible with jasper report, how this is possible with Jasper Report ? if any one help me with sample code then i will be very gratefull to u . Please help me.
    With Regards
    Bina

    This forum is exclusively for Sun Java Studio Creator. Please post your queries on appropriate forums to have better discussions :
    e.g.
    Java Technology Forums - Java Programming :
    http://forum.java.sun.com/forum.jspa?forumID=31

  • Problem with URL File download

    Hi every one i am facing a problem with URL File read Technique
    import java.awt.Color;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.net.URL;
    import java.net.URLConnection;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    public class JarDownloader
         boolean isSuccess = false;
         public JarDownloader(String url)
              downloadJar(url);          
         public boolean isDownloadingSuccess()
              return isSuccess;
         private File deleteExistingFile(String filename)
              File jarf = new File(filename);
              if(jarf.exists())
                   jarf.delete();
              return jarf;
         public static void main(String args[]){
              new JarDownloader("url/filename.extension");
         private void downloadJar(String url)
              try
                   URL jarurl = new URL(url);
                   URLConnection urlc = jarurl.openConnection();
                   urlc.setUseCaches(false);
                   urlc.setDefaultUseCaches(false);
                   InputStream inst = urlc.getInputStream();
                   int totlength = urlc.getContentLength();
                   System.out.println("Total length "+totlength);
                   // If the size is less than 10 kb that means the linkis wrong
                   if(totlength<=10*1024)throw new Exception("Wrong Link");
                   JFrame jw =new JFrame("Livehelp-Download");
                   JPanel jp =new JPanel();
                   jp.setLayout(null);
                   JLabel jl = new JLabel("Downloading required file(s)...",JLabel.CENTER);
                   jl.setBounds(10,10,200,50);
                   jp.add(jl);
                   JProgressBar jpbar = new JProgressBar(0,totlength);
                   jpbar.setBorderPainted(true);
                   jpbar.setStringPainted(true);
                   jpbar.setBounds(10,70,200,30);
                   jpbar.setBackground(Color.BLUE);
                   jp.add(jpbar);
                   jw.setContentPane(jp);
                   jw.pack();
                   jw.setResizable(false);
                   jw.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                   jw.setLocationRelativeTo(null);
                   jw.setSize(220,150);
                   jw.setVisible(true);
                   int readlngth=0;
                   int position=0;
                   byte[] readbytes = new byte[totlength];
                   while(totlength-position > 0)
                        readlngth = inst.read(readbytes,position,totlength-position);
                        position+=readlngth;
                        jpbar.setValue(position);
                   File jarf = deleteExistingFile(filename);
                   jarf.createNewFile();
                   //FileWriter fwriter=new FileWriter(jarf,true);
                   FileOutputStream fout = new FileOutputStream(jarf,true);
                   DataOutputStream dout = new DataOutputStream(fout);
                   dout.write(readbytes);
                   dout.flush();
                   dout.close();
                   inst.close();
                   jw.setVisible(false);
                   jw.dispose();
                   isSuccess=true;
              }catch(Exception ex)
                   isSuccess=false;
    }From the above code i received the total length of the PAGE content (i.e here url is a file) when i tried to find the size of that file it return -1.
    please help me

    I think the real problem is that you don't check the return value from read (it's probably less than data.length indicating an incomplete read). Isn't there a readFully somewhere?

  • Print problem with Acrobat XI

    Hi,
    After implementation of Acrobat XI my company is experiencing problems with pdf files failing to print on some printers.
    The problem occurs for these specific printer types (reported so far): OCE 6522C, OCE CS 250, Canon iR-ADV C5045/5051.
    The common problem is that when the pdf is printed (Reader XI standalone or as IE plugin or Acrobat XI professional) it looks normal and we get the normal confirmation that the print job was successfully sent to printer. However, in all cases the job never goes into the printer queue but gets deleted without a trace.
    The problem is only present for PDF files created using Acrobat Distiller XI and printed with Reader/Acrobat XI. All pdf files created with Distiller versions pre XI, print fine on all printers.
    The problem is present regardless of which user creates the pdf and who tries to print (as long as Acrobat XI is used.)
    If we create pdf using the utility "PDF creator" from pdfforge, the printing works perfect from both Reader and Acrobat XI.
    If we print pdf files generated by Distiller XI with "PDF Architect" from pdfforge, the printing still works perfect.
    It seems to us that a change in either Distiller XI and/or Reader/Acrobat XI is causing the printers to skip/delete the job??
    We cannot easily ensure that all printer drivers are updated, as this is a large company with several thousand enployees in many different offices around the world.
    Some system details:
    OS: Win 7/Serv. pack 1/64-bit
    Reader v. XI, 11.0.2
    Adobe Distiller professional XI, 11.0.0136
    Distiller settings: Profile: "High Quality Print", Security: none, Comaptibility: Acrobat 5.0 (Pdf 1.4), All fonts embeded
    Printer driver used for generating ps: Adobe PDF (Adobe PDF converter)

    Hi,
    I have the exact same problem. I have noticed that the screen asking for the serial number is on my OS language (Danish). If I deactivate photoshop and activate again the same screen is in English and allows me to login and register the license with no problems. Only when printing with the Adobe PDF printer I get the problem!!
    Anyone?

  • Printing Problems with PDF - Adobe Acrobat

    Printer - HP Deskjet 3070A
    Laptop - Asus Zenbook running Windows 7 Home Premium
    Issue: Printing problems with PDF (Adobe Acrobat Reader)
    Dear All,
    Please help!
    My printer was working absolutely perfectly until my brother in law recently needed to borrow my printer. He plugged in his laptop running Windows 8 (awful thing that is). Since he did this to print his own PDF, I cannot print mine.
    Although all the text will appear on the page perfectly both in the document view and on actual printing, it appears that some of the transparent formatting stuff on a PDF - such as boxes you have to fill in and transparent areas (such as you find on glorious tax forms) are omitted completely. In fact, in their place I was getting a single black dot. Now, after uninstalling and re-installing updates for the printer, windows 7, adobe acrobat reader, etc.etc. I get squat. Just all the text laid out but none of the shading or boxes.
    I have tried fiddling with the printer settings; the  print as 'photo' option, dpi settings, greyscale - as much as I can think of and I am thoroughly stumped.
    In a desperate attempt, I even installed the Universal Printer Drivers - thinking it might have been that. No. All I got was a page of gobbledygook. Consequently, I uninstalled and reinstalled the normal drivers again.
    If there are any wonderful people out there with any fabulous ideas about how I can get my shading and boxes back; I'd  very much appreciate it. Sadly I have a tax return to fill out (which is already fabulously late) and need my printer to work!
    Much appreciation in advance x

    Hey there @Reverie!
    Thanks for posting on the HP Forums!
    I can see that the printer is no longer printing in the correct format after it was plugged into the Windows 8 computer!  You mentioned you have run the updates and uninstalled/re-installed the printer software.  Have you uninstalled and re-installed the Adobe software? Are you getting the same issue from other programs as well? Are you getting the same issues if you are logged in as a different user on the computer? 
    I have located the HP Update Software Utility that may be able to help.  You can download an run the utility.  It may be able to locate any other updates for the printer.
    I would also recommend running a disk cleanup on the computer to clear any temporary files and junk files that may be causing some performance or software issues. If you do not know how to run a disk cleanup on the computer please follow this document regarding Delete files using Disk Cleanup.  It is recommended to restart the computer after a disk cleanup. After the restart try the print job again!
    Let me know if that helped and thanks again for posting on the HP Forums!
    Cbert
    I work on behalf of HP.
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" at the bottom of this post to say “Thanks” for helping!

  • Problem with .jnlp files

    I have an iMac running 10.6.8. I'm having a problem with .jnlp files. I've downloaded two, cgoban.jnlp and gopanda.jnlp. When I double-click the file, nothing happens. If I Control-click and select Open With Java Web Start, same. Nothing happens. Software Update says my Java is up to date. Any ideas?

    A few other similar threads were solved by this — I'd like to give credit where credit's due but I can't find the original posting.
    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.p list
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <!--
            <key>JavaWebComponentVersionMinimum</key>
            <string>1.6.0_37-b06-435</string>
    -->
            <key>LastModification</key>
            <string>Thu, 31 Jan 2013 04:41:14 GMT</string>
            <key>PlugInBlacklist</key>
            <dict>
                    <key>10</key>
                    <dict>
                            <key>com.macromedia.Flash Player.plugin</key>
                            <dict>
                                    <key>MinimumPlugInBundleVersion</key>
                                    <string>11.3.300.271</string>
                            </dict>
    <!--
                            <key>com.oracle.java.JavaAppletPlugin</key>
                            <dict>
                                    <key>MinimumPlugInBundleVersion</key>
                                    <string>1.7.11.22</string>
                            </dict>
    -->
                    </dict>
            </dict>
            <key>Version</key>
            <integer>2028</integer>
    </dict>
    </plist>

Maybe you are looking for

  • Aperture, iPhoto, and MobileMe

    I use Aperture on my iMac. My wife uses iPhoto on her iMac and doesn't have Aperture. She has published a mobileme album to a gallery we share on one mobileme account. Is there a way to sync the mobileme gallery with Aperture on my computer and iphot

  • Help on oracle tags in dynamic pages

    Hi All I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table. I see some <oracle> tags every time i create a dynamic page but have never used them

  • Help with using my Video Ipod on different Itunes

    I upgraded to Itunes 7 and using my ipod on the different logins seemed a breeze. I use my laptop on my home network as well as my work network. The "home" login has my library. From work, I could attach my ipod and listen to it but for the last week

  • Localization in Flash CC

    Hi guys, I made an app a few years ago and the client is now asking for a german translation, where is the best place to look for tutorials on localization? The whole app is being updated now as it was starting to look dated. Most things I've found a

  • Slow in opening

    Numbers 3.5 slow when using file/open (10 sec spinning ball). Yosemite 10.10.1, iMac 16 GB RAM