Announcement

Collapse
No announcement yet.

Link Annotation Problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Link Annotation Problem

    Hello Every Body,

    I am new in Foxit Sdk. I want to create Link annotation which will be link certain rectangle of another document. I have write the code but its output is not showing properly.
    but when i creating link within a page it's working fine. In that case i used action type "FSPDF_ACTION_GOTO". but for other document i am using action type "FSPDF_ACTION_REMOTEGOTO". My code is as follow, Please help me.


    //*************code********************//

    FSPDF_ACTIONDATA data;
    FSPDF_DESTDATA desdata;
    FSPDF_ACTIONDATA_REMOTEGOTO actiondataremotegoto;
    desdata.pageIndex = 9;
    desdata.zoomMode = FSPDF_ZOOM_FITRECT;
    desdata.params[0] = 100;
    desdata.params[1] = 100;
    desdata.params[2] = 200;
    desdata.params[3] = 200;
    actiondataremotegoto.destData = desdata;
    FSCRT_BStr_Init(&actiondataremotegoto.destName);
    //char* arr = new char[100];
    // sprintf(arr, "[%d /XYZ %ld %ld %lf]\0", desdata.pageIndex, desdata.params[0], desdata.params[1], desdata.params[2]);

    FSCRT_BStr_Set(&actiondataremotegoto.destName, "C:\\Users\\supriyad\\Desktop\\Test_Attach\\test12 3.pdf",(FS_DWORD)strlen("C:\\Users\\supriyad\\Desk top\\Test_Attach\\test123.pdf"));

    FSCRT_BStr_Init(&actiondataremotegoto.fileName);
    FSCRT_BStr_Set(&actiondataremotegoto.fileName, "C:\\Users\\supriyad\\Desktop\\Test_Attach\\test12 3.pdf",(FS_DWORD)strlen("C:\\Users\\supriyad\\Desk top\\Test_Attach\\test123.pdf"));


    data.actionType = FSPDF_ACTION_REMOTEGOTO;
    data.actionData = (FS_LPVOID)&actiondataremotegoto;

    try
    {
    FS_RESULT ret = FSPDF_Annot_InsertAction(annot, FSPDF_TRIGGER_ANNOT_MU, 0, &data);
    if(FSCRT_ERRCODE_SUCCESS != ret)
    {
    FSDK_OutputLog("Failed");
    }
    }
    catch(exception ex )
    {
    FSDK_OutputLog("Failed to creater annotation");
    }

    FSCRT_BStr_Clear(&actiondataremotegoto.fileName);
    FSCRT_BStr_Clear(&actiondataremotegoto.destName);


  • #2
    Issue was fixed in SDK 4.5. Fix is currently available in SDK 5.1.

    Comment

    Working...
    X