I have a customer trying to print an RTF file (a rather simple file with four paragraphs) and our program crashes on the call to VpeRenderRTF (7.1, 32-bit, Windows platform, Windows 10 OS). When this has happened in the past, the usual fix is to load the document in WordPad instead of Word and resave it, or reconstruct the document from scratch in WordPad (usually by copying the text into a Text Editor to remove all formatting, then pasting into WordPad and reapplying any formatting), WordPad seems to create much simpler RTF files than Word, and we have had more success getting VPE to print files saved by WordPad. Of course, this is the first time I'm doing this under Windows 10.
I tried this technique in this case, but noticed two problems: The first word in the 2nd/3rd/4th paragraphs was dropped, and a hyperlink which WordPad automatically and unconditioanlly formats with blue text and underlined is not printed either. I know enough about RTF files to be dangerous: I pulled it up in a text editor and noticed that the first paragraph has a markup code of \pard\sa200\sl276\slmult1 but the other three do not; I added this to the other three paragraphs, and that took care of the missing first word problem. (As if VPE is expecting the next thing to appear after a \par code is another markup code and it is eating the next word that appears instead of printing it?) I also removed the hyperlink codes around the web address, and that took care of the web address not printing.
Of course if I load the file again in WordPad, it automatically applies the formatting to the hyperlink and if I save the file it does not retain the markup codes at the beginning of paragraphs 2/3/4.
Should VPE be able to handle a simple file like this? Or is perhaps Word and WordPad both generating invalid RTF files? I created an RTF file with both the non-working and working codes and have a screenshot here showing the RTF file in WordPad, the VPE preview window, and the RTF file in NotePad++ (the RTF code that doesn't work appears first, then I pasted in my edited lines):
Since in this case we don't need any fancy formatting, I will probably just add code to handle a plain text file to do the job now, but it might be helpful for future reference to get more details on the compatibility/limitations of VPE RTF printing...