I tried to use PDF_add_nameddest to add nameddest but I don't know exactly how to use it or is it possible. My codes are:
$pdf = pdf_new();
pdf_open_pdi_document($pdf, 'test.pdf', "");
pdf_add_nameddest( $pdf , 'testdestination', 'bottom' );
My reference on the third parameter 'bottom' is from here. But did I used it the right way? I don't understand clearly.
The error on that is:
PDFlib exception occurred in starter_basic sample: [2100] PDF_add_nameddest: Function must not be called in 'object' scope
Is my code missing something or is it completely wrong?
Or even better, do you know something I should use to do this adding nameddest??