Page 1 of 1
Watermark AutoSize
Posted: Tue Dec 13, 2011 11:25 am
by anovy
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"?
Re: Watermark AutoSize
Posted: Tue Dec 13, 2011 1:57 pm
by Tracker Supp-Stefan
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
Re: Watermark AutoSize
Posted: Tue Dec 13, 2011 2:50 pm
by anovy
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.
Re: Watermark AutoSize
Posted: Wed Dec 14, 2011 2:48 pm
by Ivan - Tracker Software
There are two flags
Code: Select all
#define WATER_AX_IMAGE_FIT 0x0100
#define WATER_AX_IMAGE_NO_KEEP_ASPECT 0x0200
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.
Re: Watermark AutoSize
Posted: Thu Dec 15, 2011 12:32 pm
by anovy
Thanks Ivan, all these options work perfectly as described. Will you document them?
Re: Watermark AutoSize
Posted: Thu Dec 15, 2011 1:11 pm
by Tracker Supp-Stefan
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