I need help with a small code. I have created a HTML page that has many author names as a link. I have also created a custom pdf generator using tcpdf. Now, I need to know how do I get the authors name mentioned in the HTML on to the pdf PHP page?
HTML page is not a form. So i reckon I cant use $_POST or &_Get?
Related
I have found an example online using DomPDF and a template.html file on an invoice that is verry handy.
is there a way to do the same with TCPDF?
I have a form that generates a table with dynamic content and then by pressing a button if prints it on to a pdf but in a rudementery style.
By using a template thing would come out nicer.
Can it be done ?
thank you all
I have a scanned pdf. The top of the pdf is a signed form and the bottom is a section that people can sign to subscribe to the contract. I have a form that can autopopulate the bottom portion although, since it is a scanned pdf, it has no form fields. Does anyone have a solution where using PHP a person can fill out the form and then autopopulate the bottom of the pdf with the data or create a layer over it with the data and merge it into one pdf. Another option possibly is to automatically add the top portion as an image with the form below it. Thank you in advance for your help.
Here is a link to a sample pdf.
You can use FPDI to write text into a template PDF file. See this example.
I am trying to create an editable HTML textarea component using TCPDF API library. I want to display a scrollable text box on the screen.
Can this be done?
Current TCPDF examples include these: https://tcpdf.org/examples/
I know PDFs can have editable components, but I am not sure how to create them with TCPDF, if it is at all possible.
TD;DR: how can I generate a page with a scrollable textarea using PHP + TCPDF?
Linked Answer using another library (mPDF):
Note that while How to create editable Pdf form in php may work, it does not make use of TCPDF library. My existing codebase relies heavily on TCPDF, I would like to explore the possibility of using TCPDF before I consider adding another library ...
i.e. I rather have an answer of "Not possible" than to use another library at this time.
It looks like the issue is two-fold.
First, you can use a typical form example, like here: https://tcpdf.org/examples/example_054/
However, you cannot see editable fields in a browser, at least you cannot in Mozilla Firefox 56.0.2 as the time of this writing. (https://support.mozilla.org/en-US/questions/1006115)
What you need to do is open the generated PDF in a different viewer that supports editable form fields, such as Adobe PDF reader/other.
Then you can fill out the textarea and if text size exceeds the area of the form element, it will have scroll bars added to the textarea.
I want to send a dynamic page for printing to labels using Fpdf, however I'm not entirely sure how to get Fpdf to display the contents of my php file.
The php file renders a page with the users url, avatar, custom user background and name in a contactcard.php file.
How would i go about sending this to PDF, using Fpdf?
I have tried creating a function but it will not print images in the PDF.
I've done a similar thing with a real estate property listing. I've output text and images to a pdf for saving or printing using fpdf and php.
I used a form with hidden fields. Click the form button then it goes to the fpdf page. The form uses Post so I can retrieve the data on the fpdf page with something like...
$username = $_POST(username);
The way I've included images is to link to the images directly, well kind of. I have an id retrieved from the database which I include in the file name to display the correct image e.g.
$image = "http://www.yourdomain.com/img/avatar_$id.jpg";
Then you would display them with fpdf like...
$pdf->Cell(10,0,$username,0,0);
$pdf->Image($image,30,36);
You could use sessions so you don't have to include a form. That should work also. Might be more suitable in your case.
I hope this is what you're after.
I am working on ckeditor in my php code. I would like to get some external html content displayed on ckeditor so that users can edit the content like they want. Please let me know how can I accomplish this.