Skip to the content.

Checkout our latest project

Donate to help keep this project maintained. Donate with PayPal button

Due to a lack of time, I will no longer Maintain this project, consider it Archived. If you wish to maintain, seek me out.

:star: If you use it, you should star it on Github! It’s the least you can do for all the work put into it!

Task2PDF

Convert a Task to a PDF, Printer Friendly!

What do?

To turn on CJK Support, go to Settings > Application Settings, and the toggle will be located toward the bottom of the page.

How can I make Task2pdf utilize my plugin?

1.) Utilize any hook that exists in the templates, to insert your own templates in desired locations.

template:subtask:table:header:before-timetracking
template:task:details:top
template:task:details:bottom
task2pdf:printlayout:beforedetails
task2pdf:printlayout:beforedescription
task2pdf:printlayout:beforesubtasks
task2pdf:printlayout:beforefiles
task2pdf:printlayout:beforeinternallinks
task2pdf:printlayout:beforecomments
task2pdf:printlayout:bottomoflayout

2.) For image display using internal links you have 2 options.

Option 1: Pass html to printModel->preparePrint function, and then through markdownPlus. Must have plugin MarkdownPlus installed $this->text->markdown($this->task->printModel->preparePrint($task['description']), isset($is_public) && $is_public)

Option 2: Prepend data:image/png;base64, to src in img tags, and base64_encode the image data <img src="data:image/png;base64,<?= base64_encode(file_get_contents(FILES_DIR.DIRECTORY_SEPARATOR.$image['path'])); ?>">

Screenshots?

Create PDF of a task

image

Create PDF of all open tasks in a project

image

Example PDF:

*Embeded files in PDF

image

Option panel located in Settings > Application Settings

image