This is my xml-file snippet converted to pdf:
<object type="text" rect="180,990,680,48" style="s4" name="text">
<span style="s3">Wer seinen Urlaub in der Ferne </span>
</object>
<object type="text" rect="180,1040,680,48" style="s4" name="text">
<span style="s3">verbringen will, sollte vor der </span>
</object>
<object type="text" rect="180,1090,680,48" style="s4" name="text">
<span style="s3">Reise seinen Versicherungs-</span>
</object>
<object type="text" rect="180,1140,680,48" style="s4" name="text">
<span style="s3">schutz überprüfen. Gerade eine </span>
</object>
-------------------------------------------------------------------------------------------
This is my samplesnippet (simplified!):
Aspose.Words.Drawing.Shape textBox = new Aspose.Words.Drawing.Shape(doc, Aspose.Words.Drawing.ShapeType.TextBox);
textBox.Width = Aspose.Words.ConvertUtil.PixelToPoint(600, 300);
textBox.Height = 150;
textBox.Top = 50;
textBox.Left = 50;
textBox.DistanceLeft = 0;
textBox.DistanceTop = 0;
textBox.DistanceRight = 0;
textBox.DistanceBottom = 0;
textBox.TextBox.InternalMarginLeft = 0;
textBox.TextBox.InternalMarginLeft = 0;
textBox.TextBox.InternalMarginRight = 0;
textBox.TextBox.InternalMarginTop = 0;
Run run = new Run(doc);
Paragraph par = new Paragraph(doc);
par.AppendChild(run);
par.ParagraphFormat.LineSpacing = Aspose.Words.ConvertUtil.PixelToPoint(48, 120);
par.ParagraphFormat.LeftIndent = 0;
par.ParagraphFormat.RightIndent = 0;
par.ParagraphFormat.Alignment = ParagraphAlignment.Justify;
textBox.AppendChild(par);
doc.FirstSection.Body.FirstParagraph.AppendChild(textBox);
builder.MoveTo(par);
//textBox.FirstParagraph.FirstChild);
builder.Font.Scaling = 100;
builder.Font.Name =
"verdana";
builder.Font.Size = 9.75f;
builder.ParagraphFormat.LineSpacing = Aspose.Words.
ConvertUtil.PixelToPoint(70, 300);
builder.Write(
"Wer seinen Urlaub in der Ferne ");//<-- i try to use Writeln() but then justify neither work!!!
builder.Write(
"verbringen will, sollte vor der ");
builder.Write("Reise seinen Versicherungs-");
doc.Save("document.doc", SaveFormat.Doc);
---------------------------------------------------------------------------------------
in the attachement you can compare my pdf with the word-doc. As you can see the wordwrapping in the doc is different to my PDF textlines. How can get an exact text-layout?