@@ -44,6 +44,8 @@ public final class pdf2htmlEX {
4444 private String p_userPassword = "" ;
4545 private boolean p_outline = true ;
4646 private boolean p_drm = true ;
47+ private boolean p_embedFont = true ;
48+ private boolean p_embedExternalFont = true ;
4749 private String p_backgroundFormat = "" ;
4850
4951 public static class ConversionFailedException extends Exception {
@@ -141,6 +143,16 @@ public pdf2htmlEX setDRM(@NonNull boolean enableDRM) {
141143 return this ;
142144 }
143145
146+ public pdf2htmlEX setEmbedFont (@ NonNull boolean embedFont ) {
147+ this .p_embedFont = embedFont ;
148+ return this ;
149+ }
150+
151+ public pdf2htmlEX setEmbedExternalFont (@ NonNull boolean embedExternalFont ) {
152+ this .p_embedExternalFont = embedExternalFont ;
153+ return this ;
154+ }
155+
144156 /**
145157 * @param backgroundFormat: png (default), jpg or svg
146158 */
@@ -178,7 +190,7 @@ public File convert() throws IOException, ConversionFailedException {
178190 m_poppler_dataDir .getAbsolutePath (), m_pdf2htmlEX_tmpDir .getAbsolutePath (),
179191 this .p_inputPDF .getAbsolutePath (), outputHtml .getAbsolutePath (),
180192 this .p_ownerPassword , this .p_userPassword , this .p_outline , this .p_drm ,
181- this .p_backgroundFormat
193+ this .p_backgroundFormat , this . p_embedFont , this . p_embedExternalFont
182194 );
183195
184196 // retVal values defined in pdf2htmlEX.cc
@@ -199,7 +211,7 @@ public File convert() throws IOException, ConversionFailedException {
199211 return outputHtml ;
200212 }
201213
202- private native int call_pdf2htmlEX (String dataDir , String popplerDir , String tmpDir , String inputFile , String outputFile , String ownerPassword , String userPassword , boolean outline , boolean drm , String backgroundFormat );
214+ private native int call_pdf2htmlEX (String dataDir , String popplerDir , String tmpDir , String inputFile , String outputFile , String ownerPassword , String userPassword , boolean outline , boolean drm , String backgroundFormat , boolean embedFont , boolean embedExternalFont );
203215
204216 // Because Java cannot setenv for the current process
205217 static native void set_environment_value (String key , String value );
0 commit comments