title: How to convert pptx to pdf document using java code
body: <p>I am trying to use example from the <a href="https://stackoverflow.com/questions/8354568/how-to-convert-a-ppt-file-into-pdf-file-in-java">link</a>, but i am getting exceptions like.</p>
  
  <pre><code>java.lang.IllegalArgumentException: Failed to fetch default style for otherStyle and level=0
      at org.apache.poi.xslf.usermodel.XSLFTextParagraph.getDefaultMasterStyle(XSLFTextParagraph.java:1039)
      at org.apache.poi.xslf.usermodel.XSLFTextRun.fetchCharacterProperty(XSLFTextRun.java:536)
      at org.apache.poi.xslf.usermodel.XSLFTextRun.getTextCap(XSLFTextRun.java:417)
      at org.apache.poi.xslf.usermodel.XSLFTextRun.getRenderableText(XSLFTextRun.java:67)
      at org.apache.poi.xslf.usermodel.XSLFTextParagraph.getRenderableText(XSLFTextParagraph.java:115)
      at org.apache.poi.xslf.usermodel.XSLFTextParagraph.breakText(XSLFTextParagraph.java:915)
      at org.apache.poi.xslf.usermodel.XSLFTextShape.breakText(XSLFTextShape.java:483)
      at org.apache.poi.xslf.usermodel.XSLFTextShape.drawContent(XSLFTextShape.java:491)
      at org.apache.poi.xslf.usermodel.RenderableShape.render(RenderableShape.java:540)
      at org.apache.poi.xslf.usermodel.XSLFSimpleShape.draw(XSLFSimpleShape.java:534)
      at org.apache.poi.xslf.usermodel.XSLFSheet.draw(XSLFSheet.java:506)
      at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:220)
      at test.PptxToPDFConversion.convertPPTToPDF(PptxToPDFConversion.java:87)
      at test.PptxToPDFConversion.main(PptxToPDFConversion.java:106)
  </code></pre>