For example, public String getVersionString() returns the document's version number as a string, whereas public int getMajorVersion() and public int getMinorVersion() return the version number's major and minor components as integers. The PDFFile class presents several methods that return information about the PDF document. The constructor throws java.io.IOException if it cannot find the document's cross-reference table or trailer dictionary, and if it has trouble parsing these items. RandomAccessFile raf = new RandomAccessFile (new File ("sample.pdf"), "r") īyteBuffer buf = fc.map (_ONLY, 0, fc.size ()) Īccording to PDFFile's Javadoc, the constructor's argument is derived from a java.io.RandomAccessFile instance (via a intermediary). The following code fragment shows you how to use this class's solitary public PDFFile(ByteBuffer buf) constructor to create a PDFFile instance initialized to a specific PDF document: ![]() This package's PDFFile class is the entry point into the API. You'll need to adjust those paths to match your FreeType 2 installation.PDF Renderer presents an API that's organized into several packages, with serving as the main package. If you also have FreeType 1 installed in (for example) /usr/local, the /usr/local/include/freetype2 directory must be searched before /usr/local/include (because FT1 installs /usr/local/include/freetype/*.h, and has many file names in common with FT 2 - these get loaded instead of the FT2 files).Įxport CXXFLAGS="-I/usr/local/include/freetype2 -I/usr/local/include" The Xpdf configure script doesn't provide any way of setting two different include directories for FT2. For example, if you have FT2 installed in /usr/local, you'll need "-I/usr/local/include" (for ) and "-I/usr/local/include/freetype2" (for ). "įreeType 2 requires two different directories on the include path. You'll need to adjust those paths to match your FreeType 2 installation. use "export CXXFLAGS=." instead of "setenv CXXFLAGS. You can set CXXFLAGS on the command line before you run configure:Įxport CXXFLAGS= "-I/usr/ local/include/ freetype2 -I/usr/ local/include" I haven't come up with a clean solution for this. This can cause the same sort of problems. You may also have FreeType 1 or an older version of FreeType 2 installed somewhere else on the standard include search path (typically /usr/X11R6/include on Linux systems). If you also have FreeType 1 installed in (for example) /usr/local, the /usr/local/ include/ freetype2 directory must be searched before /usr/local/include (because FT1 installs /usr/local/ include/ freetype/ *.h, and has many file names in common with FT 2 - these get loaded instead of the FT2 files). For example, if you have FT2 installed in /usr/local, you'll need "-I/usr/ local/include" (for ) and "-I/usr/ local/include/ freetype2" (for ). ![]() The symptoms are weird compile errors that appear to be related to FreeType ("FT_Error not declared", syntax errors in FreeType include files, etc.)įreeType 2 requires two different directories on the include path. "There are a few common problems encountered when compiling Xpdf with FreeType 2. How do I get Freetype so that this dependency can be resolved? libfreetype6 and libfreetype6-dev are installed. Pdfinfo, pdffonts, and pdfimages, but not xpdf or pdftoppm maybeĬhecking where to find the freetype2 header files.Ĭonfigure: WARNING: Couldn't find FreeTypeĬonfigure: WARNING: - You will be able to compile pdftops, pdftotext, ![]() Please let me know how I can proceed.Ĭhecking whether to use freetype2 library. However I am missing some dependencies to freetype.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |