Closed saf-itpro closed 3 years ago
I've got the same error, but for my file with .rtf extension. In my case, it was not an RTF file, but a Docx file saved as RTF.
I'll double check again, but I don't think I was able to replicate the original error. This library can only handle RTF files, not other file formats masquerading as RTF files. You should be able to detect if a file truly is RTF by looking for the header {\rtf1
. A DOCX file would start with the bytes PK
since it is a zip file.
@erdomke sure, I understand that the library handles just RTF. I was able to open my masquerading file with a library for reading docx.
The reason I wrote my previous message here is that I received the same error as OP, but obviously my case is different. So I decided to leave a feedback in case someone else will face the same error.
"Have also verified that the file does not contain any spaces at the end." How did you do that? I'm having the same problem here.
I have this problem too
Ho lo stesso problema
Opened
RtfPipe-master
solution in latest version ofVS2017
and added a newWinForm
project in the solution referencingRtfPipe
dll from the library project. But the following line in my WinForm project gives the error shown below:var st = Rtf.ToHtml("minimal.rtf");
Error:
NOTE:
I had successfully ran the following before debugging the solution:
PS> Install-Package RtfPipe -Version 1.0.6980.30005
build.ps1
Had copied
minimal.rtf
file from the unit test project of the solution to the root directory of myWinForm
project and have included it the project. Have also verified that the file does not contain any spaces at the end.