@@ -42,6 +42,7 @@ public final class pdf2htmlEX {
4242 private File p_inputPDF ;
4343 private String p_ownerPassword = "" ;
4444 private String p_userPassword = "" ;
45+ private boolean p_outline = true ;
4546
4647 public static class ConversionFailedException extends Exception {
4748 public ConversionFailedException (String errorMessage ) {
@@ -128,6 +129,11 @@ public pdf2htmlEX setUserPassword(@NonNull String userPassword) {
128129 return this ;
129130 }
130131
132+ public pdf2htmlEX setOutline (@ NonNull boolean enableOutline ) {
133+ this .p_outline = enableOutline ;
134+ return this ;
135+ }
136+
131137 /*
132138 * @deprecated pdf2htmlEX-Android doesn't fork anymore
133139 */
@@ -156,7 +162,7 @@ public File convert() throws IOException, ConversionFailedException {
156162 Integer retVal = call_pdf2htmlEX (m_pdf2htmlEX_dataDir .getAbsolutePath (),
157163 m_poppler_dataDir .getAbsolutePath (), m_pdf2htmlEX_tmpDir .getAbsolutePath (),
158164 this .p_inputPDF .getAbsolutePath (), outputHtml .getAbsolutePath (),
159- this .p_ownerPassword , this .p_userPassword
165+ this .p_ownerPassword , this .p_userPassword , this . p_outline
160166 );
161167
162168 // retVal values defined in pdf2htmlEX.cc
@@ -177,7 +183,7 @@ public File convert() throws IOException, ConversionFailedException {
177183 return outputHtml ;
178184 }
179185
180- private native int call_pdf2htmlEX (String dataDir , String popplerDir , String tmpDir , String inputFile , String outputFile , String ownerPassword , String userPassword );
186+ private native int call_pdf2htmlEX (String dataDir , String popplerDir , String tmpDir , String inputFile , String outputFile , String ownerPassword , String userPassword , boolean outline );
181187
182188 // Because Java cannot setenv for the current process
183189 static native void set_environment_value (String key , String value );
0 commit comments