Created
March 4, 2013 07:03
-
-
Save heiglandreas/5080536 to your computer and use it in GitHub Desktop.
Create a PDF-File with Annotations showing up in Adobe Reader with a checked checkbox in the Annotation-List.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Requires PDFlib >= 8.0.0 | |
header('Content-Type: application/pdf'); | |
$pdf = new PDFlib(); | |
$pdf->begin_document('',''); | |
$pdf->begin_page_ext(100,100,''); | |
$pdf->create_annotation(10,40,20,50, 'text', 'contents={testcontent} name=1 title={foo} popup=2 annotcolor={rgb 1 1 0}'); | |
$pdf->create_annotation(10,40,20,50, 'popup', 'name=2 parentname=1'); | |
$pdf->create_annotation(10,40,20,50,'text','contents={Marked festgelegt von foo} name=3 custom={{key=State type=string value=Marked} {key=StateModel type=string value=Marked}} title={foo} popup=4 inreplyto=1 annotcolor={rgb 1 1 0}'); | |
$pdf->create_annotation(10,40,20,50, 'popup', 'name=4 parentname=3'); | |
$pdf->end_page_ext(''); | |
$pdf->end_document(''); | |
echo $pdf->get_buffer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment