Posted 23 December 2020, 12:24 pm EST
I’m using WIN form to export section reports to PDF. Before upgrading to AR14, exported PDF files are less than 100kB (e.g. 5738.pdf). After upgrading to AR14, export PDF files become 16MB with similar contents (download a sample from https://drive.google.com/file/d/1kzno5YndUl955ar0FCPI2T_BoP9Gliao/view?usp=sharing)
The code I used to export tPDF.
string exportFolderPath = Program.FolderPath("Export");
if (Directory.Exists(exportFolderPath) == false) Directory.CreateDirectory(exportFolderPath);
string filePath = string.Format(@"{0}\{1}.pdf", exportFolderPath, invPrintData.InvoiceHeaders[0].invoiceId);
if (File.Exists(filePath)) File.Delete(filePath); //if same name exists, delete the original one
using (GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport export = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport())
using (FileStream stream = new FileStream(
path: filePath,
mode: FileMode.CreateNew))
{
export.ImageQuality = GrapeCity.ActiveReports.Export.Pdf.Section.ImageQuality.Lowest;
export.Options.Application = "MOSES ERP";
export.NeverEmbedFonts = "Arial Unicode MS"; //no effect
export.Export(receiptReport.Document, stream);
stream.Close();
}
This happens in some computers but not all. Please advise how to fix the problem.