-1

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.

4
  • You'll need to do some more homework before this is on-topic, right now it's way too abstract and there's a multitude of ways this could work out, each of which is a lot to explain.
    – tadman
    Nov 2, 2017 at 21:02
  • Possible duplicate of How to create editable Pdf form in php
    – user6763587
    Nov 2, 2017 at 21:03
  • @tadman, what kind of homework do I need to do? I need an editable HTML textarea component using TCPDF. How can I make this into a more concrete question?
    – Dennis
    Nov 2, 2017 at 21:25
  • You'll need to have some code, any code, that demonstrate what you're trying to do. If you're note even sure where to start, that's fine, but it's off-topic here. If you need mentoring or coaching try services like Codementor, Savvy, Hackhands, or airpair.
    – tadman
    Nov 2, 2017 at 21:29

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.