How to use VeryStampAddText function to add multiple lines text stamp and keep multiple text lines to right?

Hi! How do I implement or use the multi line stamp? Can I please ask for sample code?

Customer
-----------------------------------------------

How to use VeryStampAddText function to add multiple lines text stamp and keep multiple text lines to right?
Thanks for your message, you can use "\n" for multiple line text stamp, for example, the following is a C++ source code to stamp multiple line text stamps to PDF pages and align them to keep center,

void TestForTextAlign()
{
    int id=VeryStampOpen("example.pdf","example-text-align.pdf");
    if(id>0)
    {
        char *sPropertyInfo = "Test Name\n123 Test Address\nHip Road\nTest Locality\nTest Town\nTest County\nGU52 2SD";
        VeryStampSetFunction(id, 131, 1, 1, "", "");
        VeryStampAddText(id, 1, sPropertyInfo, 0, 17, 192, 240, 0, 0, 0, 101, "", 16, 0, "", 0);
        VeryStampClose(id);
    }
}

VeryPDF
-----------------------------------------------
Hi! How do I right align money amounts into a column using verystampaddtext?

Customer
-----------------------------------------------

How to use VeryStampAddText function to add multiple lines text stamp and keep multiple text lines to right?
Please refer to the parameters for VeryStampAddText at below,

long VeryStampAddText( long id, long position,
char *string, long color, long alignment,
long shift_lr, long shift_tb, long rotate, long layer,
long hollow, long fontcode, char *fontname, long fontsize,
lont action, char *link, long pageno);

Please notice "Alignment" parameter, you can set "Alignment" to 18 to align text to right,

Alignment
Alignment are used to align text on document pages, it only available for multi-line text stamps,
16: left alignment
17: center alignment
18: right alignment

for example,

void TestForTextAlign()
{
    int id=VeryStampOpen("example.pdf","example-text-align.pdf");
    if(id>0)
    {
        char *sPropertyInfo = "Test Name\n123 Test Address\nHip Road\nTest Locality\nTest Town\nTest County\nGU52 2SD";
        VeryStampSetFunction(id, 131, 1, 1, "", "");
        VeryStampAddText(id, 1, sPropertyInfo, 0, 18, 192, 240, 0, 0, 0, 101, "", 16, 0, "", 0);
        VeryStampClose(id);
    }
}

VeryPDF

Related Posts