-
-
Notifications
You must be signed in to change notification settings - Fork 76
Description
We're attempting to use the project for the purpose of populating a template powerpoint, e.g put placeholders in a template powerpoint, and then use ShapeCrawler to replace those placeholders.
This works great, aslong as the source text does not contain 'new line' \n characters. If it contains new lines, what happens is that something within ShapeCrawler is doubling the newline characters.
I've created a sample project (attached) that replicates this issue.
In the sample program we have two identical slides:
The sample program uses a replace on this text as follows:
For slide 1, at a top level.
var Shape1 = _presentation.Slides.First(x => x.Number == 1).Shapes.First(); Shape1.Text = Shape1.Text.Replace("World", "Earth");
For slide 2, at a paragraph level
var Shape2 = _presentation.Slides.First(x => x.Number == 2).Shapes.First(); Shape2.TextBox.Paragraphs.First().Text = Shape2.TextBox.Paragraphs.First().Text.Replace("World", "Earth");
The resulting slides will look like this:
If you inspect the text after doing the replace, you will notice that ShapeCrawler is doubling the qty of newline characters between Hello and World.