Does JTextPane have document size restrictions?

I am running into a problem while using a JTextPane to display documents. I have written a simple test class as can be seen below. The largest file I can read in using jdk1.4_2 is 1.6MB. If I use jdk1.4_0, the size is reduced to 0.6MB. I have search in the problem database and could find nothing. Has anyone else seen similar issues? Any ideas for work arounds?
If I use a JTextArea, I have not had this problem only with the JTextPane. I do need to have the ability to display HTML, that is why I have stuck with the JTextPane.
import java.awt.*;
import java.io.*;
import javax.swing.*;
public class ReadTest extends JFrame {
    JTextPane editor;
    JScrollPane scrollPane;
    public ReadTest() {
         super("Test Editor");
         editor = new JTextPane();
         if(loadData()) {
             createUI();
    public void createUI() {
         Container contentPane = getContentPane();
         scrollPane = new JScrollPane( editor,
             JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,    
             JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
         scrollPane.setPreferredSize( new Dimension( 600, 800 ) );
         scrollPane.getViewport().setScrollMode( JViewport.SIMPLE_SCROLL_MODE );
         contentPane.add( scrollPane );
         setSize( 625, 800 );
         setLocation( 300, 200 );
         show();
    public boolean loadData() {
        boolean result = true;
        FileInputStream test = null;
        try {
            File outFile = new File("C:\\temp" + System.getProperty( "file.separator" ) + "test.out");
            test = new FileInputStream(outFile);
        catch(FileNotFoundException e){
            result = false;
        if( test != null ){
            try{
                editor.read(test, null);
            catch(IOException e){
                result = false;
        return( result);
    public static void main(String[] args) {
        ReadTest myEditor = new ReadTest();
}

Hi Joe,
It seems that your print drivers are limiting your options. Using a different print driver may help.
I've included a link to a post here that might help.
"Although I work for HP, I'm speaking for myself and not on behalf of HP"
"Say "Thanks" by clicking the Kudos Star in the post that helped you.
--Please mark the post that solves your problem as "Accepted Solution"

Similar Messages

  • Cannot Print a 5.5 x 8.5 document drop down menu does not have this size

    I a m trying to print an invitation that has a size of 5.5 x 8.5.  When you have to select a document size that size does not exsist nor does custom size exsist i  n the drop down menu when selecting the document size.  The document was done inMS word & when you do a print preview the document shows correctly.
    Thank you
    Joerene
    This question was solved.
    View Solution.

    Hi Joe,
    It seems that your print drivers are limiting your options. Using a different print driver may help.
    I've included a link to a post here that might help.
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • Does Solaris have file size limination?

    Dear Sir:
    Does Solaris or other UNIX OS have file size limination ?
    If yes, Please tell me
    where the manual or any documents refered ?
    Thanks Nicolas

    Hi Nicolas,<BR><BR>
    SunOS and Solaris 2.3 through 2.5.1 support file sizes up to 2GB<BR>
    in size. By size, it is understood that a file has with it, its<BR> own overhead (inode information, etc.) so closer investigation may<BR> reveal that the file in question is somewhat short of actually<BR>
    being 2GB in size.<BR>
    Solaris 2.6 has introduced the concept of largefiles.<BR>
    A largefile, indicates a file that has a size between 2GB<BR>
    and 1Tb (terabyte). <BR><BR>
    Here is a table of file and file systems limitations (for UFS)<BR> depending on Solaris releases:<BR><BR>
    <PRE>
    Single File File System
    SunOS 4.1.x 2Gb 2Gb
    SunOS 4.1.x + ODS 2Gb 1Tb
    Solaris 2.0-2.5.1 2Gb 1Tb
    Solaris 2.0-2.5.1 + SDS 2Gb 1Tb
    Solaris 2.6 ~800Gb 1Tb
    Solaris 7          ~800Gb          1Tb
    Solaris 8          ~800Gb          1Tb
    </PRE>
    <BR>On Solaris 2.6 and upwards, have a look at the manpage for<BR> largefile(5) or go to http://docs.sun.com and search for "largefile".
    <br><br>
    Hope this helps.<BR><BR>
    Caryl<BR>
    Sun Developer Technical Support<BR>

  • I received a PDF file and it does not have hole sizes or locations, how do I find them

    I receive a PDF file, when I open it there are no hole diameters or locations listed anywhere. What do I need to do to get the drawing to include this information

    Ask the creator of the file.

  • Problem opening mail attachments...were opening seamlessly on os 7.0...get an error   Filename Office open XML document/presentation File size   Does anyone have a solution? Please help.

    problem opening mail attachments...were opening seamlessly on os 7.0...get an error
    Filename
    Office open XML document/presentation
    File size
    Does anyone have a solution? Please help.

    Hi Charlotte,
    You don't say what your version of Windows you have. Assuming XP, go to Start | Run, type DXDIAG and click OK. Click the Sound tab and run the tests to eliminate a hardware problem first of all. If you don't hear anything, check your cables first of all. Also make sure "Mute" isn't checkmarked in your sound setup. You'll find that in Windows Control Panel.
    Which browser do you use? If you have Firefox 4, sign up to the HTML5 trial @ http://www.youtube.com/html5
    HTML5 is the latest video standard and doesn't require Flash player. Google is in the process of converting all its files to work with the new format. It may solve you problem. If you don't have Firefox 4, you can get it from here: http://www.mozilla.com/en-US/firefox/fx/
    IE8 doesn't support HTML5.
    To clean out your temp files, go to Start | Run, type: CLEANMGR and click OK. Click OK again to start the utility. Tick all the boxes except "Compress old files" because the latter takes too long, and then click OK. You can run this utility any time you wish by the way.
    The above steps will hopefully fix your problem. If not, post here again please.

  • What value does CROP have in editor if you cannot define output document size and document resolution

    Cannot define document size in EDITOR or output resolution. Document can only be defined as RATIO and output is fixed at 300. This problem does not allow you to edit in EDITOR then crop to a specific size so you don't know what the x,y dimension will be once opened in elements. My images are 36x54 at 72 which are 3:4 and can be resized to 4x6 8x12 and so on. Once document is in elements you cannot resize.....either for print or screen to these values without doing another crop or maybe I want something larger than the given crop.

    I don't comprehend this at all.
    On the crop tool's option bar, there should be a drop-down where one can get away from the default crop preset options to "Custom." The replacement values can be entered in inches, and the resolution can be changed to suit as well. Just highlight what you see, and type in new value for px/in.

  • Pages document "could not be read" bc. it "does not have a valid format"

    The document in question was properly saved and Pages was not open when my computer hung as it was shutting down. MS Word would not quit or force-quit and I had to hard restart the computer. When I later tried to open this Pages document, which I had been working on before Word froze, Page would not open it and responded with the error message: "This document "document_name.pages" could not be read. This document does not have a valid format." When I looked at the document in question I noticed that its file size was 0KB. I have no idea why this happened, but I suppose it has to do with my computer not shutting down properly and perhaps with Word freezing. If I repair my drive permission, re-index it, anything, will it help? Just a note on the status of this machine: spotlight stopped working earlier this morning and I was waiting to finish this document before repairing disk permissions and trying to fix that issue with Spotlight.
    In the meantime I have tried various fixes. First I tried to change the file ending to .zip, unpack it and open it. Then the same, but this time I tried to view package contents. It doesn't show up in the contextual menu as even having a package to show the contents of. The file is effectively empty, but I don't know where the contents went! The funny thing is that the MS Word doc was recovered automatically. Is it possible that Pages doesn't have an auto-recovery mechanism?
    I need this file urgently, or at least the text in it. It is the bibliography of an important paper due tomorrow at 5 pm.Any advice or suggestions would be greatly appreciated.
    BTW, I have used a file-recovery program in the past. It is called "Stellar Phoenix" and it worked wonderfully to find a Word doc that I accidentally deleted. It can't find .pages document though. In order to do so, I would need to tell the program what the average file size is, as well as the header information as follows. "Header (in hexadecimal)" "At Offset (in decimal)". I have no idea what this means, but if I could insert it, perhaps it could find the lost data. Should I have it search for .pages, .zip, .xml? I'm at a loss, but I know that it doesn't recognize .pages. In the meantime, I sent a support email to them and will see what happens.
    Thank you for your help.
    David

    I can't respond before.
    When the system say that your file size is 0KB, it means that nothing was saved. Only a file descripto exists.
    So, there is nothing to recover.
    Given the time the system crashed, you may have :
    (1) a simple descriptor with nothing written
    (2) a folder with every or only some of the required files.
    In this case, Phoenix is useless : it's unable to revive a folder.
    (3) a flatfile (a compressed version of the folder named above). It's only this kind of file which Phoenix may revive.
    With a bit of luck, Phoenix would be able to revive the index.xml file which was in the original folder created in the temporary folder.
    This file starts with :
    <?xml version="1.0"?><sl:document xmlns:sfa="http://developer.apple.com/namespaces/sfa"
    or
    <?xml version="1.0"?>
    <sl:document xmlns:sfa="http://developer.apple.com/namespaces/sfa"
    The minimal size for a Pages index.xml file is : 520038 bytes.
    If you retrieve the index.xml file, we may try to rebuild an usable package.
    Ask the recovery tool to transfer the recovered file on an other media.
    If the document embedded pictures, the index will give their path and their size which may be useful to recover them.
    Yvan KOENIG (VALLAURIS, France) lundi 1 novembre 2010 10:27:44

  • The document does not have a valid format.

    I created a special format document when I had Pages '08. I needed the proportions of the document to match the special paper on which the document would be printed so I created a special size for my document rather than 8 1/2 x 11. If I remember right it was closer to 8 1/2 x 13 or so. Anyway, I have now upgraded to Pages '09 and can no longer open any of these special format documents. I have versions of a couple of the documents that were created in Pages '08 without the special proportional size page and they open without issue. However the special size documents all get "The document does not have a valid format" and will not open. I really NEED these documents. I have seen some posts about renaming to a .zip and then something about an index file but I don't understand where this index file might be and what good it will do to open it. Also I know the files exist because they are still showing their original file sizes (not 0 MB). Any assistance would be appreciated.

    Don't continue to search fruhulda.
    I never saw such files.
    The only things which I may recognize are :
    the strings :
    mluc
    (10) nbNO --> Norvegian
    (16) svSE --> Sveridge
    (4) fiFI --> Finnish
    (1) daDK --> Danish
    (17) zhCN --> Chineese(1)
    (5) frFR --> French
    (8) jaJP --> Japanese
    (3) enUS --> English (US)
    (12) ptBR --> Portuguese (Brasil)
    (15) esES --> Spanish
    (18) zhTW --> Chineese(2)
    (14) ruRU --> Russian
    (9) koKR --> Korean
    (6) deDE --> Deutch (Germany)
    (2) nlNL --> Dutch (Nederland)
    (7) itIT --> Italian
    They are the symbols used to identify the languages used for 16 versions
    Two others are missing:
    (11) Polish (Polska) missing
    (13) Portuguese (Portugal) missing
    I found also
    iMac in plain ASCII and .i.M.A.C (dots are in fact NIL characters) which is the Utf 16 representation of iMac.
    During a few seconds I thought that it was a piece of System Files but the page thumbnail must be available somewhere so that the Finder is able to display it.
    I will send these genetically modified documents to Apple Bugs Hunters.
    Yvan KOENIG (VALLAURIS, France) lundi 31 janvier 2011 17:46:39
    At the very end there is also the trailing string which fool the message parser:
    the formula : *_Copyright Apple, Inc., 2010

  • How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software.

    How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software. I downloaded open office to my mac to try and save money. It worked well for a while. Now I get this pop-up message that asks me to "Reopen" and when I select the option, nothing happens. I cannot save my documents anymore and I cannot convert them to word. Help!

    dwb wrote:
    Does OpenOffice output Word documents by default or do you have to select it manually?
    You have 17 options to save as in Open Office, one of which is .doc  files,  yes it needs to be saved manually.
    You may be able to default to DOC, but have not tried same.
    Since Open Office is 99% same as Word, I use it, or Word, either one.  Open Office is a bit less buggy than Word 11'

  • I just updated my iTunes and I do not like the newer version.....can I go back to the earlier version??  This new version does not have the iTunes DJ nor does is show at the bottom as in the earlier version how many songs and the size of my library.

    I just updated my iTunes on 12-7-2012 and I do not like the newer version.....can I go back to the earlier version??  This new version does not have the iTunes DJ nor does is show at the bottom as in the earlier version how many songs and the size of my library.

    To do this in iMovie 11. use the SHARE menu. Share your project using the Share menu and choose Export Using QuickTime.
    In the Dialog box that comes up, choose Sound to AIFF, or one of the other sound options. This will create a file that you can drag into iTubes.

  • Loans document error Document header does not have a reconciliation key

    Hi All,
    I am trying to post a loans document through EK25 and while saving the document following erros is coming
    Formal error: Document header does not have a reconciliation key
    Message no. >0037
    Diagnosis
    You tried to post a document but a reconciliation key is missing from the document header. Since mass processing does not apply here (where the reconciliation key is automatically created) you must enter a reconciliation key.
    System Response
    Error message. Processing is terminated.
    Procedure
    Contact your system administrator.
    Procedure for System Administration
    If the program error occurred in an
    SAP standard program, enter a problem message
    Own program, correct the program
    Any input appreciated.
    Thanks,
    VR

    Hi,
    You need to assign the reconcilation group to the SAP user ID you are using to post the loan document.
    The reconciliation group is required if user-specific reconciliation keys are to be proposed automatically.
    The reconciliation group is freely selectable.
    Go to the following path in IMG-
    IMG->Financial Accounting->Contract Accounts Receivable and Payable->Basic Functions->Postings and Documents->Document-.Define Default Values->Maintain Rules for Reconciliation Key Default Values->Maintain Reconciliation Groups for Default Values
    Maintain the SAP User ID that you are using along with a reconciliation group.
    After, you maintained the user ID and saved it, try to post the loan document again.
    Hope it helps..
    Thanks,
    Amlan

  • Saved keynote document could not be read. Error message says The document does not have a valid format.

    Using Keynote '09 on an iMac OS 10.8.4. Two of my students saved a Keynote file then the next day when trying to open received an error message- The document "4b Molly.key" could not be read. The document does not have a valid format. The students are saving correctly. Any ideas how we can retrieve a working file? Why did this happen?

    Just tagging on as I encounted this problem this morning.  I'm using Mavericks, on MBP (late 2013). 
    Have both Keynote 5 and 6 - tried to open the file in both, to no avail.   I have also tried the renaming of .key to .zip that seemed to work for others with previous OS, but does not fix now.  Also tried uploading to iCloud, renaming, redownloading - no fix there either.  I've tried to open on iPad and on a different user's iMac - again, get the same error.
    It worked yesterday and the day before.  It is a large file; however, I realized that from last night to this morning the only different thing I did was that I inserted photos in the keynote deck by drag & drop verses Insert/Choose and wondering if this corrupted the file.
    I'm going to hope a fix is out there somewhere and that I don't have to spend hours upon days upon weeks redoing this 98+ page deck.
    Any suggestions?

  • My iphone does not have facetime on it.  I've tried going into restrictions, but there's a passcode that doesn't seem to be one that I've used before.  Is it possible to reset the phone and then just restore a portion of the old information?

    My iPhone does not have Facetime on it.  I've tried going into restrictions, but there's a passcode that doesn't seem to be one that I've used before.  Is it possible to reset the phone and then just restore a portion of the old information?  I've tried several pass codes and now am locked out for an hour after being locked out for 5 minutes and then 15 minutes.  It said that I had tried 7 pass codes prior to these, but I don't remember ever trying to get into restrictions before.
    I've looked up other posts on this, and my phone was purchased in the US and does not have an AE in the model number.

    Help for forgotten passcode >   iOS: Forgotten passcode or device disabled after entering wrong passcode
    When you have access to your iPhone again, FaceTime is a pre installed app that cannot be removed.
    Try a search >  iOS: Understanding Spotlight Search

  • I am attempting to upload an EPUB document to iTunes Connect, but each time that a login, "Apple ID does not have permission to use this site."  What is going on?

    I submitted an ISBN number and title to the iBooks Store using iTunes Connect.
    A nameless iBooks editor replied back, reuesting that I submit a digiral copy of my ePub document to iTunes Connect.
    The first time, I got past the login stage, but I was told that my title and ISBN had already been submitted and I was kicked,  the second through sixteenth time that I attempted to login, the system reported "Apple ID does not have permission to access this site"
    Can someone please tell me how to manuver around this roadblock?
    Regards,
    Robert Owen Cobb, CNE, MCSE
    aka The Clemmons Kid

    You have to apply to be approved for iTunes Connect first.
    Start here.
    https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/apply

  • I have just downloaded a copy of Photoshop and Adobe Bridge CS4 onto a second laptop I recently purchased. However the font size of the menu bar/tool bars is extremely small.  My other laptop also has a copy of CS4 but it does not have the extremely small

    I have just downloaded a copy of Photoshop and Adobe Bridge CS4 onto a second laptop I recently purchased. However the font size of the menu bar/tool bars is extremely small.  My other laptop also has a copy of CS4 but it does not have the extremely small font size.  Could you please tell me how to increase the font size in the menu/tool bars?

    You can't. Any version before Creative Cloud does not support high-DPI displays and that is just that. If you cannot adjust the system's screen resolution and so on, then there is nothing you can do.
    Mylenium

Maybe you are looking for

  • Reg function module POSTING_INTERFACE_CLEARING

    Dear experts, I have a requirement in tcode FB05(Posting with clearing: Initial screen).  In that i need to select the radio button 'Transfer Posting with Clearing'.  I dont know exactly what happens here. I have to use function module POSTING_INTERF

  • Help with creating AQ JMS

    Hiello, I'm trying to create JMS resource on WLS 10.3 to connect to AQ on a different server Here is what I'm trying to do: 1. I have an Oracle application (OTM) that can en-queue payload in an AQ. I have configured the AQ on the OTM server 2. I want

  • Restore Point?

    I use a G5 and have Skype installed. Over the weekend we lost power and after re-start I noticed Skype did not re-start as usual and I was being asked to re-install. After I did all my bookmarked and recent chats were deleted. I would like to restore

  • How to password protect folders

    I have looked on the forums and I have found that it is somehow possible, but there are no explanations on how to do it, it just shows how to hide the folders. I don't want to hide anything, I would just like to password protect the folder. How can I

  • DTW, UDF and User Tables

    I always see posts about DTW, so I tried looking to see if i could find what I need, but I couldn't... The thing is, I've created a UDF called IsExclusive to Item Master Data, and I've set Valid Values for it (Yes and No) Now, I'm trying to import th