0

我正在使用 Aspose.Pdf for java 将 pdf 转换为 html。它仅将 PDF 的前几页转换为 HTML,而不是所有页面。这是仅在免费试用期间的限制,还是我做错了什么。我从示例中运行了 com.aspose.pdf.examples.AsposePdfExamples.DocumentConversion.PDFToHTMLSingleHTMLWithAllResourcesEmbedded.java 类。

该类的代码如下:

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);
    }

}
4

1 回答 1

1

Aspose 支持证实,它仅在免费试用期间存在限制。伤心:(

于 2017-02-01T12:11:03.740 回答