|
AddWatermarkImage2 |
Top Previous Next |
|
The AddWatermarkImage2 method adds a new image watermark, having the characteristics specified by the method parameters. HRESULT AddWatermarkImage2( [in, string] BSTR p_wsName, [in, string] BSTR p_wsFile, [in] BOOL p_bVisible, [in] BOOL p_bFit, [in] LONG p_nMarginLeft, [in] LONG p_nMarginRight, [in] LONG p_nMarginTop, [in] LONG p_nMarginBottom, [in] BOOL p_bCenterHorizontally, [in] BOOL p_bCenterVertically, [in] BOOL p_bAlignRightMargin, [in] BOOL p_bAlignBottomMargin, [in] LONG p_nOriginLeft, [in] LONG p_nOriginTop, [in] LONG p_nWidth, [in] LONG p_nHeight, [in] BOOL p_bAspectRatio, [in] BOOL p_bUseTranspColor, [in] COLORREF p_nTransparentColor, [in] SHORT p_nColorVar, [in] SHORT p_nRotation, [in] WORD p_nOpacity, [in] WORD p_nPrintOn, [in] BOOL p_bPrintAsBackground, [in, string] BSTR p_wsPrintRange, [in] WORD p_nPrintPriority, [out] SHORT* p_nWatermark, [in, string] BSTR p_wsProfileName, [in] BOOL p_bPublicProfile );
Parameters: p_wsName, [in, string] - watermark name p_wsFile [in, string] - image file p_bVisible [in] - flag if watermark is enabled p_bFit [in] - flag, image fit to margins p_nMarginLeft [in] - left margin p_nMarginRight [in] - right margin p_nMarginTop [in] - top margin p_nMarginBottom [in] - bottom margin p_bCenterHorizontally [in] - flag, image centered horizontally p_bCenterVertically [in] - flag, image centered vertically p_bAlignRightMargin [in] - flag, align image to right margin p_bAlignBottomMargin [in] - flag, align image to bottom margin p_nOriginLeft [in] - left origin position p_nOriginTop [in] - top origin position p_nWidth [in] - image width p_nHeight [in] - image height p_bAspectRatio [in] - flag, keep image aspect ratio p_bUseTranspColor [in] - flag, use transparent color p_nTransparentColor [in] - transparent color p_nColorVar [in] - color variation p_nRotation [in] - image rotation angle p_nOpacity [in] - image opacity p_nPrintOn [in] - one of next values: 0 - All pages 1 - First page 2 - Even pages 3 - Odd pages 4 - Page range p_bPrintAsBackground [in] - flag, print image as background p_wsPrintRange [in] - page range, like "2 - 5" p_nPrintPriority [in] - print priority of the image watermark p_nWatermark [out] - receives the new image watermark index p_wsProfileName [in, string] - pointer to a BSTR containing the profile to modify. If this parameter is an empty string, the current active profile is used p_bPublicProfile [in] - flag, profile is a public profile
Return values: S_OK on success or COM error code NV_NOT_INITIALIZED - Initialize was not called NV_INVALID_WATERMARK_IMG - wrong image watermark index NV_PUBLIC_PROFILE - you cannot change public profiles only on server |