I’m trying to port the following code to 18+ aspose.Pdf version.
I know the Generator is not there anymore. but can’t seem to find a way to convert the following.
Could help me the following code?
Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf(outStream);
pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = Path.GetTempPath();
if (PDFA)
{
pdf.Conformance = Aspose.Pdf.Generator.PdfConformance.PdfA1B;
}
else
{
pdf.Conformance = Aspose.Pdf.Generator.PdfConformance.None;
}
if (Linearized)
{
pdf.Linearized = true;
}
else
{
pdf.Linearized = false;
}
// Produce the PDF file.
string outputFilePath = string.Format("{0}_page{1:00000}.pdf", outFile, iPage);
using (FileStream outputStream = new FileStream(outputFilePath, FileMode.Create))
{
outStream.WriteTo(outputStream);
pdf.Close();
outputStream.Close();
}
_outputFiles.Add(outputFilePath); // Add reference
}