tcpdf

How can I put new line(<br> or \\n) in TCPDF?

心不动则不痛 提交于 2019-12-02 13:25:53
I am new in this TCPDF. I am trying to make my own template using TCPDF. I changed the header logo for my project and also the header title. The question is how can I put new line or <br> if I am not in the <<<EOD EOD; / ' '; ? NOTE: I changed the header logo in my tcpdf_autoconfig and the header title in my tcpdf_config file.. I want to new line the example_016 after the image of baliao etc etc etc View <?php //============================================================+ // File name : example_016.php // Begin : 2008-03-04 // Last Update : 2013-05-14 // // Description : Example 016 for TCPDF

TCPDF remote image loading problem

[亡魂溺海] 提交于 2019-12-02 07:46:57
Im trying to load a remote image into a pdf generated by tcpdf however I can't seem to get it to work? The rest of the pdf loads fine and it looks like to trying to retrieve the image however it just does print to the page? The code I am using is: $pdf->Image("http://media.domain.com/logo.jpg", 0, 0, 100, 150, 'JPEG', '', 'T', true, 72,'','','','','','',''); Any help on this would be a massive help, Thanks, I think you need to set allow_url_fopen = On in php.ini It works for me $pdf->Image('http://chart.apis.google.com/chart?cht=ls&chd=t:1366,1459,2534,2551,2589&chco=76A4FB&chls=2.0,0.0,0.0

Write space with TCPDF into a PDF file

六眼飞鱼酱① 提交于 2019-12-02 07:11:21
问题 I've this simple script that write some text into a PDF trought the php library TCPDF. This is the script: // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('Label Creator'); $pdf->SetTitle('labels'); $pdf->SetSubject('Labels di prova'); $pdf->SetKeywords('TCPDF, PDF, example, test, guide'); // set default monospaced font $pdf->SetDefaultMonospacedFont

How can I create Malayalam PDF using TCPDF in PHP?

拥有回忆 提交于 2019-12-02 06:42:41
I am trying to create malayalam pdfs using TCPDF. As per the manual, i had converted the fonts (using http://fonts.snm-portal.com/ ) and had added them. It is working but is not working correctly. The words like 'ന്യൂഡല്ഹി, ഉത്തരവിട്ടെന്നും, എത്രയും'. are displayed as 'ന^യൂഡല്ഹി, ഉത^തരവിട^ടനെനും, എത^രയും'. I am using 'kartika.ttf' font now and had tried some other malayalam fonts. The database, tables, fields and the site are in 'utf-8' format. Is there any solution for this problem? Is it possible to show/save as pdf format using indian fonts? Scratch my last comment. As far as I've been able

codeigniter send pdf file as email attachment

情到浓时终转凉″ 提交于 2019-12-02 06:35:50
问题 I am generating pdf files on fly using TCPDF . By using TCPDF i am getting raw file with base64 encoded now i want to send this raw data as email attachment using codeigniter email helper function. How can do this? 回答1: Took my a while to find the answer, hope it helps anyone in the future: // Get email address and base64 via ajax $email = $this->input->post('email'); $base64 = $this->input->post('base64'); $base64 = str_replace('data:application/pdf;base64,', '', $base64); $base64 = str

TCPDF_import is not bringing in an existing file

冷暖自知 提交于 2019-12-02 03:32:38
问题 I have a PDF of a blank certificate, I want to fill in two lines when the user completes a course of study, and display the PDF so they can print or download it. I am using TCPDF to write the two lines on an existing PDF. Per suggestions in a previous post ( using PHP to fill in a PDF ), I am using TCPDF_IMPORT to bring an existing PDF into the object, and writing on top of it. However, the original PDF does NOT show on the screen, I am left with a blank document, with only the lines of text

Connection reset by peer: socket write error. What is wrong with my Java code

不打扰是莪最后的温柔 提交于 2019-12-02 02:43:22
问题 I am trying to create and maintain a TCP connection to a host from a standalone java application. Local port and server port is same = 8999. After connection, I have to send a msg to the server: < STX >username=fred&password=abcd< ETX > . The code for socket creation and message sending goes like: Socket socket = new Socket("mshxml.abcd.com", 8999, InetAddress.getLocalHost(), 8999); OutputStream outStream = socket.getOutputStream(); while (socket.isConnected()) { try { int stx = 2, etx = 3;

PHPWord to PDF not able to load library

半腔热情 提交于 2019-12-02 01:45:01
I have been trying all day to get this to work. Right now I am able to save the document as .docx file but I wanted to be able to save the document as PDF I have tried with DOMPDF and TCPDF but I keep getting error 'Unable to load PDF Library' I confirmed the path is correct. Am I missing something? thank you for your help $rendererName = \PhpOffice\PhpWord\Settings::PDF_RENDERER_TCPDF; $rendererLibrary = 'tcpdf.php'; $rendererLibraryPath = dirname(__FILE__) .'/plugins/tcpdf/' . $rendererLibrary; \PhpOffice\PhpWord\Settings::setPdfRenderer($rendererName,$rendererLibraryPath); $document->saveAs

TCPDF_import is not bringing in an existing file

陌路散爱 提交于 2019-12-02 01:39:52
I have a PDF of a blank certificate, I want to fill in two lines when the user completes a course of study, and display the PDF so they can print or download it. I am using TCPDF to write the two lines on an existing PDF. Per suggestions in a previous post ( using PHP to fill in a PDF ), I am using TCPDF_IMPORT to bring an existing PDF into the object, and writing on top of it. However, the original PDF does NOT show on the screen, I am left with a blank document, with only the lines of text I created. Below is what I have to this point - it yields ONLY the line "This is my test text." <?php /

Connection reset by peer: socket write error. What is wrong with my Java code

旧时模样 提交于 2019-12-02 00:49:35
I am trying to create and maintain a TCP connection to a host from a standalone java application. Local port and server port is same = 8999. After connection, I have to send a msg to the server: < STX >username=fred&password=abcd< ETX > . The code for socket creation and message sending goes like: Socket socket = new Socket("mshxml.abcd.com", 8999, InetAddress.getLocalHost(), 8999); OutputStream outStream = socket.getOutputStream(); while (socket.isConnected()) { try { int stx = 2, etx = 3; DataOutputStream dout = new DataOutputStream(outStream); dout.writeByte(stx); dout.writeBytes("username