I'm trying to use the conversion with the Document class in Spire.Doc to save RTF files as PDF. I have followed the example using:
- Code: Select all
document.LoadFromFile(rtfFilePath, FileFormat.Rtf);
document.SaveToFile(outputFileName, FileFormat.PDF);
Unfortunately, with the file I'm using, the SaveToFile method appears to throw an exception. Here's the stack trace:
- Code: Select all
at Spire.Doc.Fields.Field.get_End()
at spr⎳.ᜊ()
at spr⎳.ᜏ()
at spr⎳.ᜁ(RectangleF A_0)
at spr⎴.ᜂ(spr⎲ A_0)
at spr⎳.ᜁ(RectangleF A_0)
at spr⎳.ᜋ(spr⎲ A_0)
at spr⎳.ᜁ(RectangleF A_0)
at spr⎷.ᜀ(spr⎲ A_0, RectangleF A_1)
at spr⎷.ᜊ()
at spr⎷.ᜂ(RectangleF A_0)
at spr⎳.ᜋ(spr⎲ A_0)
at spr⎳.ᜁ(RectangleF A_0)
at spr⎳.ᜋ(spr⎲ A_0)
at spr⎳.ᜁ(RectangleF A_0)
at spr⎦.ᜀ(spr⎜ A_0, spr⎖ A_1, spr⠜ A_2)
at spr⠔.ᜒ()
at spr⠔.ᜓ()
at spr⠔.ᜀ(IDocument A_0)
at spr⡥.ᜀ(Document A_0, Stream A_1, ToPdfParameterList A_2)
at Spire.Doc.Document.ᜁ(String A_0, ToPdfParameterList A_1)
at Spire.Doc.Document.ᜆ(String A_0)
I've attached the file that appears to be causing the error in case you'd like to test with it.
Please let me know if this is something can be fixed on our end easily or otherwise.
Thank you,
Zac