Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 498473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:52:58+00:00 2026-05-13T05:52:58+00:00

Has anyone used the Winnovative HTMLtoPDF converter to generate a PDF from HTML content?

  • 0

Has anyone used the Winnovative HTMLtoPDF converter to generate a PDF from HTML content? And if so, has anyone successfully put a watermark on any or all pages of that resulting PDF?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:52:58+00:00Added an answer on May 13, 2026 at 5:52 am

    This got interesting. From this page on Winnovative’s site I found a code snippet that was useful. Search for 6.4.2.2 and read the code in that section.

    Here is the code I used, based on the link I provided. This gets called AFTER I generate the pdf into a PDFDocument object.

    public void PostDocProcessing(Winnovative.WnvHtmlConvert.PdfDocument.Document document, string sBackgroundImagePath)
    {
        // get the first page the PDF document
        PdfPage firstPage = document.Pages[0];
    
        System.Drawing.Image logoImg = System.Drawing.Image.FromFile(sBackgroundImagePath);
    
        // calculate the watermark location
        System.Drawing.SizeF imageSizePx = logoImg.PhysicalDimension;
    
        // transform from pixels to points
        float imageWidthPoints = UnitsConverter.PixelsToPoints(imageSizePx.Width);
        float imageHeightPoints = UnitsConverter.PixelsToPoints(imageSizePx.Height);
        float watermarkXLocation = (firstPage.ClientRectangle.Width - imageWidthPoints);
        float watermarkYLocation = -50;
    
        // add a template watermark to the document repeated on each document page
        // the watermark size is equal to image size in points
        Template watermarkTemplate = document.AddTemplate(new System.Drawing.RectangleF(watermarkXLocation, watermarkYLocation, imageWidthPoints, imageHeightPoints));
    
        // add an image to the watermak
        ImageElement watermarkImageElement = new ImageElement(0, -300, logoImg);
        watermarkImageElement.Transparency = 100;
        watermarkTemplate.AddElement(watermarkImageElement);
    
        // dispose the image
        logoImg.Dispose();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Generation PDF from HTML (component for .NET) Has anyone used any open
Has anyone used jquery to take data from one form field and put it
Has anyone used javascript/ajax to take data from one form field and put it
Has anyone used Robotium or Calculon for testing Android apps? Are they useful? Any
Has anyone successfully used Tokyo Cabinet / Tokyo Tyrant with large datasets? I am
I'm just curious to know if anyone has used (successfully) Fusion Charts with Open
Has Anyone tried using PDF in iPad Application, using CGPDf functions. I have used
Has anyone used tried the custom select boxes from link text I'm trying to
Has anyone used the CLI libraries from OpenOffice that allow to use it from
Has anyone used Watir with IronRuby successfully? I am getting an error that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.