- Posts: 637
- Thank you received: 26
PDFSerial - Securing Generated PDFs Against Editing
1 year 6 months ago #366606
by Lumiga
Kind regards,
Lumiga
PDFSerial - Securing Generated PDFs Against Editing was created by Lumiga
-- 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
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 or Create an account to join the conversation.
1 year 6 months ago #366611
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic PDFSerial - Securing Generated PDFs Against Editing
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,
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 & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
1 year 5 months ago #367374
by P.M.
Replied by P.M. on topic PDFSerial - Securing Generated PDFs Against Editing
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?
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
Please Log in or Create an account to join the conversation.
1 year 5 months ago #367406
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic PDFSerial - Securing Generated PDFs Against Editing
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
PDF Serials uses a trigger
which gives you access to the `$pdf` object (TCPDF or FPDF) ; you can detect which one using
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
The two parameters are arrays and you need to add JHTML into, like
Regarding the `SetProtection` 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,
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
PDF Serials uses a trigger
Code:
onCustomPdfSerialFormat($format, $format_ex, $content, &$pdf, &$d)
Code:
$isFPDF = (bool)(class_exists('FPDF') && $pdf instanceof FPDF);
In order to add new formats and new types into the PDF Serial configuration screen ; there is also a trigger for that
Code:
onGetCustomPdfSerialFormats(&$new_types, &$new_formats)
Code:
$new_formats[] = JHTML::_('selection.option', 'custom_format', JText::_('MY_CUSTOM_FORMAT'));
Regarding the `SetProtection` 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 & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.125 seconds