【问题标题】:Aspose converting only few pages of pdf to html Not All假设仅将几页 pdf 转换为 html 不是全部
【发布时间】:2017-01-31 14:15:17
【问题描述】:

我正在使用 Aspose.Pdf for java 将 pdf 转换为 html。它仅将 PDF 的前几页转换为 HTML,而不是所有页面。这是仅在免费试用期间的限制,还是我做错了什么。我从examples 运行了类 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);
    }

}

【问题讨论】:

    标签: java pdf aspose.pdf


    【解决方案1】:

    从 Aspose 支持部门确认,它仅在免费试用期间存在限制。 伤心:(

    【讨论】:

    猜你喜欢
    • 2020-10-15
    • 2011-01-13
    • 2018-04-06
    • 1970-01-01
    • 2012-11-21
    • 1970-01-01
    • 2014-10-28
    • 1970-01-01
    相关资源
    最近更新 更多