Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > Sample Code
  New Posts New Posts RSS Feed - How to print a transparent png file on top of text
  FAQ FAQ  Forum Search   Register Register  Login Login

How to print a transparent png file on top of text

 Post Reply Post Reply
Author
Message Reverse Sort Order
frederik View Drop Down
Beginner
Beginner
Avatar

Joined: 18 Mar 20
Location: Netherlands
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote frederik Quote  Post ReplyReply Direct Link To This Post Topic: How to print a transparent png file on top of text
    Posted: 26 Mar 20 at 5:09PM
Hi Ingo. thank you very much, the transparent bmp files did the trick when using the setimagemask

I added this line just before the .fitimage call: 

Call .SetImageMask(0.9, 0.9, 0.9, 1, 1, 1)
Call .FitImage(x,y,width,height, 1, 1, 0)
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 18 Mar 20 at 5:15PM
Hi Frederik,

png isn't easy stuff.
Try this link from the online ressources:
http://www.quickpdf.org/forum/displaying-transparent-bmp-files_topic2276.html
Yes. I know... bmp... but try it.

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
frederik View Drop Down
Beginner
Beginner
Avatar

Joined: 18 Mar 20
Location: Netherlands
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote frederik Quote  Post ReplyReply Direct Link To This Post Posted: 18 Mar 20 at 2:57PM
I am working with quick pdf 17. Working/printing images works fine. But not I want to print a signature.png file (which is transparent) on top of text that is generated and printed on the pdf page. 
The result should look like a company/stamp signature on top of the text. 

I tried 
.SetPNGTransparencyColor(255 / 256, 255 / 256, 255 / 256)'
and
.SetImageMask(1, 1, 1, 0.1, 0.1, 0.1)
but is does not change... the image is printed with a fixed white background and destroying the text. 

I use the following simple code: 

   Call .AddImageFromFile(FileNameOfImageFile, 0)
   Call .SetPNGTransparencyColor(255 / 256, 255 / 256, 255 / 256)
   Call .FitImage(topX, topY, SizeWidth, SizeHeight, 1, 1, 0)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store