Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/356.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Aspose仅将少数pdf页面转换为html而不是全部_Java_Pdf_Aspose.pdf - Fatal编程技术网

Java Aspose仅将少数pdf页面转换为html而不是全部

Java Aspose仅将少数pdf页面转换为html而不是全部,java,pdf,aspose.pdf,Java,Pdf,Aspose.pdf,我正在使用Aspose.Pdf for java将Pdf转换为html。它只是将PDF的前几页转换为HTML,而不是所有的页面。这只是免费试用期间的限制,还是我做错了什么。我从中运行了com.aspose.pdf.examples.AsposePdfExamples.DocumentConversion.pdftohtmlsingelhtmlwhithallresourcesembedded.java类 该类代码如下所示: package com.aspose.pdf.examples.Aspo

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

}

它从Aspose支持部门确认,这只是免费试用期间的限制。 Sad:(

30天可以帮助评估Aspose.Pdf,没有任何限制。