PDF to HTML conversion issue in Java

Hello,


How to set up support for simplified Chinese, traditional Chinese.

htmlSaveOptions.setSaveName(“GroupDocs_Demo1.doc”);
conversionHandler.convertToHtml(“GroupDocs_Demo1.doc”, htmlSaveOptions);

Thanks


Hello,

The license file should have a .lic extension. Previously I have shared with you a link on our service , where you can get the temp license. You should follow all steps from this service (http://purchase.groupdocs.com/purchase/pricing-info-step-1-of-4.aspx)

If you will have any problems with getting the license file, then you can send your request to our sales team (sales@groupdocs.com) and they will glad to help you.


----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello ,

Sorry but I not understand your question. Do you want to use our library to translate file content with conversion to your language , or no ? For what you need the support of Chinese language?

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello



- OS version:
Win 7 (64)

- Maven version:
Apache Maven 3.3.9

- JDK version:
Java version: 1.7.0_80


For more information:
OS.jpg
MVN and JDK.jpg
Thanks,

I downloaded the license according to this step,
but did not receive the mail, you can send a temp license to my mailbox。
Or put the temp license directly in the attachment.

E-Mail:
1562058939@qq.com
78599194@qq.com
syang@campuscruiser.com

I suspect that the mail format is not correct, so the note 3 E-Mail

yes,we need the support of Chinese language
if demo.doc contains Chinese language, Converted HTML format whether contains garbled .

for example:
a1.png(ppt file)
a2.jpg(Converted HTML file)


Error:
严重: Presentation uses next fonts:
'Arial'
'宋体' (ERROR: NOT FOUND IN YOUR SYSTEM!!!)
'Wingdings'
'Calibri'
'微软雅黑' (ERROR: NOT FOUND IN YOUR SYSTEM!!!)

But my system contains ('宋体','微软雅黑'),
for example:
My System Font.png

Today, I have a new problem.


code one:
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
// Optional parameters
htmlSaveOptions.setSavePath(“C:\Users\summer\Desktop\FileStructure02\”+ “vdxToHtmlFile/”);
htmlSaveOptions.setPage(2);
String savedPath = null;

System.out.println(“vdx”);
htmlSaveOptions.setSaveName(“GroupDocs_Demo.vdx”);
savedPath = conversionHandler.convertToHtml(“GroupDocs_Demo.vdx”, htmlSaveOptions);
System.out.println(savedPath);

error:
Exception in thread “main” com.groupdocs.conversion.exception.InternalException: Can’t convert to html!
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:74)
Caused by: com.groupdocs.conversion.exception.CorruptFileException: File extension html of filename C:/Users/summer/Desktop/FileStructure02/vdxToHtmlFile/GroupDocs_Demo.vdx_2.html cannot be opened, and looks to be corrupted.
at g.toHtml(Unknown Source)
at ab.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
… 2 more
Caused by: com.groupdocs.conversion.exception.CorruptFileException: File extension of filename Can’t convert diagram to html! cannot be opened, and looks to be corrupted.
at g.toHtml(Unknown Source)
… 5 more
Caused by: com.groupdocs.conversion.exception.CorruptFileException: File extension of filename Can’t convert pdf to html! cannot be opened, and looks to be corrupted.
at w.toHtml(Unknown Source)
… 6 more
Caused by: class com.groupdocs.conversion.internal.c.a.pd.internal.ms.System.cd: Invalid index: index should be in the range [1…n] where n equals to the pages count.
com.groupdocs.conversion.internal.c.a.pd.db.a(Unknown Source)
com.groupdocs.conversion.internal.c.a.pd.db.d(Unknown Source)
w.toHtml(Unknown Source)
g.toHtml(Unknown Source)
g.toHtml(Unknown Source)
ab.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:74)
at com.groupdocs.conversion.internal.c.a.pd.db.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.db.d(Unknown Source)
… 7 more


code two:
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
// Optional parameters
htmlSaveOptions.setSavePath(“C:\Users\summer\Desktop\FileStructure02\”+ “vdxToHtmlFile/”);
htmlSaveOptions.setPage(1);
String savedPath = null;

System.out.println(“vdx”);
htmlSaveOptions.setSaveName(“GroupDocs_Demo.vdx”);
savedPath = conversionHandler.convertToHtml(“GroupDocs_Demo.vdx”, htmlSaveOptions);
System.out.println(savedPath);

error:
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.groupdocs.conversion.internal.c.a.pd.internal.p218.y.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.k.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p162.t.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p350.m.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at w.toHtml(Unknown Source)
at g.toHtml(Unknown Source)
at g.toHtml(Unknown Source)
at ab.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:70)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 137
at com.groupdocs.conversion.internal.c.a.pd.internal.p549.a.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p265.b.(Unknown Source)
… 20 more


Only difference:
htmlSaveOptions.setPage(2);
htmlSaveOptions.setPage(1);

I know what this parameter means.But still don’t understand why this kind of wrong.

Hello,


Could you please send this request to our sales team (sales@groupdocs.com), they should help you with this issue.

---------

Best regards,

Evgen Efimov


http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thanks,

Page count is ok!

But new question:

The temp License had download(GroupDocs.Conversion.lic),
But,there is still a mistake

test code1:
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.setAsListItems(true);
htmlSaveOptions.setSavePath(“C:\Users\summer\Desktop\FileStructure02\”
+ “toPDFPages\”);
ArrayList list;

System.out.println(“PDF (page_size=”
+ conversionHandler.getPageCount(“GroupDocs_Demo5-01.pdf”) + “)”);
htmlSaveOptions.setSaveName(“GroupDocs_Demo5-01.pdf”);
//D:\tccwork2\conversion\file_samples\GroupDocs_Demo5-01.pdf
list = conversionHandler.convertToHtml(“GroupDocs_Demo5-01.pdf”, htmlSaveOptions);
for (String item : list) {
System.out.println(item);
}

error1:
PDF (page_size=4)
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.groupdocs.conversion.internal.c.a.pd.internal.p218.y.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.k.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p162.t.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p350.m.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at w.toHtml(Unknown Source)
at ae.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:73)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 137
at com.groupdocs.conversion.internal.c.a.pd.internal.p549.a.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p265.b.(Unknown Source)
… 18 more


test code 2:
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.setAsListItems(true);
htmlSaveOptions.setSavePath(“C:\Users\summer\Desktop\FileStructure02\”
+ “toDOCPages\”);
ArrayList list;

System.out.println(“DOC (page_size=”
+ conversionHandler.getPageCount(“GroupDocs_Demo1-01.doc”) + “)”);
htmlSaveOptions.setSaveName(“GroupDocs_Demo1-01.doc”);
//D:\tccwork2\conversion\file_samples\GroupDocs_Demo5-01.pdf
list = conversionHandler.convertToHtml(“GroupDocs_Demo1-01.doc”, htmlSaveOptions);
for (String item : list) {
System.out.println(item);
}

error2:
DOC (page_size=5)
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.groupdocs.conversion.internal.c.a.pd.internal.p218.y.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.k.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p162.t.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p350.m.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at w.toHtml(Unknown Source)
at S.toHtml(Unknown Source)
at ah.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:73)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 137
at com.groupdocs.conversion.internal.c.a.pd.internal.p549.a.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p265.b.(Unknown Source)
… 19 more


file list:
file1.zip

Hello,

As I said you earlier, that I can't reproduce the issues with your files. On my side they are converted well. Could you please specify you use Eclipse IDE to ran the examples? Did you download our library from our web site or it was downloaded from maven repository automatically?

Also please share a ConversionSample.java file again.


---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


I've done what you said, but it's still in the wrong.

file list:
file2.zip

This is my local configuration:

eclipse IDE:
Eclipse Java EE IDE for Web Developers.
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600
Java version : 1.7.0_80

Maven version : Apache Maven 3.3.9

OS : windows 7 (64)

Project source:From your company's website(GroupDocs.Conversion_1.3.0-Java.zip)

Document tools for (pdf,doc,xls,ppt):WPS Office (10.1.0.5603)

license:From your company's website(GroupDocs.Conversion.lic)

I really can't think of anything that needs to be configured, or that my configuration is wrong.

Please tell me what I should do to change!!!

This error has occurred from the beginning, but I don't know why:

Exception in thread "main" java.lang.ExceptionInInitializerError
at com.groupdocs.conversion.internal.c.a.pd.internal.p218.y.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.k.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p162.t.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p350.m.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at w.toHtml(Unknown Source)
at S.toHtml(Unknown Source)
at ah.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:71)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 137
at com.groupdocs.conversion.internal.c.a.pd.internal.p549.a.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p265.b.(Unknown Source)
... 19 more

This is my local project:
GroupDocs.Conversion_1.3.0-Java-Examples.zip

This is my Run result:
test DOC.jpg
test PDF.jpg

Hello,


Could you please run the sample with run.bat file and please share a screenshot from the terminal with us.

-------

Best regards,

Evgen Efimov


http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello ,

We are really sorry that you have the issue, but we can't reproduce the issue on our side, to help you with fixing it. The code that you use is correct and in our environment it works well with your files. We think that the issue with your IDE . We asked you in our previous post to run the application without IDE .

Could you please follow these steps:

- download our library ,
- download our examples ,
- install (reinstall) the library via install_library.bat file. It will install our library to your local maven repository,
- comment unnecessary examples in the ConversionSample.java file and in the ToHtmlSampleConversion.java file ,
- edit the Config.java file (eg: update storage path, save path, license path). You should configure storagePath to our folder with file examples ,
- run the examples via run.bat file.

Please, try to convert our files (not modified). We will wait for your results.

--------------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi,

Thanks,

Where is install_library.bat file?

Summer
Hello ,

This file should be in the "lib" folder with the GroupDocs.Conversion.jar file.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi,

I’ve done it again, according to your steps, but it’s still in the wrong.

I really don’t know what to do, this mistake is that I lost half a life!
Oh, my God.

PDF (page_size=4)
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.groupdocs.conversion.internal.c.a.pd.internal.p218.y.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.d.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.k.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p163.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p162.t.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p350.m.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.iZ.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.a.a(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.ay.a(Unknown Source)
at w.toHtml(Unknown Source)
at ae.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
at com.groupdocs.conversion.maven.converters.ToHtmlSampleConversion.samplePdfToHtmlFiles(ToHtmlSampleConversion.java:531)
at com.groupdocs.conversion.maven.converters.ToHtmlSampleConversion.convertToFiles(ToHtmlSampleConversion.java:127)
at com.groupdocs.conversion.maven.ConversionSample.main(ConversionSample.java:55)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 137
at com.groupdocs.conversion.internal.c.a.pd.internal.p549.a.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p265.b.(Unknown Source)
… 20 more


Hi,

I was thinking that this error was not related to the documentation tool,

For example:
I used the tool 1 (WPS) to open the domo1.doc file, found that there are 3 pages;
but you use the tool 2 to open domo1.doc, found that there are 2 pages.

So cause this error !

What tools do you use to open these files(doc,ppt,pdf,xls) ?

.................
Caused by: java.lang.ArrayIndexOutOfBoundsException: 137
at com.groupdocs.conversion.internal.c.a.pd.internal.p549.a.b(Unknown Source)
at com.groupdocs.conversion.internal.c.a.pd.internal.p265.b.(Unknown Source)
... 20 more


Hello,

If you think that the reason of the issue is in your application - you can check our library on other environment (for example: on Linux OS) or try to use English version of the Windows OS .

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi,

Here is environment of American colleagues – just unzip and adjust \examples\runConversion.bat – if it runs, then it is my build and if it doesn’t- most likely an low-level OS compatibility issue

So my question is that:
This is an low-level OS compatibility issue about your API.

Do you agree?

Summer