I’m trying to convert html file to PDF/A but can’t find anything online. PdfSaveOptions does now provide a way to configure the out PDF format…
Is there any other way to do this without using the Aspose PDF library?
public override Result<byte[]> ConvertToPdf(byte[] file, string fileName)
{
using MemoryStreamProvider streamProvider = new();
using MemoryStream htmlStream = new(file);
using HTMLDocument htmlDocument = new(htmlStream, ".");
PdfSaveOptions options = new();
AsposeConverter.ConvertHTML(htmlDocument, options, streamProvider);
// Get access to the memory stream that contains the result data
MemoryStream pdfStream = streamProvider.Streams.First();
pdfStream.Seek(0, SeekOrigin.Begin);
// TODO: Convert to PDF to PDFA
// There seems to be no other way to convert to PDFA than to process pdf stream using Aspose PDF library.
return pdfStream.ToArray();
}
}