Print Page | Close Window

Insert Image To PDF Code

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2069
Printed Date: 04 Apr 26 at 5:34PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Insert Image To PDF Code
Posted By: Mahdi_S_T
Subject: Insert Image To PDF Code
Date Posted: 12 Dec 11 at 6:35PM
I need , Insert  Image To PDF :
1- Transparent Image
2- Left and Top Position



Replies:
Posted By: Ingo
Date Posted: 12 Dec 11 at 7:25PM
Hi!

I think you wanna know if you can do this with QuickPDF ...?
Yes! This is possible with QuickPDF ;-)
This should be your official page for the first questions:
http://www.quickpdflibrary.com/support/index.php

Cheers and welcome here,
Ingo



Posted By: AndrewC
Date Posted: 13 Dec 11 at 6:24AM
The FAQ is a good resource for questions like this -  http://www.quickpdflibrary.com/faq/ - http://www.quickpdflibrary.com/faq/   - I searched to Transparency using the search function in the browser and came up with this.

http://www.quickpdflibrary.com/faq/how-do-i-add-an-image-and-make-it-transparent.php - http://www.quickpdflibrary.com/faq/how-do-i-add-an-image-and-make-it-transparent.php

If you want to add a watermark and have the watermark at 50% transparency then you can use the following code.

            QP.SetOrigin(1);
            QP.AddImageFromFile("aldi.bmp", 0);
            QP.SetTextSize(48);
            QP.DrawText(100, 300, "Transparency 0% under");

            QP.SetTransparency(60);   // 60 % transparent.
            QP.DrawImage(0, 0, QP.PageWidth(), QP.PageHeight());

            QP.DrawText(100, 400 , "Transparency 60% over");

            QP.SetTransparency(0);  // Fully opaque.  ie.  No Transparency

            QP.DrawText(100, 500 , "Transparenct 0% over");

            QP.SaveToFile("out.pdf");
            System.Diagnostics.Process.Start(@"out.pdf");




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk