We have Identified an issue where we are adding text to a page and the second attempt causes a “Invalid font name” error.
at Aspose.Pdf.Text.FontCollection.get_Item(String name)
at #=zljpl9PxfTsh1Q8XAN$zauZ0VLBVjxSm8dipfuQekc8YSdMbqd2pN$oQ=.#=zY6DWKF4=(Operator #=zsbU_x4Q=)
at #=zljpl9PxfTsh1Q8XAN$zauZ0VLBVjxSm8dipfuQekc8YSdMbqd2pN$oQ=.#=zpFRM5lk=(Page #=zE1jRiis=)
at #=z7bI4GhXHbP5a$tKtZ8fm0$FK08ZqVwwFMU7Gn9PU8pHKjC5I32rh0nhN51yo.#=z_YqDx3Uum8NK(BaseOperatorCollection #=zjOjnrAs=, Resources #=zbBygHAs=, Page #=zE1jRiis=, Rectangle #=zqNRxG1$Q9Fa2)
at #=z7bI4GhXHbP5a$tKtZ8fm0$FK08ZqVwwFMU7Gn9PU8pHKjC5I32rh0nhN51yo.#=z_YqDx3Uum8NK(BaseOperatorCollection #=zjOjnrAs=, Resources #=zbBygHAs=, Rectangle #=zqNRxG1$Q9Fa2)
at #=z7bI4GhXHbP5a$tKtZ8fm0$FK08ZqVwwFMU7Gn9PU8pHKjC5I32rh0nhN51yo.#=zcUe771Y=()
at #=z7bI4GhXHbP5a$tKtZ8fm0$FK08ZqVwwFMU7Gn9PU8pHKjC5I32rh0nhN51yo…ctor(Page #=zE1jRiis=, TextSearchOptions #=z6ldrMdvX$E_U, Boolean #=zveOihqWiLh45)
at Aspose.Pdf.Text.TextFragmentAbsorber.Visit(Page page)
at Aspose.Pdf.PageCollection.Accept(TextFragmentAbsorber visitor)
at Program.GetTextCoordinates(Document doc) in C:\Users\gmitchell\source\repos\AsposeAddText\Program.cs:line 38
at Program.Main(String[] args) in C:\Users\gmitchell\source\repos\AsposeAddText\Program.cs:line 25
I have also created a sample application to demonstrate the issue.
Using latest 23.9.0 version of Aspose.PDF