Watermark AutoSize

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Watermark AutoSize

Post 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"?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17908
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Watermark AutoSize

Post 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
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: Watermark AutoSize

Post 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.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Watermark AutoSize

Post 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.
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.
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: Watermark AutoSize

Post by anovy »

Thanks Ivan, all these options work perfectly as described. Will you document them?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17908
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Watermark AutoSize

Post 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
Post Reply