Hi,
If I good understand, for the text watermarks the auto sizing (fit the watermark to page) is achieved by setting the nFontSize parameter to 0. However I cannot find in the documentation how to achieve similar auto sizing for the image watermarks.
And another question:
How I can for image watermarks switch off "keeping of aspect ratio"?
Watermark AutoSize
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17908
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Watermark AutoSize
Hello Anovy,
Looking at the documentation - you need to specify the dwWidth, dwHeight for an image based watermark - and the image will be stretched to fit the specified area, and will keep it's aspect ratio. Sorry - it seems there is no way to make it "auto Size" by default and for all different page sizes, nor to turn off the "Keep aspect" - but I will double check that with my colleagues.
Best,
Stefan
Looking at the documentation - you need to specify the dwWidth, dwHeight for an image based watermark - and the image will be stretched to fit the specified area, and will keep it's aspect ratio. Sorry - it seems there is no way to make it "auto Size" by default and for all different page sizes, nor to turn off the "Keep aspect" - but I will double check that with my colleagues.
Best,
Stefan
Re: Watermark AutoSize
I'm asking because XChange printer allows this - see the Properties dialog, Edit image watermark - here are options 'Keep aspect ratio' and 'Fit to page' (i.e. auto size). All other options refer to some parameter in the AddImageWatermark method, however these two not.
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Watermark AutoSize
There are two flags
if WATER_AX_IMAGE_FIT is specified in dwFlags passed to AddImageWatermark, watermark will fit the page (the same effect can be reached passing 0 as width or height)
Flag WATER_AX_IMAGE_NO_KEEP_ASPECT turns off keeping aspect ratio for the image.
Code: Select all
#define WATER_AX_IMAGE_FIT 0x0100
#define WATER_AX_IMAGE_NO_KEEP_ASPECT 0x0200
Flag WATER_AX_IMAGE_NO_KEEP_ASPECT turns off keeping aspect ratio for the image.
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 AutoSize
Thanks Ivan, all these options work perfectly as described. Will you document them?
- Tracker Supp-Stefan
- Site Admin
- Posts: 17908
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Watermark AutoSize
Hi anovy,
I will speak with Ivan, and if there isn't any reason why these shouldn't be publicly announced - you can be sure we will add them in the documentation.
Best,
Stefan
I will speak with Ivan, and if there isn't any reason why these shouldn't be publicly announced - you can be sure we will add them in the documentation.
Best,
Stefan