peec / angrerett
Angrerett skjema generering.
Installs: 1 665
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/peec/angrerett
Requires
- php: ~5.5.0|~5.6.0|~7.0.0
 - dompdf/dompdf: ^0.7.0
 - mikehaertl/php-pdftk: ^0.2.4
 
This package is not auto-updated.
Last update: 2018-01-03 13:15:47 UTC
README
Generate angrerett schemas with PHP ( see http://www.signform.no/dss/statlige-blanketter?view=forms&id=12 ) .
This library uses mikehaertl/php-pdftk and dompdf/dompdf libraries behind the scenes.
Supports the following schemas:
- Q-0321B
 - Q-0320B
 - Q-0319B
 
Requirements
- The pdftk command must be installed and working on your system. Note: This library is written for pdftk 2.x versions. You should be able to use it with pdftk 1.x but not all methods will work there. For details consult the man page of pdftk on your system.
apt-get install pdftk 
Install
composer install peec/angrerett
Usage
See example folder for more samples.
$ar = new \Peec\Angrerett\Angrerett();
$request = new Peec\Angrerett\Data\Q0320BData();
$request->setCompanyName('Noe AS');
$request->setOrgNumber('12345678911');
$request->setAddress('Min bedrfitsadresse 32');
$request->setEmail('angrerett@minbedrift.no');
$request->setPhone('81549300');
$request->setServices('Bankkort');
$request->setCustomerBirthDate(\DateTime::createFromFormat('d.m.Y', '16.08.1989'));
$request->setAppointmentDate(\DateTime::createFromFormat('d.m.Y', '24.08.2015'));
$request->setDeliveredAt(\DateTime::createFromFormat('d.m.Y', '25.08.2015'));
$request->setRefNumber('1000123');
$q = $ar->Q0320B($request);
/** Save to a pdf.  */
$q->saveAs('Q-0319B.pdf');