We want only in 3 rd page only with the signature.and after the end of the content

Get technical support of Document .Net in C# and VB.Net
FromCustomer
Posts: 3
Joined: Mon May 24, 2021 1:44 pm
Contact:

We want only in 3 rd page only with the signature.and after the end of the content

Post by FromCustomer »

Hi. We have a Word-document and need to insert an image after a last paragraph in the document. Next to save it in PDF file.
Please code?
Oliver
Posts: 22
Joined: Wed Aug 19, 2020 11:59 am
Contact:

Re: We want only in 3 rd page only with the signature.and after the end of the content

Post by Oliver »

Hello
I've prepared a code sample for you.

Code: Select all

using System;
using SautinSoft.Document;
using SautinSoft.Document.Drawing;

namespace InsertImage
{
    class Program
    {
        static void Main(string[] args)
        {
            string inpFile = @"..\..\InsertImage\Report.docx";
            string outFile = @"..\..\InsertImage\Report.pdf";
            string pictPath = @"..\..\InsertImage\dummy_signature.png";
            DocumentCore dc = DocumentCore.Load(inpFile);

            // Create new footer with formatted text.
            Picture pict1 = new Picture(dc, InlineLayout.Inline(new Size(200, 50)), pictPath);

            dc.Sections.Content.End.Insert(pict1.Content);
            dc.Save(outFile);

            // Open the PDF documents for demonstration purposes.
            System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(inpFile) { UseShellExecute = true });
            System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outFile) { UseShellExecute = true });
        }
    }
    }
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests