K_PATH_MAIN (which is root tcpdf folder). /usr/local/apache2/htdocs/tcpdf/images/./usr/share/doc/php/tcpdf/examples/images/./usr/share/doc/php-tcpdf/examples/images/.If its defined before including TCPDF library its ok, if not TCPDF checks some default paths and first existing is used as images directory. There is, however, one important thing to remember, exact location depends on K_PATH_IMAGES constant, which should contain path to images folder. First of all $PDF_HEADER_LOGO is suppose to be an image file name, not image data - as in default implementation of Header() function. This is safe bet if you want to avoid issues with calculating correct path, but adds extra I/O overhead, because TCPDF will attempt to store supplied data as temporary image file in order to determine image width & height. Loading base-64 encoded string - must have prefix in src attribute: That is caused by checking first character in a path string as a forward slash /, which is considered a linux root and the path will be recalculated - relative path will append to a global variable DOCUMENT_ROOT. Note, that relative paths are calculated differently on linux and windows - what works correctly on windows may not work well on linux. Inserting image with src attribute as relative path - both examples are treated as relative paths: Inserting image with src attribute as absolute path - must have star * prefix: It implements few hacks to tell what is being loaded: TCPDF is tricky about inserting images as HTML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |