Hello,
According to the description of the PDF Stamper, the COM version should support opacity settings.
How can I set the opacity in the veryAddTextEx function?
Regards,
Customer
--------------------------------------------
You can use VeryStampSetFunction() function to set the Opacity option, please refer to following sample code,
//define for VerySetFunction
#define Very_Set_Range 131
#define Very_Get_PdfPageCount 206
#define Very_Get_PageBoxForStamp 260
#define Very_Set_Text_Leading 134
#define Very_Set_Opacity 240
#define Very_Set_EmbedFont 241
#define Very_Get_EmbedFont 241
#define Very_Set_TransparentColor 242
id=VeryStampOpen(szPDFFile,"_001.pdf");
if(id>0)
{
int page = 1;
int pagecount = VeryStampGetFunction(id, Very_Get_PdfPageCount, 0, 0, 0, 0);
VeryStampSetFunction(id, Very_Set_Opacity, 50, 0, 0, 0);
for(page = 1; page <= pagecount; page++)
{
char szStampBuf[1024];
int left = VeryStampGetFunction(id, Very_Get_PageBoxForStamp, page, 0, "left", 0);
int top = VeryStampGetFunction(id, Very_Get_PageBoxForStamp, page, 0, "top", 0);
int pagewidth = VeryStampGetFunction(id, Very_Get_PageBoxForStamp,
page, 0, "width", 0);
int pageheight = VeryStampGetFunction(id, Very_Get_PageBoxForStamp,
page, 0, "height", 0);
VeryStampSetFunction(id, Very_Set_Range, page, 1, 0, 0);
sprintf(szStampBuf,"Page:<%d>, Page Box: [%d %d %d %d]",
pagecount-page+1,left,top,pagewidth,pageheight);
VeryStampAddText(id, 2, szStampBuf,255,0,0,0,0,0,0,
300,0,10,1,"https://www.verypdf.com",0);
VeryStampSetFunction(id,Very_Set_Text_Leading,20,0,0,0);
strcpy(m_szStampBuf,"2200444\n20555\n2200666\n2777");
VeryStampAddText(id, 1, szStampBuf, 255,18,0,0,0,0,0,200,0,10,1,NULL,0);
}
VeryStampClose(id);
}
For example,
See Also:
https://www.verypdf.com/wordpress/201107/opacity-option-in-pdf-stamp-comsdk-1517.html
https://www.verypdf.com/wordpress/201106/stamp-your-pdf-file-with-opacity-option-661.html