Encryption of PDF file in Linux

Project:PDF Include project
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I created an encrypted PDF in windows using
RUN pdf_set_parameter(,”Encrypt”,”TRUE”).
However now I would like to do the same in Linux.
But I will not be able to use procryptlib.dll and md5.exe so what is the alternate.
I tried to do as said in the document
If you are on a *NIX OS then you will need to compile the rc4.c object into a Shared Library
I tried
gcc -o rc4 rc4.c
But it is throwing an error.
rc4.h:33: error: syntax error before "endecrypt"
rc4.h:33: warning: data definition has no type or storage class
rc4.c:133: error: conflicting types for 'endecrypt'
rc4.h:33: error: previous declaration of 'endecrypt' was here
rc4.c:133: error: conflicting types for 'endecrypt'
rc4.h:33: error: previous declaration of 'endecrypt' was here

The code that is working in Windows is:

DEFINE VARIABLE v-crdb-reason AS CHARACTER NO-UNDO.
DEFINE VARIABLE pdf_vday AS CHARACTER NO-UNDO.
DEFINE VARIABLE pvar_colm AS INTEGER initial 1 NO-UNDO.
{pdf/pdf_inc.i}.
v-crdb-reason ="pradeep".
pdf_vday = "naik".
run pdf_new ("rwm","test_1.pdf").
run pdf_set_parameter ("rwm","MasterPassword", "naik123").
run pdf_set_parameter ("rwm","AllowModify", "FALSE").
run pdf_set_parameter ("rwm","AllowCopy", "FALSE").
run pdf_set_parameter ("rwm","AllowAnnots", "FALSE").
run pdf_set_parameter ("rwm","AllowForms", "FALSE").
run pdf_set_parameter ("rwm","AllowExtract", "FALSE").
run pdf_set_parameter ("rwm","AllowAssembly", "TRUE").
run pdf_set_parameter ("rwm","Encrypt", "TRUE").

run pdf_new_page2("rwm","landscape").
run pdf_set_font("rwm","Courier",11.0).

run pdf_text ("rwm", " - " + string(pdf_Page("rwm"))).
run pdf_skip ("rwm").
run pdf_text_at ("rwm", fill("=",104), -10 ).
run pdf_skip ("rwm").
run pdf_text_at ("rwm", string(v-crdb-reason,"x(10)") + pdf_vday , (1 * pvar_colm)).
run pdf_skip ("rwm").
run pdf_text ("rwm", string("------------------------------------")).
run pdf_skip ("rwm").
run pdf_text_at ("rwm", "", 20).
run pdf_close("rwm").

I would like to do the same in Linux

Thank you