Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Title property of PDFSimpleExport is not setting the title on the resulting PDF page as expected. #686

Open
wagenheimer opened this issue Mar 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wagenheimer
Copy link

wagenheimer commented Mar 18, 2024

Describe the bug
The Title property of PDFSimpleExport is not setting the title on the resulting PDF page as expected.

To Reproduce

 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);
    pdfSimpleExport.Title = 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");
  }

Observed behavior
The title on the PDF page displays strange characters.

Expected Behavior:

The title on the PDF page should match the value assigned to the Title property of the PDFSimpleExport object.

Screenshots
image

@wagenheimer wagenheimer added the bug Something isn't working label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant