PDF Background image


#1

We are evaluating aspose.pdf to use in our product.
Do you have any sample about it?

Thanks


#2

Dear leccardi,

Thanks for your consideration.

Please view the document of the product for examples. Here is an example for setting background image:

[c#]
Pdf pdf = new Pdf();

Section section = new Section(pdf);
pdf.Sections.Add(section);
section.BackgroundImageFile = “Y:/c#/Pdf/images/flower.jpg”;
section.BackgroundImageType = ImageFileType.Jpeg;

Text text1 = new Text(section);
section.Paragraphs.Add(text1);

Segment segment1 = new Segment(text1);
text1.Segments.Add(segment1);
segment1.Content = “Hello world!”;

pdf.Save(…);

[VisualBasic]
Dim pdf As Pdf = New Pdf()

Dim section As Section = New Section(pdf)
pdf.Sections.Add(section)
section.BackgroundImageFile = “Y:/c#/Pdf/images/flower.jpg”
section.BackgroundImageType = ImageFileType.Jpeg

Dim text1 As Text = New Text(section)
section.Paragraphs.Add(text1)

Dim segment1 As Segment = New Segment(text1)
text1.Segments.Add(segment1)
segment1.Content = “Hello world!”

pdf.Save(…)

[XML]
<?xml version="1.0" encoding="utf-8" ?>



Hello world!