Class ResourceCache


  • public class ResourceCache
    extends Object
    • Field Detail

      • enable

        public boolean enable
        the flag allows to disable caching of fonts in special cases
      • debugOn

        public boolean debugOn
      • freeRam

        public boolean freeRam
    • Method Detail

      • allocateFontNr

        public int allocateFontNr()
      • getSpacerImage

        public Image getSpacerImage()
      • getDynamicImage

        public org.zefer.html.doc.view.PD4ImageWrapper getDynamicImage​(String tagName,
                                                                       int width,
                                                                       int height,
                                                                       String id,
                                                                       HashMap attributes,
                                                                       String onBodyLoad,
                                                                       Vector scriptSections,
                                                                       boolean asIs)
      • getImage

        public org.zefer.html.doc.view.PD4ImageWrapper getImage​(String pathToObject,
                                                                boolean asJavaImage)
      • getImage

        public org.zefer.html.doc.view.PD4ImageWrapper getImage​(String pathToObject,
                                                                String originalRef,
                                                                boolean asJavaImage,
                                                                int baseWidth,
                                                                int baseHeight,
                                                                boolean asIs)
      • getObject

        public byte[] getObject​(String pathToObject)
      • getObject

        public byte[] getObject​(String pathToObject,
                                boolean internal)
      • getObject

        public byte[] getObject​(String pathToObject,
                                String pathToObjectSav)
      • getObject

        public byte[] getObject​(String pathToObject,
                                String originalPath,
                                boolean suppressSessionID,
                                boolean internal,
                                boolean doNotCache)
      • getObjectAlternativeWay

        public byte[] getObjectAlternativeWay​(String pathToObject,
                                              boolean suppressSessionID)
      • getFontMetrics

        public org.zefer.font.PD4FontMetrics getFontMetrics​(String[] faces,
                                                            int style,
                                                            float size,
                                                            boolean isPdfGeneration,
                                                            String sampleText)
      • getDefaultMonospace

        public String getDefaultMonospace()
      • getDefaultSansSerif

        public String getDefaultSansSerif()
      • getDefaultSerif

        public String getDefaultSerif()
      • getSizeConverter

        public org.zefer.html.doc.css.CssRuntime.SizeConverter getSizeConverter​(Double dbl)
      • getTtfDir

        public String getTtfDir()
      • resetTtfDir

        public void resetTtfDir()
      • setPdfa

        public void setPdfa​(boolean pdfa)
      • setHttpRequest

        public void setHttpRequest​(javax.servlet.http.HttpServletRequest httpRequest,
                                   javax.servlet.http.HttpServletResponse httpResponse)
        Deprecated.
        binary compatibility with code compiled against earlier PD4ML versions only; the build marks it synthetic, so compilers do not see it. Use setHttpRequest(Object, Object).
      • setHttpRequest

        public void setHttpRequest​(Object httpRequest,
                                   Object httpResponse)
        Parameters:
        httpRequest - javax.servlet or jakarta.servlet HttpServletRequest
        httpResponse - javax.servlet or jakarta.servlet HttpServletResponse
      • clearCache

        public static void clearCache()
      • getExtraProperties

        public Properties getExtraProperties()
      • addInlineResource

        public void addInlineResource​(String id,
                                      org.zefer.html.doc.IncludeElement element)
      • cleanInlineResources

        public void cleanInlineResources()
      • ignoreCSS

        public boolean ignoreCSS​(String path,
                                 boolean debug)
      • setDocumentBase

        public void setDocumentBase​(URL documentBase)
      • getDocumentBase

        public URL getDocumentBase()
      • isApplyKerning

        public boolean isApplyKerning()
      • isProcessLigatures

        public boolean isProcessLigatures()
      • setApplyKerning

        public void setApplyKerning​(boolean applyKerning)
      • supportComplexScripts

        public void supportComplexScripts​(boolean complexScripts)