Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Urgent : Not working : Converting PDF to HTML

$
0
0
I am facing multiple issues while converting an PDF document into and HTML and also SVG format. The requirement is as follows

1. Convert the attached pdf into a SINGLE file (css, images and everything in a single file)

>> I tried following the example and none API is no longer supported. PartsEmbeddingMode  and save with HTMLSaveOptions is not supported
// Load source PDF filecom.aspose.pdf.Document doc = new com.aspose.pdf.Document("c:/input.pdf");// Instantiate HTML Save options objectHtmlSaveOptions newOptions = new HtmlSaveOptions();// Enable option to embed all resources inside the HTMLnewOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;// Output file pathString outHtmlFile = "c:/Single_output.html";// Save the output filedoc.save(outHtmlFile, newOptions);


2. Convert the attached pdf into a HTML format with resources into a separate directory

I am getting the following error while executing this code

com.aspose.ms.System.IO.FileNotFoundException: File not found File: /Library/Fonts/Arial Bold.ttf
File name: '/Library/Fonts/Arial Bold.ttf' ---> /Library/Fonts/Arial Bold.ttf (Too many open files in system)
com.aspose.pdf.internal.p298.z3.<init>(Unknown Source)
com.aspose.pdf.internal.p298.z3.<init>(Unknown Source)


com.aspose.pdf.Document pdfDoc = new com.aspose.pdf.Document("/Users/rgaurava/Documents/__Demo/PhotoRus_RFP.pdf");
// Instantiate HTML Save options object
HtmlSaveOptions newOptions = new HtmlSaveOptions();
// Enable option to embed all resources inside the HTML
newOptions.setUseHighQualityRendering(true);
pdfDoc.save("/Users/rgaurava/Documents/__Demo/PhotoRus_RFP.pdf.html", com.aspose.pdf.SaveFormat.Html);

3. How to save the attached PDF file into an SVG format

Viewing all articles
Browse latest Browse all 3131

Trending Articles