Overview

Namespaces

  • None
  • PHP
  • WkHtmlToPdf
    • Options

Classes

  • WkHtmlToPdf\WkHtmlToPdf

Interfaces

  • Throwable

Traits

  • WkHtmlToPdf\Options\GlobalOptionsTrait
  • WkHtmlToPdf\Options\HeaderFooterOptionsTrait
  • WkHtmlToPdf\Options\OutlineOptionsTrait
  • WkHtmlToPdf\Options\PageOptionsTrait
  • WkHtmlToPdf\Options\TocOptionsTrait

Exceptions

  • Exception

Functions

  • join_path
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace WkHtmlToPdf\Options;
  4: 
  5: use WkHtmlToPdf\WkHtmlToPdf;
  6: 
  7: /**
  8:  * Page options trait.
  9:  *
 10:  * @author ivanpepelko
 11:  */
 12: trait PageOptionsTrait
 13: {
 14:     /**
 15:      * Show javascript debugging output (only when constructor param $debug == true).
 16:      *
 17:      * @return WkHtmlToPdf
 18:      */
 19:     public function enableJavascriptDebugging()
 20:     {
 21:         if (array_key_exists('no-debug-javascript', $this->arguments)) {
 22:             unset($this->arguments ['no-debug-javascript']);
 23:         }
 24:         $this->arguments['debug-javascript'] = null;
 25: 
 26:         return $this;
 27:     }
 28: 
 29:     /**
 30:      * Do not show javascript debugging output (only when constructor param $debug == true).
 31:      *
 32:      * @return WkHtmlToPdf
 33:      */
 34:     public function disableJavascriptDebugging()
 35:     {
 36:         if (array_key_exists('debug-javascript', $this->arguments)) {
 37:             unset($this->arguments ['debug-javascript']);
 38:         }
 39:         $this->arguments['no-debug-javascript'] = null;
 40: 
 41:         return $this;
 42:     }
 43: 
 44:     /**
 45:      * Do print background (default).
 46:      *
 47:      * @return WkHtmlToPdf
 48:      */
 49:     public function enableBackground()
 50:     {
 51:         if (array_key_exists('no-background', $this->arguments)) {
 52:             unset($this->arguments['no-background']);
 53:         }
 54:         $this->arguments['background'] = null;
 55: 
 56:         return $this;
 57:     }
 58: 
 59:     /**
 60:      * Do not print background.
 61:      *
 62:      * @return WkHtmlToPdf
 63:      */
 64:     public function disableBackground()
 65:     {
 66:         if (array_key_exists('background', $this->arguments)) {
 67:             unset($this->arguments['background']);
 68:         }
 69:         $this->arguments['no-background'] = null;
 70: 
 71:         return $this;
 72:     }
 73: 
 74:     /**
 75:      * Set web cache directory.
 76:      *
 77:      * @param string $path
 78:      *
 79:      * @return WkHtmlToPdf
 80:      */
 81:     public function setCacheDir($path)
 82:     {
 83:         $this->arguments['cache-dir'] = $path;
 84: 
 85:         return $this;
 86:     }
 87: 
 88:     /**
 89:      * Use this SVG file when rendering checked checkboxes.
 90:      *
 91:      * @param string $path
 92:      *
 93:      * @return WkHtmlToPdf
 94:      */
 95:     public function setCheckboxCheckedSvg($path)
 96:     {
 97:         $this->arguments['checkbox-checked-svg'] = $path;
 98: 
 99:         return $this;
100:     }
101: 
102:     /**
103:      * Use this SVG file when rendering unchecked checkboxes.
104:      *
105:      * @param string $path
106:      *
107:      * @return WkHtmlToPdf
108:      */
109:     public function setCheckboxUncheckedSvg($path)
110:     {
111:         $this->arguments['checkbox-svg'] = $path;
112: 
113:         return $this;
114:     }
115: 
116:     /**
117:      * Use this SVG file when rendering checked radiobuttons.
118:      *
119:      * @param string $path
120:      *
121:      * @return WkHtmlToPdf
122:      */
123:     public function setRadiobuttonCheckedSvg($path)
124:     {
125:         $this->arguments['radiobutton-checked-svg'] = $path;
126: 
127:         return $this;
128:     }
129: 
130:     /**
131:      * Use this SVG file when rendering unchecked radiobuttons.
132:      *
133:      * @param string $path
134:      *
135:      * @return WkHtmlToPdf
136:      */
137:     public function setRadiobuttonUncheckedSvg($path)
138:     {
139:         $this->arguments['radiobutton-svg'] = $path;
140: 
141:         return $this;
142:     }
143: 
144:     /**
145:      * Set an additional cookie.
146:      *
147:      * @param string $name
148:      * @param string $value
149:      *
150:      * @return WkHtmlToPdf
151:      */
152:     public function addCookie($name, $value)
153:     {
154:         $this->arguments['cookie'][$name] = urlencode($value);
155: 
156:         return $this;
157:     }
158: 
159:     /**
160:      * Set additional cookies.
161:      *
162:      * @param array $cookies
163:      *
164:      * @return WkHtmlToPdf
165:      */
166:     public function addCookies(array $cookies)
167:     {
168:         foreach ($cookies as $name => $value) {
169:             $this->arguments['cookie'][$name] = urlencode($value);
170:         }
171: 
172:         return $this;
173:     }
174: 
175:     /**
176:      * Set an additional HTTP header.
177:      *
178:      * @param string $name
179:      * @param string $value
180:      *
181:      * @return WkHtmlToPdf
182:      */
183:     public function addCustomHttpHeader($name, $value)
184:     {
185:         $this->arguments['custom-header'][$name] = $value;
186: 
187:         return $this;
188:     }
189: 
190:     /**
191:      * Set additional HTTP headers.
192:      *
193:      * @param array $headers
194:      *
195:      * @return WkHtmlToPdf
196:      */
197:     public function addCustomHttpHeaders(array $headers)
198:     {
199:         foreach ($headers as $name => $value) {
200:             $this->arguments['custom-header'][$name] = $value;
201:         }
202: 
203:         return $this;
204:     }
205: 
206:     /**
207:      * Add HTTP headers specified by addCustomHeader() for each resource request.
208:      *
209:      * @return WkHtmlToPdf
210:      */
211:     public function enableCustomHttpHeaderPropagination()
212:     {
213:         if (array_key_exists('no-custom-header-propagination', $this->arguments)) {
214:             unset($this->arguments['no-custom-header-propagination']);
215:         }
216:         $this->arguments['custom-header-propagation'] = null;
217: 
218:         return $this;
219:     }
220: 
221:     /**
222:      * Do not add HTTP headers specified by addCustomHeader() for each resource request.
223:      *
224:      * @return WkHtmlToPdf
225:      */
226:     public function disableCustomHttpHeaderPropagination()
227:     {
228:         if (array_key_exists('custom-header-propagination', $this->arguments)) {
229:             unset($this->arguments['custom-header-propagination']);
230:         }
231:         $this->arguments['no-custom-header-propagation'] = null;
232: 
233:         return $this;
234:     }
235: 
236:     /**
237:      * Add a default header, with the name of the page to the left,
238:      * and the page number to the right,
239:      * this is short for:
240:      * setHeaderLeft('[webpage]'),
241:      * setHeaderRight('[page]/[toPage]'),
242:      * setMarginTop('2cm'),
243:      * enableHeaderLine().
244:      *
245:      * @return WkHtmlToPdf
246:      */
247:     public function addDefaultHeader()
248:     {
249:         $this->arguments['default-header'] = null;
250: 
251:         return $this;
252:     }
253: 
254:     /**
255:      * Set the default text encoding, for input.
256:      *
257:      * @param string $encoding
258:      *
259:      * @return WkHtmlToPdf
260:      */
261:     public function setEncoding($encoding)
262:     {
263:         $this->arguments['encoding'] = $encoding;
264: 
265:         return $this;
266:     }
267: 
268:     /**
269:      * Do not make links to remote web pages.
270:      *
271:      * @return WkHtmlToPdf
272:      */
273:     public function disableExternalLinks()
274:     {
275:         if (array_key_exists('enable-external-links', $this->arguments)) {
276:             unset($this->arguments['enable-external-links']);
277:         }
278:         $this->arguments['disable-external-links'] = null;
279: 
280:         return $this;
281:     }
282: 
283:     /**
284:      * Make links to remote web pages (default).
285:      *
286:      * @return WkHtmlToPdf
287:      */
288:     public function enableExternalLinks()
289:     {
290:         if (array_key_exists('disable-external-links', $this->arguments)) {
291:             unset($this->arguments['disable-external-links']);
292:         }
293:         $this->arguments['enable-external-links'] = null;
294: 
295:         return $this;
296:     }
297: 
298:     /**
299:      * Do not turn HTML form fields into pdf form fields (default).
300:      *
301:      * @return WkHtmlToPdf
302:      */
303:     public function disableForms()
304:     {
305:         if (array_key_exists('enable-forms', $this->arguments)) {
306:             unset($this->arguments['enable-forms']);
307:         }
308:         $this->arguments['disable-forms'] = null;
309: 
310:         return $this;
311:     }
312: 
313:     /**
314:      * Turn HTML form fields into pdf form fields.
315:      *
316:      * @return WkHtmlToPdf
317:      */
318:     public function enableForms()
319:     {
320:         if (array_key_exists('disable-forms', $this->arguments)) {
321:             unset($this->arguments['disable-forms']);
322:         }
323:         $this->arguments['enable-forms'] = null;
324: 
325:         return $this;
326:     }
327: 
328:     /**
329:      * Do load or print images (default).
330:      *
331:      * @return WkHtmlToPdf
332:      */
333:     public function disableImages()
334:     {
335:         if (array_key_exists('images', $this->arguments)) {
336:             unset($this->arguments['images']);
337:         }
338:         $this->arguments['no-images'] = null;
339: 
340:         return $this;
341:     }
342: 
343:     /**
344:      * Do not load or print images.
345:      *
346:      * @return WkHtmlToPdf
347:      */
348:     public function enableImages()
349:     {
350:         if (array_key_exists('no-images', $this->arguments)) {
351:             unset($this->arguments['no-images']);
352:         }
353:         $this->arguments['images'] = null;
354: 
355:         return $this;
356:     }
357: 
358:     /**
359:      * Do not make local links.
360:      *
361:      * @return WkHtmlToPdf
362:      */
363:     public function disableInternalLinks()
364:     {
365:         if (array_key_exists('enable-internal-links', $this->arguments)) {
366:             unset($this->arguments['enable-internal-links']);
367:         }
368:         $this->arguments['disable-internal-links'] = null;
369: 
370:         return $this;
371:     }
372: 
373:     /**
374:      * Make local links (default).
375:      *
376:      * @return WkHtmlToPdf
377:      */
378:     public function enableInternalLinks()
379:     {
380:         if (array_key_exists('disable-internal-links', $this->arguments)) {
381:             unset($this->arguments['disable-internal-links']);
382:         }
383:         $this->arguments['enable-internal-links'] = null;
384: 
385:         return $this;
386:     }
387: 
388:     /**
389:      * Do not allow web pages to run javascript.
390:      *
391:      * @return WkHtmlToPdf
392:      */
393:     public function disableJavascript()
394:     {
395:         if (array_key_exists('enable-javascript', $this->arguments)) {
396:             unset($this->arguments['enable-javascript']);
397:         }
398:         $this->arguments['disable-javascript'] = null;
399: 
400:         return $this;
401:     }
402: 
403:     /**
404:      * Do allow web pages to run javascript (default).
405:      *
406:      * @return WkHtmlToPdf
407:      */
408:     public function enableJavascript()
409:     {
410:         if (array_key_exists('disable-javascript', $this->arguments)) {
411:             unset($this->arguments['disable-javascript']);
412:         }
413:         $this->arguments['enable-javascript'] = null;
414: 
415:         return $this;
416:     }
417: 
418:     /**
419:      * Wait some milliseconds for javascript finish (default 200).
420:      *
421:      * @param int $msec
422:      *
423:      * @return WkHtmlToPdf
424:      */
425:     public function setJavascriptDelay($msec = 200)
426:     {
427:         $this->arguments['javascript-delay'] = intval($msec);
428: 
429:         return $this;
430:     }
431: 
432:     /**
433:      * Disable installed plugins (default).
434:      *
435:      * @return WkHtmlToPdf
436:      */
437:     public function disablePlugins()
438:     {
439:         if (array_key_exists('enable-plugins', $this->arguments)) {
440:             unset($this->arguments['enable-plugins']);
441:         }
442:         $this->arguments['disable-plugins'] = null;
443: 
444:         return $this;
445:     }
446: 
447:     /**
448:      * Enable installed plugins (plugins will likely not work).
449:      *
450:      * @return WkHtmlToPdf
451:      */
452:     public function enablePlugins()
453:     {
454:         if (array_key_exists('disable-plugins', $this->arguments)) {
455:             unset($this->arguments['disable-plugins']);
456:         }
457:         $this->arguments['enable-plugins'] = null;
458: 
459:         return $this;
460:     }
461: 
462:     /**
463:      * Do not link from section header to toc (default).
464:      *
465:      * @return WkHtmlToPdf
466:      */
467:     public function disableTocBackLinks()
468:     {
469:         if (array_key_exists('enable-toc-back-links', $this->arguments)) {
470:             unset($this->arguments['enable-toc-back-links']);
471:         }
472:         $this->arguments['disable-toc-back-links'] = null;
473: 
474:         return $this;
475:     }
476: 
477:     /**
478:      * Link from section header to toc.
479:      *
480:      * @return WkHtmlToPdf
481:      */
482:     public function enableTocBackLinks()
483:     {
484:         if (array_key_exists('disable-toc-back-links', $this->arguments)) {
485:             unset($this->arguments['disable-toc-back-links']);
486:         }
487:         $this->arguments['enable-toc-back-links'] = null;
488: 
489:         return $this;
490:     }
491: 
492:     /**
493:      * Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant.
494:      *
495:      * @return WkHtmlToPdf
496:      */
497:     public function disableSmartShrinking()
498:     {
499:         if (array_key_exists('enable-smart-shrinking', $this->arguments)) {
500:             unset($this->arguments['enable-smart-shrinking']);
501:         }
502:         $this->arguments['disable-smart-shrinking'] = null;
503: 
504:         return $this;
505:     }
506: 
507:     /**
508:      * Enable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant (default).
509:      *
510:      * @return WkHtmlToPdf
511:      */
512:     public function enableSmartShrinking()
513:     {
514:         if (array_key_exists('disable-smart-shrinking', $this->arguments)) {
515:             unset($this->arguments['disable-smart-shrinking']);
516:         }
517:         $this->arguments['enable-smart-shrinking'] = null;
518: 
519:         return $this;
520:     }
521: 
522:     /**
523:      * Allow the file or files from the specified folder to be loaded.
524:      *
525:      * @param string $path
526:      *
527:      * @return WkHtmlToPdf
528:      */
529:     public function addAllowedPath($path)
530:     {
531:         $this->arguments['allow'][] = $path;
532: 
533:         return $this;
534:     }
535: 
536:     /**
537:      * Allow the file or files from the specified folders to be loaded.
538:      *
539:      * @param string[] $paths
540:      *
541:      * @return WkHtmlToPdf
542:      */
543:     public function addAllowedPaths(array $paths)
544:     {
545:         foreach ($paths as $path) {
546:             $this->arguments['allow'][] = $path;
547:         }
548: 
549:         return $this;
550:     }
551: 
552:     /**
553:      * Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with allow().
554:      *
555:      * @return WkHtmlToPdf
556:      */
557:     public function disableLocalFileAccess()
558:     {
559:         if (array_key_exists('enable-local-file-access', $this->arguments)) {
560:             unset($this->arguments['enable-local-file-access']);
561:         }
562:         $this->arguments['disable-local-file-access'] = null;
563: 
564:         return $this;
565:     }
566: 
567:     /**
568:      * Allowed conversion of a local file to read in other local files. (default).
569:      *
570:      * @return WkHtmlToPdf
571:      */
572:     public function enableLocalFileAccess()
573:     {
574:         if (array_key_exists('disable-local-file-access', $this->arguments)) {
575:             unset($this->arguments['disable-local-file-access']);
576:         }
577:         $this->arguments['enable-local-file-access'] = null;
578: 
579:         return $this;
580:     }
581: 
582:     /**
583:      * Run this additional javascript after the page is done loading.
584:      *
585:      * @param string $path
586:      *
587:      * @return WkHtmlToPdf
588:      */
589:     public function addScript($path)
590:     {
591:         $this->arguments['run-script'][] = $path;
592: 
593:         return $this;
594:     }
595: 
596:     /**
597:      * Run this additional javascripts after the page is done loading.
598:      *
599:      * @param string[] $paths
600:      *
601:      * @return WkHtmlToPdf
602:      */
603:     public function addScripts(array $paths)
604:     {
605:         foreach ($paths as $path) {
606:             $this->arguments['run-script'][] = $path;
607:         }
608: 
609:         return $this;
610:     }
611: 
612:     /**
613:      * Keep relative external links as relative external links.
614:      *
615:      * @return WkHtmlToPdf
616:      */
617:     public function keepRelativeLinks()
618:     {
619:         if (array_key_exists('resolve-relative-links', $this->arguments)) {
620:             unset($this->arguments['resolve-relative-links']);
621:         }
622:         $this->arguments['keep-relative-links'] = null;
623: 
624:         return $this;
625:     }
626: 
627:     /**
628:      * Resolve relative external links into absolute links (default).
629:      *
630:      * @return WkHtmlToPdf
631:      */
632:     public function resolveRelativeLinks()
633:     {
634:         if (array_key_exists('keep-relative-links', $this->arguments)) {
635:             unset($this->arguments['keep-relative-links']);
636:         }
637:         $this->arguments['resolve-relative-links'] = null;
638: 
639:         return $this;
640:     }
641: 
642:     /**
643:      * Specify how to handle pages that fail to load: abort, ignore or skip (default abort).
644:      *
645:      * @param string $handler
646:      *
647:      * @return WkHtmlToPdf
648:      */
649:     public function setLoadErrorHandling($handler)
650:     {
651:         $this->arguments['load-error-handling'] = $handler;
652: 
653:         return $this;
654:     }
655: 
656:     /**
657:      * Specify how to handle media files that fail to load: abort, ignore or skip (default ignore).
658:      *
659:      * @param string $handler
660:      *
661:      * @return WkHtmlToPdf
662:      */
663:     public function setLoadMediaErrorHandling($handler)
664:     {
665:         $this->arguments['load-media-error-handling'] = $handler;
666: 
667:         return $this;
668:     }
669: 
670:     /**
671:      * Minimum font size.
672:      *
673:      * @param int $size
674:      *
675:      * @return WkHtmlToPdf
676:      */
677:     public function setMinimumFontSize($size)
678:     {
679:         $this->arguments['minimum-font-size'] = intval($size);
680: 
681:         return $this;
682:     }
683: 
684:     /**
685:      * Set the starting page number (default 0).
686:      *
687:      * @param int $offset
688:      *
689:      * @return WkHtmlToPdf
690:      */
691:     public function setPageOffset($offset = 0)
692:     {
693:         $this->arguments['page-offset'] = intval($offset);
694: 
695:         return $this;
696:     }
697: 
698:     /**
699:      * Use print media-type instead of screen.
700:      *
701:      * @return WkHtmlToPdf
702:      */
703:     public function enablePrintMediaType()
704:     {
705:         if (!$this->isQtPatched) {
706:             if (array_key_exists('no-print-media-type', $this->arguments)) {
707:                 unset($this->arguments['no-print-media-type']);
708:             }
709:             $this->arguments['print-media-type'] = null;
710:         } else {
711:             trigger_error('Print media arguments are not supported on wkhtmltopdf with unpatched qt.', E_USER_WARNING);
712:         }
713: 
714:         return $this;
715:     }
716: 
717:     /**
718:      * Do not use print media-type instead of screen (default).
719:      *
720:      * @return WkHtmlToPdf
721:      */
722:     public function disablePrintMediaType()
723:     {
724:         if (!$this->isQtPatched) {
725:             if (array_key_exists('print-media-type', $this->arguments)) {
726:                 unset($this->arguments['print-media-type']);
727:             }
728:             $this->arguments['no-print-media-type'] = null;
729:         } else {
730:             trigger_error('Print media arguments are not supported by wkhtmltopdf with unpatched qt.', E_USER_WARNING);
731:         }
732: 
733:         return $this;
734:     }
735: 
736:     /**
737:      * Set viewport size if you have custom scrollbars or css attribute overflow to emulate window size.
738:      *
739:      * @param string $size hxw, in pixels
740:      *
741:      * @return WkHtmlToPdf
742:      */
743:     public function setViewportSize($size)
744:     {
745:         $this->arguments['viewport-size'] = $size;
746: 
747:         return $this;
748:     }
749: 
750:     /**
751:      * Use this zoom factor (default 1).
752:      *
753:      * @param float $zoom
754:      *
755:      * @return WkHtmlToPdf
756:      */
757:     public function setZoom($zoom = 1.0)
758:     {
759:         $this->arguments['zoom'] = $zoom;
760: 
761:         return $this;
762:     }
763: 
764:     /**
765:      * Do not Stop slow running javascripts.
766:      *
767:      * @return WkHtmlToPdf
768:      */
769:     public function enableSlowScripts()
770:     {
771:         if (array_key_exists('stop-slow-scripts', $this->arguments)) {
772:             unset($this->arguments['stop-slow-scripts']);
773:         }
774:         $this->arguments['no-stop-slow-scripts'] = null;
775: 
776:         return $this;
777:     }
778: 
779:     /**
780:      * Stop slow running javascripts (default).
781:      *
782:      * @return WkHtmlToPdf
783:      */
784:     public function disableSlowScripts()
785:     {
786:         if (array_key_exists('no-stop-slow-scripts', $this->arguments)) {
787:             unset($this->arguments['no-stop-slow-scripts']);
788:         }
789:         $this->arguments['stop-slow-scripts'] = null;
790: 
791:         return $this;
792:     }
793: 
794:     /**
795:      * Add an additional post field.
796:      *
797:      * @param string $name
798:      * @param string $value
799:      *
800:      * @return WkHtmlToPdf
801:      */
802:     public function addHttpPostField($name, $value)
803:     {
804:         $this->arguments['post'][$name] = $value;
805: 
806:         return $this;
807:     }
808: 
809:     /**
810:      * Add an additional post fields.
811:      *
812:      * @param string[] $fields
813:      *
814:      * @return WkHtmlToPdf
815:      */
816:     public function addHttpPostFields(array $fields)
817:     {
818:         foreach ($fields as $name => $value) {
819:             $this->arguments['post'][$name] = $value;
820:         }
821: 
822:         return $this;
823:     }
824: 
825:     /**
826:      * Add an additional post file.
827:      *
828:      * @param string $name
829:      * @param string $path
830:      *
831:      * @return WkHtmlToPdf
832:      */
833:     public function addHttpPostFile($name, $path)
834:     {
835:         $this->arguments['post'][$name] = $path;
836: 
837:         return $this;
838:     }
839: 
840:     /**
841:      * Add an additional post files.
842:      *
843:      * @param string[] $files
844:      *
845:      * @return WkHtmlToPdf
846:      */
847:     public function addHttpPostFiles(array $files)
848:     {
849:         foreach ($files as $name => $path) {
850:             $this->arguments['post'][$name] = $path;
851:         }
852: 
853:         return $this;
854:     }
855: 
856:     /**
857:      * Specify a user style sheet, to load with every page.
858:      *
859:      * @param string $url
860:      *
861:      * @return WkHtmlToPdf
862:      */
863:     public function setUserStyleSheet($url)
864:     {
865:         $this->arguments['user-style-sheet'] = $url;
866: 
867:         return $this;
868:     }
869: 
870:     /**
871:      * HTTP Authentication username.
872:      *
873:      * @param string $username
874:      *
875:      * @return WkHtmlToPdf
876:      */
877:     public function setHttpAuthUsername($username)
878:     {
879:         $this->arguments['username'] = $username;
880: 
881:         return $this;
882:     }
883: 
884:     /**
885:      * HTTP Authentication password.
886:      *
887:      * @param string $password
888:      *
889:      * @return WkHtmlToPdf
890:      */
891:     public function setHttpAuthPassword($password)
892:     {
893:         $this->arguments['password'] = $password;
894: 
895:         return $this;
896:     }
897: 
898:     /**
899:      * Use a proxy.
900:      *
901:      * @param string $proxy
902:      *
903:      * @return Wkh2ps
904:      */
905:     public function setProxy($proxy)
906:     {
907:         $this->arguments['proxy'] = $proxy;
908: 
909:         return $this;
910:     }
911: 
912:     /**
913:      * Wait until window.status is equal to this string before rendering page.
914:      *
915:      * @param string $windowStatus
916:      *
917:      * @return WkHtmlToPdf
918:      */
919:     public function waitWindowStatus($windowStatus)
920:     {
921:         $this->arguments['window-status'] = $windowStatus;
922: 
923:         return $this;
924:     }
925: 
926:     /**
927:      * Bypass proxy for host (repeatable).
928:      *
929:      * @param string $value
930:      *
931:      * @return WkHtmlToPdf
932:      */
933:     public function setBypassProxy($value)
934:     {
935:         $this->arguments['bypass-proxy-for'] = $value;
936: 
937:         return $this;
938:     }
939: 
940:     /**
941:      * Do not include the page in the table of contents and outlines.
942:      *
943:      * @return WkHtmlToPdf
944:      */
945:     public function excludeFromOutline()
946:     {
947:         if (array_key_exists('include-in-outline', $this->arguments)) {
948:             unset($this->arguments['include-in-outline']);
949:         }
950:         $this->arguments['exclude-from-outline'] = null;
951: 
952:         return $this;
953:     }
954: 
955:     /**
956:      * Include the page in the table of contents and outlines (default).
957:      *
958:      * @return WkHtmlToPdf
959:      */
960:     public function includeInOutline()
961:     {
962:         if (array_key_exists('exclude-from-outline', $this->arguments)) {
963:             unset($this->arguments['exclude-from-outline']);
964:         }
965:         $this->arguments['include-in-outline'] = null;
966: 
967:         return $this;
968:     }
969: }
970: 
wkp2p API documentation generated by ApiGen