text watermark question?

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
tarek_fcis
User
Posts: 3
Joined: Sun May 07, 2006 12:49 pm

text watermark question?

Post by tarek_fcis » Sun May 14, 2006 1:36 pm

i have one questions about watermarks?
in your sample in your sdk
you determined only text,font size,rotation,transparency and color
but the most important thing which is position (x,y) cooridnates of the
watermark was not clear enough and took default values please
give us a c# sample of text watermarks while determining position of the
text watermark coordinates.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon May 15, 2006 10:27 am

Hi,

Please download the latest xcpro35 help file :

http://www.tracker-software.com/XCPro35Help.zip

and depending on whether you are creating a new PDF page (if so please see the help file PDF2Text30Help.chm) or if modifying an existing page (see the Xcpro35.chm help) and see the function :

PXC_Watermark, especially the fields:

double m_XOffset;
double m_YOffset;
DOUBLE m_Align;

This should help you achieve all you need.
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

luctussier
User
Posts: 8
Joined: Fri Apr 21, 2006 8:20 am

questions: Ranges & size

Post by luctussier » Mon May 15, 2006 10:30 am

was not clear enough and took default values please give us a c# sample of text watermarks while determining position
Yes, sample source could help me too. I have a comment that might be your answer. When m_Width and m_Height is '0' then the watermark is expected to take up the entire page.

I would also like to add my questions to this thread as they are watermark related.

What sort of data is m_Ranges expecting? Something like :
DWORD RangeOfPages[2][m_NumRanges] ?

What would be nice is a way to know a watermark's size (based on source bmp or text length) before adding it.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon May 15, 2006 11:26 am

Hi,

Can I also suggest you download the latest revised help file as the information available on watermarks is extended to explain all :

for example, the actual size of your source image is academic - you can specify the size you require when adding - please see below, extracted from the latest available help :

m_Width
Specifies the width of the image when placed on the page. This value is specified in points. If this member is 0, then the image will be resized to 'fit' to the page.

m_Height
Specifies height of the image when placed on the page. This value is specified in points. If this member is 0, then the image will be resized to 'fit' to the page.

m_Range
Pointer to an array of paired DWORD's values. The first element of a such pair, specifies the starting page number; The second specifies an ending page number where the watermark may be placed.
This field must be NULL when m_PlaceType is not equal to PlaceType_Range.

HTH
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

luctussier
User
Posts: 8
Joined: Fri Apr 21, 2006 8:20 am

m_Ranges array

Post by luctussier » Mon May 15, 2006 1:35 pm

m_Range
Pointer to an array of paired DWORD's values. The first element of a such pair, specifies the starting page number; The second specifies an ending page number where the watermark may be placed.
This field must be NULL when m_PlaceType is not equal to PlaceType_Range.
I had read as much from the latest help file, but what I wanted to know was what sort of array. Paired implied that it was two-dimensional ([2][NumRanges]). Having tried it both ways, I've discovered that is a one-dimensional or simple array ([NumRanges*2]).

Also, it may be helpful to mention in future versions of the help file that the page number is base zero.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon May 15, 2006 1:54 pm

Thank you for your suggestions - noted.

With regards the Page Numbering of PDF- files - it is stated in the help files in several places that Adobe specifies in their documentation that Page numbering is ZERO based and we do follow their convention for the sake of conformity.

Thanks.
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

Post Reply