Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to extract GTextArea text to a PDF file

$
0
0

I have a GTextArea (using g4p_controls.*) which has text within it. What would be the easiest way to extract the text from within the GTextArea and output that text to a PDF file? I do not want the control itself to be "printed" to the PDF file, only the text within it.

I am a bit confused by the processing.pdf.* library and don't really understand how to achieve this goal.

I have the string of text that I would like to send to the pdf file: String dataToSave = join(textArea.getTextAsArray(), '\r');

How do I then create the pdf file from that text? This page does not really show how to export text: https://processing.org/reference/libraries/pdf/index.html


Viewing all articles
Browse latest Browse all 2896

Trending Articles