添付のpdfファイルをhtmlに変換すると、レイアウトが崩れた状態となります。
サンプルソースと変換対象のpdfファイルを送付しますので、ご確認いただき解決方法があればご教示ください。
【ソース】
public static void main(String[] args) throws Exception {
String fileName = “”;
String fileNameTemp = “”;
License license = new License();
license.setLicense("C:\\rendition\\classes\\Aspose.Total.Java.lic");
try{
File file = new File(args[0]);
// Access the first slide
int index = file.getName().lastIndexOf('.');
if (index!=-1){
fileName = file.getName().substring(0, index);
}
fileNameTemp = file.getParent() + "\\" + args[1] + "_" + fileName;
// Open the document
Document pdfDocument = new Document(args[0]);
// Load PDF document
// Instantiate HtmlSaveOptions instance
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
// Save the HTML file
pdfDocument.save("D\\Result\\" + fileName + ".html", saveOptions);
}
【Asposeのバージョン】
17.6
400046278.zip (1.3 MB)