Closed mskinner-au closed 10 months ago
I also have this problem. It is more visible on Microsoft Edge but happens on all the Browsers.
public static FileContentResult ExportaPdf(Report report, string reportName)
{
FastReport.Export.PdfSimple.PDFSimpleExport pdfSimpleExport = new FastReport.Export.PdfSimple.PDFSimpleExport();
pdfSimpleExport.ShowProgress = true;
pdfSimpleExport.Subject = SanitizeName(reportName);
pdfSimpleExport.Name = SanitizeName(reportName);
MemoryStream stream = new MemoryStream();
report.Report.Export(pdfSimpleExport, stream);
stream.Flush();
report.Dispose();
pdfSimpleExport.Dispose();
stream.Position = 0;
return new FileContentResult(stream.ToArray(), "application/pdf");
}
Result :
Was it really fixed?
PdfInfo contains a number of fields that contain meta data about the document. These are displayed in the document properties of Acrobat, or the tab of a web browser (for Title). Currently the static fields (Creator and Producer) are being encoded as HEX values, but the public fields are not. The readers I have tried are not rendering this data correctly. My testing indicates that changing the public fields to also be HEX encoded resolves the issue (e.g. changing the setters to be
this[key] = new PdfString(value, true);
)Examples of current rendering: