[Skip to main content](#vessel-content)

#   PDFSerial - Securing Generated PDFs Against Editing

##

- **[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")**
- [![Lumiga's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31479.png)](/forum/user/31479-lumiga "View Lumiga's Profile") Topic Author
- [ Offline](/forum/user/31479-lumiga)

Less More

- Posts: 637
- Thank you received: 26
-
-
-

1 year 6 months ago [\#366606](#366606) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  *[PDFSerial - Securing Generated PDFs Against Editing](/forum/17-serial-how-to/909327-pdfserial-securing-generated-pdfs-against-editing#366606 "-- HikaSerial version -- : 5  Dear HikaShop team,  We are currently using the PDFSubscription and PDF serial plugin to generate and send personalized PDF tickets to our customers. This works very well for our needs — thank you!  We would like to know if there is currently a way to secure the generated PDFs against editing or modification. Specifically, we're interested in features such as:  Disabling editing of the PDF content Restricting copying or modification (Optionally) setting a password for changes&#91;/li&#93;  If this is already possible using the existing plugin or through template customization?, we would appreciate some guidance or an example of how to implement this.  If this functionality is not yet supported, would you consider adding it in a future version of the plugin? We believe it would be a valuable addition for many users who wish to protect the integrity of their generated documents.  Looking forward to your feedback.  Best regards, Lumiga")* was created by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")*

-- HikaSerial version -- : 5

Dear HikaShop team,

We are currently using the PDFSubscription and PDF serial plugin to generate and send personalized PDF tickets to our customers. This works very well for our needs — thank you!

We would like to know if there is currently a way to secure the generated PDFs against editing or modification. Specifically, we're interested in features such as:

Disabling editing of the PDF content
Restricting copying or modification
(Optionally) setting a password for changes[/li]

If this is already possible using the existing plugin or through template customization?, we would appreciate some guidance or an example of how to implement this.

If this functionality is not yet supported, would you consider adding it in a future version of the plugin? We believe it would be a valuable addition for many users who wish to protect the integrity of their generated documents.

Looking forward to your feedback.

Best regards,
Lumiga

---

Kind regards,
Lumiga

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vOTA5MzI3LXBkZnNlcmlhbC1zZWN1cmluZy1nZW5lcmF0ZWQtcGRmcy1hZ2FpbnN0LWVkaXRpbmc/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

1 year 6 months ago [\#366611](#366611) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PDFSerial - Securing Generated PDFs Against Editing](/forum/17-serial-how-to/909327-pdfserial-securing-generated-pdfs-against-editing#366611 "-- HikaSerial version -- : 5  Dear HikaShop team,  We are currently using the PDFSubscription and PDF serial plugin to generate and send personalized PDF tickets to our customers. This works very well for our needs — thank you!  We would like to know if there is currently a way to secure the generated PDFs against editing or modification. Specifically, we're interested in features such as:  Disabling editing of the PDF content Restricting copying or modification (Optionally) setting a password for changes&#91;/li&#93;  If this is already possible using the existing plugin or through template customization?, we would appreciate some guidance or an example of how to implement this.  If this functionality is not yet supported, would you consider adding it in a future version of the plugin? We believe it would be a valuable addition for many users who wish to protect the integrity of their generated documents.  Looking forward to your feedback.  Best regards, Lumiga")*

Hello,

It requires a specific development in the plugin in order to add such feature.
It is possible to set the protection in TCPDF. For FPDF it requires to add an extra "plugin" for that.
Since the "PDF Serial" plugin can use both libraries, handling the "protection" should be available for the two implementation.
Unfortunately, it is not possible to do so via an override ; if you want to add it yourself, best would be to "duplicate" the actual plugin and force the usage of TCPDF (which is easier for the protection support).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vOTA5MzI3LXBkZnNlcmlhbC1zZWN1cmluZy1nZW5lcmF0ZWQtcGRmcy1hZ2FpbnN0LWVkaXRpbmc/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[P.M.](/forum/user/78358-p-m "View P.M.'s Profile")**
- [![P.M.'s Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar78358.png?1792269314)](/forum/user/78358-p-m "View P.M.'s Profile")
- [ Away](/forum/user/78358-p-m)

Less More

- Posts: 68
- Thank you received: 9
-
-
- [](http://www.breisig.live)
-

1 year 5 months ago [\#367374](#367374) by [P.M.](/forum/user/78358-p-m "View P.M.'s Profile")  Replied by *[P.M.](/forum/user/78358-p-m "View P.M.'s Profile")* on topic *[PDFSerial - Securing Generated PDFs Against Editing](/forum/17-serial-how-to/909327-pdfserial-securing-generated-pdfs-against-editing#367374 "-- HikaSerial version -- : 5  Dear HikaShop team,  We are currently using the PDFSubscription and PDF serial plugin to generate and send personalized PDF tickets to our customers. This works very well for our needs — thank you!  We would like to know if there is currently a way to secure the generated PDFs against editing or modification. Specifically, we're interested in features such as:  Disabling editing of the PDF content Restricting copying or modification (Optionally) setting a password for changes&#91;/li&#93;  If this is already possible using the existing plugin or through template customization?, we would appreciate some guidance or an example of how to implement this.  If this functionality is not yet supported, would you consider adding it in a future version of the plugin? We believe it would be a valuable addition for many users who wish to protect the integrity of their generated documents.  Looking forward to your feedback.  Best regards, Lumiga")*

Hello,
I would like to help with the creation of this function, but I can't get to grips with the developer documentation.
is it a big effort to overwrite a plugin?

The following user(s) said Thank You: [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vOTA5MzI3LXBkZnNlcmlhbC1zZWN1cmluZy1nZW5lcmF0ZWQtcGRmcy1hZ2FpbnN0LWVkaXRpbmc/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

1 year 5 months ago [\#367406](#367406) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PDFSerial - Securing Generated PDFs Against Editing](/forum/17-serial-how-to/909327-pdfserial-securing-generated-pdfs-against-editing#367406 "-- HikaSerial version -- : 5  Dear HikaShop team,  We are currently using the PDFSubscription and PDF serial plugin to generate and send personalized PDF tickets to our customers. This works very well for our needs — thank you!  We would like to know if there is currently a way to secure the generated PDFs against editing or modification. Specifically, we're interested in features such as:  Disabling editing of the PDF content Restricting copying or modification (Optionally) setting a password for changes&#91;/li&#93;  If this is already possible using the existing plugin or through template customization?, we would appreciate some guidance or an example of how to implement this.  If this functionality is not yet supported, would you consider adding it in a future version of the plugin? We believe it would be a valuable addition for many users who wish to protect the integrity of their generated documents.  Looking forward to your feedback.  Best regards, Lumiga")*

Hello,

In my message I was talking about "duplicating" the plugin and not overwrite it.
If you modify the actual PDFSerial plugin, the next update of HikaSerial and your modifications will be lost.
So the best is to create a new plugin and copy the code, like a duplication.
The most important is to change the plugin name so it won't collide.
[ docs.joomla.org/J4.x:Creating\_a\_Plugin\_for\_Joomla](https://docs.joomla.org/J4.x:Creating_a_Plugin_for_Joomla)

PDF Serials uses a trigger Code:

onCustomPdfSerialFormat($format, $format_ex, $content, &amp;$pdf, &amp;$d)

which gives you access to the &#96;$pdf&#96; object (TCPDF or FPDF) ; you can detect which one using Code:

$isFPDF = (bool)(class_exists('FPDF') &amp;&amp; $pdf instanceof FPDF);

In the next release, we will add another trigger to create your own PDF actions (which will be far better for such kind of need).

In order to add new formats and new types into the PDF Serial configuration screen ; there is also a trigger for that Code:

onGetCustomPdfSerialFormats(&amp;$new_types, &amp;$new_formats)

The two parameters are arrays and you need to add JHTML into, like Code:

$new_formats[] = JHTML::_('selection.option', 'custom_format', JText::_('MY_CUSTOM_FORMAT'));

Regarding the &#96;SetProtection&#96; support, we have some internal tests but the support of multiple librairies is difficult.
Since the usage of PDF Templates forces to uses the FPDI lib ; we need to load the FPDI_Protection lib and use its specific functions.
Otherwise, TCPDF has a SetProtection method but FPDF do not.

Since it's a "work in progress", it was not added in the last release ; but we do hope that all tests will be successful for the next one.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile"), [P.M.](/forum/user/78358-p-m "View P.M.'s Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vOTA5MzI3LXBkZnNlcmlhbC1zZWN1cmluZy1nZW5lcmF0ZWQtcGRmcy1hZ2FpbnN0LWVkaXRpbmc/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.095 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
