watermark in API
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
watermark in API
Are any examples available that demonstrate adding watermarks via the API, not the SDK?
.NET preferable but anything will do.
thanks
gjw
.NET preferable but anything will do.
thanks
gjw
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: watermark in API
You need to use method AddTextWatermark or/and AddImageWatermark of IPXCPrinter interface to add watermark. There are no ready examples for these functions, but we will make some and will send you.
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Re: watermark in API
Thank you; I have attempted to use this call with no success. Your proposed example/s will be most welcome.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: watermark in API
First you need to create watermark using AddTextWatermark (or AddImageWatermark). Then add watermark name (which you specified in sName) to the list of watermark names which will be added to the document. This can be done by using set_Option("Watermarks.Watermarks", sName). Finally, enable watermarks with set_Option("Watermarks.Enabled", true);
Sample project is attached to this message.
Sample project is attached to this message.
- Attachments
-
- PDFdriverAPIExample.zip
- C# sample
- (11.63 KiB) Downloaded 221 times
Re: watermark in API
Thank you...works perfectly
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: watermark in API
Excellent
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
Sorry i have to reanimate this Topic
Addin a TextWatermark works perfect but I've some trouble adding an ImageWatermark.
I'm using this code:
The TextWatermark is on the document but not the ImageWatermark.
The ImageWatermark should be over the complete page as a backgroung image.
I try to represent the typical business CI as a background of every document printed. The ImageWatermark must be on every page.
Thanks for help
btw 210;297 is the standard size of a german paper
Addin a TextWatermark works perfect but I've some trouble adding an ImageWatermark.
I'm using this code:
Code: Select all
With goPDFPrinter
.Option("Watermarks.Enabled") = "YES"
.AddImageWatermark "Test", "C:\Users\Public\Pictures\Sample Pictures\Qualle.jpg", -1, 210, 297, 17, 0, 0, 0, 50, 28, 0, ""
.AddTextWatermark "WM1", "AAAAAA", "Arial", 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 50, 28, 0, ""
.Option("Watermarks.Watermarks") = "Test;WM1"
.ApplyOptions 0
End With
The ImageWatermark should be over the complete page as a backgroung image.
I try to represent the typical business CI as a background of every document printed. The ImageWatermark must be on every page.
Thanks for help
btw 210;297 is the standard size of a german paper
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
I've just tried but without success.
The settings are identical to the TextWatermark which is working
Arne
The settings are identical to the TextWatermark which is working
Arne
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: watermark in API
Can you send me you image file? I cannot reproduce the problem with any of mine.
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
Hi Ivan,
this was the hit missing
After I made the zip archive the file name was Jellyfish.zip and not qualle.zip
It seems that Microsoft Windows 7 64bit designates the images internally differently. Operating System is a german Windows 7 business x64.
I changed the name to Jellyfish.jpg and it works. A little weird just that it be named when entering the printer settings as a qualle.jpg have.
M$
this was the hit missing
After I made the zip archive the file name was Jellyfish.zip and not qualle.zip
It seems that Microsoft Windows 7 64bit designates the images internally differently. Operating System is a german Windows 7 business x64.
I changed the name to Jellyfish.jpg and it works. A little weird just that it be named when entering the printer settings as a qualle.jpg have.
M$
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
It's me again
Is there an option to deactivate the "fit and retain the aspect ratio"
dwWidth, dwHeight
Specifies the dimensions of the watermark. The image specified by the sImageFileName parameter will be resized to 'fit' within the specified area and will retain its aspect ratio.
I want the picture in the complete area no matter if it fits or something
Is there an option to deactivate the "fit and retain the aspect ratio"
dwWidth, dwHeight
Specifies the dimensions of the watermark. The image specified by the sImageFileName parameter will be resized to 'fit' within the specified area and will retain its aspect ratio.
I want the picture in the complete area no matter if it fits or something
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: watermark in API
I have added two flags to dwFlags parameter of AddImageWatermark function to control Fit and KeepAspect options.
Values for these flags are:
These changes will be available from build 192 of the driver.
Values for these flags are:
Code: Select all
#define WATER_AX_IMAGE_FIT 0x0100
#define WATER_AX_IMAGE_NO_KEEP_ASPECT 0x0200
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
thanks a lot.
I feel like a little kid before christmas
I feel like a little kid before christmas
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: watermark in API
Kudos for Ivan,
And we are never too old to feel like a small kid before Christmas
(or prepare for it from January )
Cheers,
Stefan
And we are never too old to feel like a small kid before Christmas
(or prepare for it from January )
Cheers,
Stefan
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
i can hardly stand up the new version comes.
I hope it's before christmas 2011
I hope it's before christmas 2011
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: watermark in API
Hi Arne,
Ivan said the next Build - so it will be a few weeks, and definitely before Christmas!
I do not have a more specific date for now, but usually a build date is announced just a few days before the actual release.
Best,
Stefan
Ivan said the next Build - so it will be a few weeks, and definitely before Christmas!
I do not have a more specific date for now, but usually a build date is announced just a few days before the actual release.
Best,
Stefan
-
- User
- Posts: 7
- Joined: Wed Jan 12, 2011 8:29 am
- Location: Germany
Re: watermark in API
hi stefan,
i'm trying to practice in patience
but it's so damn hard
greez arne
i'm trying to practice in patience
but it's so damn hard
greez arne
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: