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
onCustomPdfSerialFormat($format, $format_ex, $content, &$pdf, &$d)
which gives you access to the `$pdf` object (TCPDF or FPDF) ; you can detect which one using
$isFPDF = (bool)(class_exists('FPDF') && $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
onGetCustomPdfSerialFormats(&$new_types, &$new_formats)
The two parameters are arrays and you need to add JHTML into, like
$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,