-
Notifications
You must be signed in to change notification settings - Fork 1
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
Extra characters added to all slides when building a pro6 file #72
Comments
I hate RTF so much, haha. I'll have to look into this. Can you provide some input file/data and what it generated as output? |
This basic sample produces the attached file. The decoded
I had to add the |
Ok, finally got around to looking at this, and I think it might truly be as simple as just removing those extra character - RTF is weird to me and difficult to understand, so a lot of what I have in there was just me copy/pasting "working" RTF data and inserting the text between the formatting characters. Something I learned recently is that ProPresenter on a Mac seems to read a different property that a Windows machine does. Those <NSString rvXMLIvarName="PlainText">...</NSString>
<NSString rvXMLIvarName="RTFData">...</NSString>
<NSString rvXMLIvarName="WinFlowData">...</NSString>
<NSString rvXMLIvarName="WinFontData">...</NSString> So I am on a Windows machine here, and from my prespective it all seemed to work but I had no idea different platforms would read things differently! So, before I commit a fix to this I will need some confirmation that this is working as I expect it to. I am using this from one of my unit tests to generate a const builder = new v6Builder({
properties: {
CCLISongTitle: 'My Test Song',
},
slideGroups: [
{
label: 'Verse 1',
slides: ['Hello World\nline 2'],
},
],
}); And below are the outputs of that before and after the fix of just removing those characters from the RTF string. 📄 before.txt | 📄 after.txtPlease download these, change the file extension to |
Yep, the "after" file looks good. The "before" one had an extra ` at the very end of the xml and wouldn't import. Once I removed that then it imported and had the extra characters in the slide text. |
Cool! I'm gonna update my unit tests and publish a new release with that fix soon then. Thanks for the confirmation! |
ProPresenter-Parser/src/utils.ts
Line 19 in 236f6d8
I don't know anything about the RTF format, but are the
',
characters after\\cocoasubrtf320
correct? I ask because when I import a pro6 document generated from this library all of my slides end up with those characters at the beginning of the text.I'm on an M1 Mac, if that matters. I saw another issue where apparently Propresenter 7 uses the RTFData field. That led me to looking into how the RTF is generated and seeing those exact characters in the
formatRtf
utility method just seemed suspicious.The text was updated successfully, but these errors were encountered: