-
-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Describe the bug
When a PDF is being exported for a selected document. a System.NotSupportedException is being thrown when the PDF title, author, and/or subject contain a : (colon) or character that is not valid in folder and file names.
To Reproduce
Steps to reproduce the behavior:
- Select documents to export in Documents list
- Click File menu and then Export
- Select target folder
- Click OK
- See error
Expected behavior
PDF document and extra metadata for each selected documents should be exported into the selected folder as Author\Subject\Title.pdf (and xml).
Screenshots
Desktop (please complete the following information):
OS: Windows 10 22H2
PDFKeeper Version: 11.1.0 and lower
Additional context
System.NotSupportedException: The given path's format is not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at PDFKeeper.Core.Commands.ExportDocumentCommand.Execute()
at PDFKeeper.Core.Presenters.MainPresenter.ProcessEachCheckedDocument(CheckedDocumentAction checkedDocumentAction, String value)
at PDFKeeper.Core.Presenters.MainPresenter.ExportEachSelectedDocument()
at PDFKeeper.WinForms.Views.MainForm.ToolStripItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
