Home > Back-end >  How the Java implementation PDF word
How the Java implementation PDF word

Time:09-22

Friends doing recently graduated from the design, download a lot of literature, want to word, looking for a lot of conversion tool, the final transformation is successful, and curious how Java implementation PDF to word, on the Internet to find a lot of methods for example pdfbox conversion, I now realize can be extracted from the text, images can also be extracted to blank PDF, but how to keep the transformation PDF format of the original graphic mixed, no ideas, don't know how to start to do, beg god give directions!

CodePudding user response:

https://www.cnblogs.com/Yesi/p/11233238.html

CodePudding user response:

reference 1st floor yhznb response:
https://www.cnblogs.com/Yesi/p/11233238.html

Is not the same as in this and I want to achieve, I just want to turn the word but to keep the original structure and artwork in PDF in word, not separate

CodePudding user response:

Spire. PDF for Java can directly save the PDF to Word:
//loading PDF 
PdfDocument PDF=new PdfDocument ();
PDF. LoadFromFile (" Input. PDF ");
//save as Word format
PDF. SaveToFile (" ToWord. Docx, FileFormat. Docx);

Refer to the original

CodePudding user response:

reference Eiceblue reply: 3/f
Spire. PDF for Java can directly save the PDF to Word:
//loading PDF 
PdfDocument PDF=new PdfDocument ();
PDF. LoadFromFile (" Input. PDF ");
//save as Word format
PDF. SaveToFile (" ToWord. Docx, FileFormat. Docx);

Refer to the original

Also find this package before seems to be only a few days free trial transformation also has a number of pages limit when

CodePudding user response:

Can use aspose - words it is a charge, but you can download the cracked version
String docPath="D:/2222. Docx";
String pdfPath="D:/aspose. PDF";
The File File=new File (pdfPath);
FileOutputStream os=new FileOutputStream(file);
Com. Aspose. Words. Document doc=new com. Aspose. Words. The Document (docPath);
Doc. Save (OS, SaveFormat. PDF);/

CodePudding user response:

The
reference 5 floor el alamein regretless reply:
can use aspose - words it is charging, but you can download the cracked version
String docPath="D:/2222. Docx";
String pdfPath="D:/aspose. PDF";
The File File=new File (pdfPath);
FileOutputStream os=new FileOutputStream(file);
Com. Aspose. Words. Document doc=new com. Aspose. Words. The Document (docPath);
Doc. Save (OS, SaveFormat. PDF);/

Okay, I give it a try
  • Related