html2pdf icon indicating copy to clipboard operation
html2pdf copied to clipboard

Supported certificate file type?

Open simplygest opened this issue 4 years ago • 3 comments

Hi!

I'm trying to digitally sign generated PDF files using the instructions found in the documentation, but I don't know what kind of certificate files are required/supported: .cer, .crt, .pfx, .pem, .p12, .der...

Thanks!

simplygest avatar Mar 06 '21 17:03 simplygest

normally, it support PEM

spipu avatar Mar 09 '21 15:03 spipu

Hi !

I tried to create this too but cannot get pdf digitally signed validated in acrobat. can you make an example about this and can you show how to validate this certificate?

<div style="background:rgb(224, 224, 224);padding:3px;">
    <cert
        src="/certificate/econtract.pem"
        privkey="/certificate/econtract.pem"
        name="some"
        location="DKI JAKARTA"
        reason="Electronic Contract"
        contactinfo="[email protected]"
    >
    <div style="width:200px; height:200px; background:rgb(190, 190, 190);"></div>
    </cert>
</div>
$view = \View::make('econtract', $page_data);
$html2pdf = new Html2Pdf('P', 'A4', 'en', true, 'UTF-8', [5,5,5,5], false );
$html2pdf->pdf->SetCreator('PT');
$html2pdf->pdf->SetAuthor('PT');
$html2pdf->pdf->SetTitle('e-Contract '.$contract->contract_id);
$html2pdf->pdf->SetSubject($contract->contract_id);
$html2pdf->pdf->SetKeywords('Electronic Contract, Contract');
$html2pdf->setDefaultFont('Arial');
$html2pdf->writeHTML($view);
$pdf_name = 'arah-eContract-'.str_replace('/','-',$contract->contract_id).'.pdf';
$html2pdf->output();

Thank you

hanandika avatar Jun 12 '21 02:06 hanandika

Finally, get it working by using .crt file instead .pem file

hanandika avatar Jun 14 '21 10:06 hanandika