Close





 

The sample demonstrates how to create Excel group in Silverlight via Spire.XLS.

Friday, 13 January 2012 02:29

Word Header in Silverlight

Written by support iceblue

The sample demonstrates how to add Word header in Silverlight via Spire.Doc.

 

We've seen lots of overlay images, overlay video effects and overlay architecture which is so great. Is there a way to "overlay" 2 PDF pages on the top of each other by using C#/VB.NET? The answer is absolutely Yes. Through Spire.PDF, we can easily make overlay PDF effect in C#/VB.NET. Spire.PDF enables users to make PDF transparency, to draw special shapes, bar codes, images in PDF and also make overlay PDF effortlessly.

Easy Steps to Create Overlay PDF Effect via Spire.PDF

Step 1

Download Spire.PDF (or Spire.Office) and install on system. Create project in visual studio, add Spire.PDF dll and system.drawing as references.

Step 2

Load 2 PDF documents to make PDF overlay effects. Choose PDF documents which used for creating overlay PDF document by using the code below:
[C#]
            //load two document
            PdfDocument doc1 = new PdfDocument();
            doc1.LoadFromFile("Sample1.pdf");

            PdfDocument doc2 = new PdfDocument();
            doc2.LoadFromFile("Sample3.pdf");
[Visual Basic]
            'load two document
            Dim doc1 As New PdfDocument()
            doc1.LoadFromFile("Sample1.pdf")

            Dim doc2 As New PdfDocument()
            doc2.LoadFromFile("Sample3.pdf")   
          

Step 3

Create Template Page and Set Transparency. Set transparency so that we can see the both PDF document content. The code below can help us create template and set transparency.
[C#]
            //Create page template
            PdfTemplate template = doc1.Pages[0].CreateTemplate();

            foreach (PdfPageBase page in doc2.Pages)
            {
                page.Canvas.SetTransparency(0.25f, 0.25f, PdfBlendMode.Overlay);
                page.Canvas.DrawTemplate(template, PointF.Empty);
            }
[Visual Basic]
            'Create page template
            Dim template As PdfTemplate = doc1.Pages(0).CreateTemplate()

            For Each page As PdfPageBase In doc2.Pages
                page.Canvas.SetTransparency(0.25F, 0.25F, PdfBlendMode.Overlay)
                page.Canvas.DrawTemplate(template, PointF.Empty)
            Next page
          

Step 4

Save and Preview. Save what we’ve done and preview the effect.
[C#]
            //Save pdf file.
            doc2.SaveToFile("Overlay.pdf");
            doc1.Close();
            doc2.Close();

            //Launching the Pdf file.
            System.Diagnostics.Process.Start("Overlay.pdf");
[Visual Basic]
            'Save pdf file.
            doc2.SaveToFile("Overlay.pdf")
            doc1.Close()
            doc2.Close()

            'Launching the Pdf file.
            Process.Start("Overlay.pdf")
          
Effective Screeshot



Spire.PDF is a PDF document creation component that enables your .NET applications to read, write and manipulate PDF documents without using Adobe Acrobat. Now, the new version added Silverlight platform which makes it more powerful.


<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>
Page 9 of 48