Menu

getResourceStream(RESOURCE_PATH + "cjkfonts.p

2006-03-31
2013-05-01
  • David Thielen

    David Thielen - 2006-03-31

    Hi;

    I have a problem where sometimes (usually it works fine) the line:

                    InputStream is = getResourceStream(RESOURCE_PATH + "cjkfonts.properties");

    In com.lowagie.text.pdf.CJKFont returns null when called. The call to
    is.close() then throws an exception as is is null.

    Any idea why this sometimes does not work? This is uncer .NET 2.0 and uses the version for .NET 2.0 only.

    Thanks - dave

     
    • Kazuya Ujihara

      Kazuya Ujihara - 2006-03-31

      System.Reflection.Assembly.LoadFrom("iTextAsian.dll") is required before the program reads 'cjkfonts.properties' in VJ# 2.0. In contrast, it is not reuqired in VJ# 1.1. This matter is one of the incompatibilities between v1.1 and v2.0.

       
      • David Thielen

        David Thielen - 2006-04-03

        Thank you - that fixed it.

        One question - any reason not to use Assembly.Load() instead? With LoadFrom I have to assume that iTextAsian.dll is in the same directory as iText.dll (usually but not always true).

        thanks - dave

         
        • Kazuya Ujihara

          Kazuya Ujihara - 2006-04-03

          Of course, we can also use Assembly.Load(String) method. It depends on the senario that which is the best way to load assebmbly.

           
      • David Thielen

        David Thielen - 2006-04-03

        Hi;

        Also, is there a list of things like this that I need to do to initialize iText?

        thanks - dave

         
        • Kazuya Ujihara

          Kazuya Ujihara - 2006-04-03

          It's a same with classpath or cp option in Java. I list DLLs frequently used below.

          Apache.Xml.Commons.dll and Apache.Crimson.dll - XML parser. You can use the other parser like Xerces <https://sourceforge.net/project/showfiles.php?group_id=151482&package_id=170731>.
          iTextAsian.dll - on using Asian cmaps

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.