In Many cases, users want to give an intuitionistic feeling of some content presented as a paragraph, which will be a great introduction then letters.Since Aspose.Pdf for .NET v3.0.0.0, we add a new Property InlineParagraph of Class Segment. By this property, you can set this segment to become the inline paragraph and it's content will be disable. There are four kinds of Class can be InlineParagraph : Image , Graph , FormField and Attachment .
Example:
[C#]
Pdf p = new Pdf();
Aspose.Pdf.Section sec1 = p.Sections.Add();
Text text1 = new Text();
sec1.Paragraphs.Add(text1);
text1.Segments.Add("This is a test for inline");
Segment seg2 = text1.Segments.Add();
//create a Image object to contain logo gif.
Aspose.Pdf.Image img1 = new Aspose.Pdf.Image();
img1.ImageInfo.File = @"C:\Aspose.Pdf.logo.gif";
//indicate seg2's InlineParagraph is a image.
seg2.InlineParagraph = img1;
//create the result PDF Document
p.Save("InlineImage.pdf");
[VB]
Dim p As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
Dim sec1 As Aspose.Pdf.Section = p.Sections.Add()
Dim text1 As Aspose.Pdf.Text = New Aspose.Pdf.Text
sec1.Paragraphs.Add(text1)
text1.Segments.Add("This is a test for inline")
Dim seg2 As Aspose.Pdf.Segment = text1.Segments.Add()
'create a Image object to contain logo gif.
Dim img1 As Aspose.Pdf.Image = New Aspose.Pdf.Image
img1.ImageInfo.File = "C:\Aspose.Pdf.logo.gif"
'indicate seg2's InlineParagraph is a image.
seg2.InlineParagraph = img1
'create the result PDF Document
p.Save("InlineImageVB.pdf")
[XML]
<Pdf xmlns="Aspose.Pdf">
<Section>
<Text>
<Segment FontSize="16">This is a inline image: </Segment>
<Segment>
<Image File="C:\Aspose.Pdf.logo.gif" />
</Segment>
</Text>
</Section>
</Pdf>