centic9 / poi-on-android

A sample project that shows how Apache POI can be used in an Android application
Apache License 2.0
357 stars 89 forks source link

Can not rsolve PdfConverter and PdfOptions #94

Closed kishanverma26 closed 2 years ago

kishanverma26 commented 2 years ago

I need to convert doc to pdf

PdfOptions class and PdfConverter class is not available in this

I am currently using implementation 'fr.opensagres.xdocreport:org.apache.poi.xwpf.converter.pdf:1.0.6' library but it is showing me this error

**Caused by: java.lang.ClassNotFoundException: Didn't find class "java.awt.Color"**
centic9 commented 2 years ago

As the package-name "fr.opensagres.xdocreport" implies, this is a tool that is unrelated to Apache POI and thus not something that is handled as part of this project.

You might succeed in using a similar approach as https://github.com/centic9/poi-on-android/blob/master/poishadow/src/main/java/org/apache/poi/java/awt/Color.java and how the shading is done in https://github.com/centic9/poi-on-android/blob/master/poishadow/build.gradle#L43

However I won't be able to solve this as part of this sample project, thus I am closing this here, you can also try to discuss details with the developer of xdocreport if necessary.