{"id":62,"date":"2026-07-20T12:09:40","date_gmt":"2026-07-20T12:09:40","guid":{"rendered":"http:\/\/200.141.0.24\/?page_id=62"},"modified":"2026-07-20T19:04:02","modified_gmt":"2026-07-20T19:04:02","slug":"pdf-security-tools","status":"publish","type":"page","link":"https:\/\/1clickpdf.com\/home\/pdf-security-tools\/","title":{"rendered":"PDF Security Tools"},"content":{"rendered":"\n<style>\n.ps-wrap{max-width:900px;margin:20px auto}\n.ps-card{border:1px solid #ddd;padding:20px;border-radius:12px;margin-bottom:20px}\ninput,button{padding:10px;margin:5px}\n<\/style>\n\n<div class=\"ps-wrap\">\n\n<div class=\"ps-card\">\n<h3>Add Password to PDF<\/h3>\n<input type=\"file\" id=\"protect-file\" accept=\".pdf\"><br>\n<input type=\"password\" id=\"protect-password\" placeholder=\"Password\">\n<button id=\"protect-btn\">Protect PDF<\/button>\n<div id=\"protect-result\"><\/div>\n<\/div>\n\n<div class=\"ps-card\">\n<h3>Remove Password from PDF<\/h3>\n<input type=\"file\" id=\"unlock-file\" accept=\".pdf\"><br>\n<input type=\"password\" id=\"unlock-password\" placeholder=\"Current password\">\n<button id=\"unlock-btn\">Unlock PDF<\/button>\n<div id=\"unlock-result\"><\/div>\n<\/div>\n\n<div class=\"ps-card\">\n<h3>Add Text Watermark<\/h3>\n<input type=\"file\" id=\"wm-file\" accept=\".pdf\"><br>\n<input type=\"text\" id=\"wm-text\" placeholder=\"CONFIDENTIAL\">\n<button id=\"wm-btn\">Add Watermark<\/button>\n<div id=\"wm-result\"><\/div>\n<\/div>\n\n<\/div>\n\n<script>\njQuery(function($){\n\nfunction send(action, fileId, passId, resultId, extra={}) {\n\n    let file = $(fileId)[0].files[0];\n\n    if(!file){\n        alert('Select PDF');\n        return;\n    }\n\n    let fd = new FormData();\n\n    fd.append('action', action);\n    fd.append('nonce', pdfsec.nonce);\n    fd.append('pdf', file);\n\n    if(passId){\n        fd.append('password', $(passId).val());\n    }\n\n    Object.keys(extra).forEach(k => fd.append(k, extra[k]));\n\n    $(resultId).html('Processing...');\n\n    $.ajax({\n        url: pdfsec.ajax,\n        type: 'POST',\n        data: fd,\n        processData:false,\n        contentType:false,\n        success:function(res){\n            if(res.success){\n                $(resultId).html(\n                    '<a target=\"_blank\" href=\"'+res.data.url+'\">Download PDF<\/a>'\n                );\n            } else {\n                $(resultId).html('Error: ' + res.data);\n            }\n        }\n    });\n}\n\n$('#protect-btn').click(function(){\n    send('pdfsec_protect','#protect-file','#protect-password','#protect-result');\n});\n\n$('#unlock-btn').click(function(){\n    send('pdfsec_unlock','#unlock-file','#unlock-password','#unlock-result');\n});\n\n$('#wm-btn').click(function(){\n    send(\n        'pdfsec_watermark',\n        '#wm-file',\n        null,\n        '#wm-result',\n        {text: $('#wm-text').val()}\n    );\n});\n\n});\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-62","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/pages\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":4,"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/pages\/62\/revisions"}],"predecessor-version":[{"id":89,"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/pages\/62\/revisions\/89"}],"wp:attachment":[{"href":"https:\/\/1clickpdf.com\/home\/wp-json\/wp\/v2\/media?parent=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}