Aspose converting only few pages of pdf to html Not All

孤街醉人 提交于 2019-12-12 01:21:05

问题


I am using Aspose.Pdf for java to convert pdf to html. It is converting only first few pages of PDF to HTML but not all the pages. Is it a restriction only during free trial or am I doing something wrong. I ran the class com.aspose.pdf.examples.AsposePdfExamples.DocumentConversion.PDFToHTMLSingleHTMLWithAllResourcesEmbedded.java from the examples.

Code for that class is below:

package com.aspose.pdf.examples.AsposePdfExamples.DocumentConversion;

import com.aspose.pdf.Document;
import com.aspose.pdf.HtmlSaveOptions;
import com.aspose.pdf.LettersPositioningMethods;

public class PDFToHTMLSingleHTMLWithAllResourcesEmbedded {

    public static void main(String[] args) {
        // Load source PDF file
        Document doc = new Document("input.pdf");
        // Instantiate HTML Save options object
        HtmlSaveOptions newOptions = new HtmlSaveOptions();
        // Enable option to embed all resources inside the HTML
        newOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
        // This is just optimization for IE and can be omitted
        newOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
        newOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
        newOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;
        // Output file path
        String outHtmlFile = "Single_output.html";
        // Save the output file
        doc.save(outHtmlFile, newOptions);
    }

}

回答1:


Its confirmed from Aspose support that its a limitation during free trial only. Sad :(



来源:https://stackoverflow.com/questions/41959801/aspose-converting-only-few-pages-of-pdf-to-html-not-all

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!