2017 © Pedro Peláez
 

library fpdi-protection

A FPDI compatible version of the FPDF_Protection script.

image

setasign/fpdi-protection

A FPDI compatible version of the FPDF_Protection script.

  • Tuesday, October 17, 2017
  • by Setasign
  • Repository
  • 4 Watchers
  • 6 Stars
  • 5,140 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 57 % Grown

The README.md

FpdiProtection

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

A FPDI 2 compatible and enhanced version of the FPDF_Protection script., (*2)

This version requires and uses OpenSSL functions instead of Mcrypt or a user land implementation of RC4., (*3)

RC4-40bits and RC4-128bits encryption are supported., (*4)

Installation with Composer

{
    "require": {
        "setasign/fpdi-protection": "^2.0"
    }
}

Manual Installation

If you do not use composer, just require the autoload.php in the /src folder:, (*5)

require_once('src/autoload.php');

If you have a PSR-4 autoloader implemented, just register the src path as follows:, (*6)

$loader = new \Example\Psr4AutoloaderClass;
$loader->register();
$loader->addNamespace('setasign\FpdiProtection', 'path/to/src/');

Don't forget to install FPDI and FPDF, too!, (*7)

Example

This class offers one public method, which allows you to set the protection of the resulting PDF document. All other code is identically to FPDI or FPDF., (*8)

If you pass null or an empty string as the owner password the method will create a random owner password. The return value of this method is the owner password., (*9)

<?php
use setasign\FpdiProtection\FpdiProtection;

// setup the autoload function
require_once('vendor/autoload.php');

$pdf = new FpdiProtection();
$ownerPassword = $pdf->setProtection(
    FpdiProtection::PERM_PRINT | FpdiProtection::PERM_COPY,
    'the user password',
    'the owner password'
);

// ...

The Versions

17/10 2017

dev-master

9999999-dev https://github.com/Setasign/fpdi-protection

A FPDI compatible version of the FPDF_Protection script.

  Sources   Download

MIT

The Requires

 

The Development Requires

password pdf fpdf protection fpdi

17/10 2017

v2.0.0

2.0.0.0 https://github.com/Setasign/fpdi-protection

A FPDI compatible version of the FPDF_Protection script.

  Sources   Download

MIT

The Requires

 

The Development Requires

password pdf fpdf protection fpdi