Exceptionunable to access font.list

edited 11:08PM in FastReport .NET
One of my customer complains about the error message
unable to access c:\myprogrammfolder\font.list when exporting a reportfile
Here is the stack trace
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append)
bei System.IO.File.CreateText(String path)
bei FastReport.Fonts.TrueTypeCollection.StoreFontList(String font_list)
bei FastReport.Fonts.TrueTypeCollection.CheckFontList(String ConfigFolder)
bei FastReport.Fonts.TrueTypeCollection.GetTrueTypeFont(String key)
bei FastReport.Export.TTF.ExportTTFFont.GetTrueTypeFont(Font source_font)
bei FastReport.Export.TTF.ExportTTFFont.GetFontData(Boolean packed)
bei FastReport.Export.Pdf.PDFExport.WriteFont(ExportTTFFont pdfFont)
bei FastReport.Export.Pdf.PDFExport.AddPDFFooter()
bei FastReport.Export.Pdf.PDFExport.Finish()
bei FastReport.Export.ExportBase.Export(Report report, Stream stream)
bei FastReport.Export.ExportBase.Export(Report report, String fileName)
bei FastReport.Report.Export(ExportBase export, String fileName)

What is wrong here ? It is possible for him to change the report file. I'm not sure if he had done so

Comments

  • edited June 2019
    I investigate it a little bit more. It is somewhere in my code.
    Unfortunately Git does not show any differences between the two version (previous version did not create font.list)
    What leads to create font.list in fastreport ?
  • I've the same error, first report my customer export get this error then it work fine

  • Most likely the user does not have write permissions to the application folder. In recent versions, you can change the file save path:

    FastReport.Utils.Config.FontListFolder = "C:\\MyFolder";

    You can also define saving and reading fonts for PDF. To do this, please check out the demo example in "FastReport.Net\Demos\C#\FontHandlersExportToPDF"

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.