How to use PDFStamp SDK to add rectangles and lines with opacity option to PDF pages?

Hello,

I’m trying to get your PDFStamp SDK to work in our development environment, but the DLL is having trouble registering/adding etc.

When I try and run the 64bit install script, after copying 3 files to "system32" folder, I get the following window… If I run "As Administrator" the command prompt flashes quickly then exits. I can’t see what it’s doing.

image

If I then "Add As Reference" in VS, I get the following message,

image

Please confirm my configuration is supported.

Windows 8 64-bit
Visual Studio 2013 Express Desktop and Web
Asp.net 4.5

If I register dll on IIS, I receive "Successful". However, I need to develop locally in VS before I copy to server.

Please give us help, thanks.
Customer
-------------------------------------------------------
Okay, it looks like I've already asked the same question last year. Apparently I never got it working correctly which is why I'm once again working with your software. I have successfully installed the SDK on my local development PC. However, I still have issues running it on Windows Server 2008 R2. I just may need to try harder....

However, the issue I now have on my local PC, is getting the SDK to do the same thing as the Command Line version. I've already read through your online SDK manuals but it doesn't state anywhere how to draw rectangles, which are the whole reason for me wanting to purchase PDFSTAMP. Your web page states it supports all the same features as CMD, but I don't know how.

I need also the following...

Opacity and custom lines with Point1 and Point2 coordinates.

Please help, thanks.
Customer
-------------------------------------------------------
Okay, problem was resolved on server by clicking "Enable 32bit application" in IIS for the pool group.

Now, the only real problem that remains is getting support on the SDK for Rectangles, Opacity and custom arbitrary lines... all available on CMD version.

Please reply soon, thanks.
Customer
-------------------------------------------------------
You can use following source code to add rectangles and lines with opacity to PDF pages,

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(szStampBuf,"2200444\n20555\n2200666\n2777");

                                VeryStampAddText(id, 1, szStampBuf, 255,18,0,0,0,0,0,200,0,10,1,NULL,0);

                }

                VeryStampSetFunction(id, Very_Set_Range, 2, 2, 0,0);

                VeryStampSetFunction(id, Very_Set_Opacity, 30, 0, 0, 0);

                VeryStampAddImage(       id, 7, "logo.jpg",30,-30,0,0,0,0,0,0,0);

                VeryStampAddImage(       id, 3, "logo.jpg",-30,30,0,0,0,0,0,0,0);

 

                //Set page range, stamp on all pages

                VeryStampSetFunction(id, Very_Set_Range, 0, 0, 0,0);

 

                //Convert white color to transparent background

                VeryStampSetFunction(id, Very_Set_TransparentColor, 1, RGB(255,255,255), 0, 0);

                VeryStampAddImage(       id, 1, "logo.jpg",0,0,0,0,0,0,0,0,0);

 

                VeryStampAddRect(id, 100, 100, 150,150, 2, RGB(255,0,0),0,RGB(255,0,0));

                VeryStampAddRect(id, 100, 300, 150,350, 2, RGB(255,0,0),1,RGB(255,0,0));

                VeryStampAddRect(id, 100, 400, 150,450, 4, RGB(255,255,0),0,RGB(255,0,0));

                VeryStampAddRect(id, 100, 500, 150,550, 4, RGB(255,255,0),1,RGB(255,0,255));

 

                VeryStampAddCircle(id, 100, 300, 50, 20, RGB(255,0,0), 0, 0);

                VeryStampAddEllipse(id, 20, 20, 200, 80, 10, RGB(0,0,255), 0, 0);

                {

                                int pageheight = 800;

                                VeryStampAddCurveTo(id, 0, pageheight, 86, pageheight-108, 201,
                                                pageheight-
158
216, pageheight-86, 5,RGB(0,0,255));

                }

                                               

                VeryStampSetFunction(id, Very_Set_Opacity, 70, 0, 0, 0);

                VeryStampAddLine(          id, 2, 1, RGB(255,0,0),

                                                                0,80,0,0,

                                                                80,0);

                VeryStampAddLine(          id, 6, 1, RGB(0,255,0),

                                                                0,-80,0,0,

                                                                80,0);

                VeryStampSetFunction(id, Very_Set_Opacity, 25, 0, 0, 0);

                VeryStampAddRectWithLayer(id, 200, 100, 250,150, 2, RGB(255,0,0),0,RGB(255,0,0),1);

                VeryStampAddRectWithLayer(id, 200, 300, 250,350, 2, RGB(255,0,0),1,RGB(255,0,0),1);

                VeryStampAddRectWithLayer(id, 200, 400, 250,450, 4, RGB(255,255,0),0,RGB(255,0,0),1);

                VeryStampAddRectWithLayer(id, 200, 500, 250,550, 4, RGB(255,255,0),1,
                                                                               RGB(
255,0,255),1);

 

                VeryStampClose(id);

}

 

 

学校  Relevant Hyperlinks:

https://www.verypdf.com/app/pdf-stamp/index.html

https://www.verypdf.com/app/pdf-stamp/try-and-buy.html

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!