Hi all,
is there as possibility to add an existing pdf as Background to a generated pdf with sections and paragraphs?
Thanks, Tobi
Hi all,
is there as possibility to add an existing pdf as Background to a generated pdf with sections and paragraphs?
Thanks, Tobi
Hi Tobi,
OK sorry I didn't get it.
I generate my pdf with aspose.pdf.generator like this:
Dim pdf1 As Aspose.Pdf.Generator.Pdf = New Aspose.Pdf.Generator.Pdf
Dim Sec1 As Section = pdf1.Sections.Add()
then I work with Sec1.TextInfo, and tables...
How can I add a Stamp with AddStamp to that Kind of generated pdf?
An other way could probably be to open an existing pdf file and place a FloatingBox with all the paragraphs, text and tables on it.
Thanks and regards,
Tobi
Hi,
can you please look on my problem again?
Regards, Tobi
Hi Tobi,
//open document<o:p></o:p>
Document pdfDocument = new Document();
//get particular page
Page pdfPage = pdfDocument.Pages.Add();
//create text fragment
TextFragment textFragment = new TextFragment("main text");
textFragment.Position = new Position(100, 600);
//set text properties
textFragment.TextState.FontSize = 12;
// create TextBuilder object
TextBuilder textBuilder = new TextBuilder(pdfPage);
// append the text fragment to the PDF page
textBuilder.AppendText(textFragment);
//load existing PDF file which will be used as stamp object
Document Stamp_pdfDocument = new Document("c:/pdftest/A0000238.pdf");
//create page stamp
PdfPageStamp pageStamp = new PdfPageStamp(Stamp_pdfDocument.Pages[1]);
pageStamp.Background = true;
pageStamp.XIndent = 100;
pageStamp.YIndent = 100;
//add stamp to particular page
pdfDocument.Pages[1].AddStamp(pageStamp);
//save document
pdfDocument.Save(“c:/pdftest/PDFwithStampObject.pdf”);
Hi Nayyer,
Hi Sebastian,