@@ 5393-5413 (lines=21) @@ | ||
5390 | * @param int $b |
|
5391 | * @param int $c |
|
5392 | */ |
|
5393 | function openHere($style, $a = 0, $b = 0, $c = 0) |
|
5394 | { |
|
5395 | // this function will open the document at a specified page, in a specified style |
|
5396 | // the values for style, and the required parameters are: |
|
5397 | // 'XYZ' left, top, zoom |
|
5398 | // 'Fit' |
|
5399 | // 'FitH' top |
|
5400 | // 'FitV' left |
|
5401 | // 'FitR' left,bottom,right |
|
5402 | // 'FitB' |
|
5403 | // 'FitBH' top |
|
5404 | // 'FitBV' left |
|
5405 | $this->numObj++; |
|
5406 | $this->o_destination( |
|
5407 | $this->numObj, |
|
5408 | 'new', |
|
5409 | array('page' => $this->currentPage, 'type' => $style, 'p1' => $a, 'p2' => $b, 'p3' => $c) |
|
5410 | ); |
|
5411 | $id = $this->catalogId; |
|
5412 | $this->o_catalog($id, 'openHere', $this->numObj); |
|
5413 | } |
|
5414 | ||
5415 | /** |
|
5416 | * Add JavaScript code to the PDF document |
|
@@ 5434-5449 (lines=16) @@ | ||
5431 | * @param int $b |
|
5432 | * @param int $c |
|
5433 | */ |
|
5434 | function addDestination($label, $style, $a = 0, $b = 0, $c = 0) |
|
5435 | { |
|
5436 | // associates the given label with the destination, it is done this way so that a destination can be specified after |
|
5437 | // it has been linked to |
|
5438 | // styles are the same as the 'openHere' function |
|
5439 | $this->numObj++; |
|
5440 | $this->o_destination( |
|
5441 | $this->numObj, |
|
5442 | 'new', |
|
5443 | array('page' => $this->currentPage, 'type' => $style, 'p1' => $a, 'p2' => $b, 'p3' => $c) |
|
5444 | ); |
|
5445 | $id = $this->numObj; |
|
5446 | ||
5447 | // store the label->idf relationship, note that this means that labels can be used only once |
|
5448 | $this->destinations["$label"] = $id; |
|
5449 | } |
|
5450 | ||
5451 | /** |
|
5452 | * define font families, this is used to initialize the font families for the default fonts |