# "Task2PDF", "PublicLink" and "Send Task By Email" only intgrate pictures from external sources

**URL:** <https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340>\
**Category:** Plugins\
**Created:** [August 11, 2022, 12:30pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340 "2022-08-11T12:30:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [August 11, 2022, 12:30pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/1 "2022-08-11T12:30:05Z")

</div>

Effect as per Subject, see attached “screenshots” from PDF

* * *

 ![270_Images only shown from external sources_1](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/f/f34f28bae1ba4d433b9e05470e4bef3943e461be.png)

* * *

 ![270_Images only shown from external sources_2](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/4/4bccdd9e280fbe137e4068f12bc98ce7a50192c9.png)

* * *

Any Ideas how to persuade the pugin to show all pictures?

CU

Rainer

---

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [August 11, 2022, 12:35pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/2 "2022-08-11T12:35:09Z")

</div>

## Problem is NOT limited to Task2PDF

Same ugly effect in Send Task per Email. Kanboard Attachment pictures aremissing, only the one from external source shown.

---

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [August 11, 2022, 12:42pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/3 "2022-08-11T12:42:42Z")

</div>

Also “Public Link” affected, see #2194

---

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [August 17, 2022, 5:37pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/4 "2022-08-17T17:37:18Z")

</div>

And not related to aplugin. I did a test in an extra instllation without any installed plugin, here the [public link](https://depot3l.kanban.bielefeldundbuss.de/?controller=TaskViewController&action=readonly&task_id=4&token=abd090cb552db17595256026f4086105f3baec1bb69a1b499c9ae94477a2)!

- Expected: public link shows local “Attached Picture” with fire-fighting truck; and the “External picture”, a woman in front of bulue sky below
- actual: only external picture shown.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [August 20, 2022, 10:44pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/5 "2022-08-20T22:44:09Z")

</div>

“Task2PDF” will attach files that are “attached” to a task. Best I could do at the time I wrote it, it was over my head at the time.

What that means is, although the PDF isn’t rendering them, if you look at the files attached to the PDF, you will see the files. Find the Paperclip in Acrobat, and there you will see the attachments.

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/0/04a1939e555c2de9e031c987a0de7699ae5cc3b2.png)

---

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [August 21, 2022, 7:54am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/6 "2022-08-21T07:54:18Z")

</div>

> [@creecros](#):
>
> Find the Paperclip

Ah, thank you for the hint. Not optimum, because assignment of PDF attachments to PDF contents is not clear, but, of course, much better than no attachment at all.

But of course, best would be to have the images at their place in the PDF contents.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 3, 2022, 1:32am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/7 "2022-11-03T01:32:31Z")

</div>

So the good news is, after hours of hacking away trying to find a solution, I finally solved it. Talk about a pain in the ass. But I can make all the images display on the page.

Bad news is, I need to spend hours more hacking away at formatting the images to fit nicely on the page.  
I’m just not good a front end styling and layout.

I am open to any assistance…i’m not sure I have it in me.

---

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [November 3, 2022, 5:44am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/8 "2022-11-03T05:44:28Z")

</div>

I really really like good news.Thx

---

<div class="post-metadata">

**Author:** ![RainerBielefeld](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/rainerbielefeld/32/1076_2.png) [@RainerBielefeld](https://kanboard.discourse.group/u/RainerBielefeld)\
**Post date:** [November 3, 2022, 6:09am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/9 "2022-11-03T06:09:31Z")

</div>

Unfortunately I can’t help at all.

---

<div class="post-metadata">

**Author:** ![alfredb](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/alfredb/32/1051_2.png) [@alfredb](https://kanboard.discourse.group/u/alfredb)\
**Post date:** [November 3, 2022, 9:47am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/10 "2022-11-03T09:47:20Z")

</div>

> [@creecros](#):
>
> I’m just not good a front end styling and layout.

I’m not either. But AFAIK, @aljawaid is a front end guy. 😉

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 3, 2022, 10:26am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/11 "2022-11-03T10:26:44Z")

</div>

i might have spoken too soon, i found a couple instances where dompdf just dies trying to interpret the screenshots in the description. not quite there yet.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 3, 2022, 3:31pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/12 "2022-11-03T15:31:53Z")

</div>

Never mind, I got it working again, so here is an example, before any formatting etc…just testing it will work with any internal kanboard images, including the Paste Image to Markdown plugin.

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/b/b74543d69518ba8b63604ee8cdd51bfc4985de00.jpeg)  
 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/2/2553d56ba94bb649c4ac3667ad17f0abcdae98c6.png)

Now I need someone to fromat these…

Here is a WIP branch, which clearly has issue, as it is a Work In Progress.

---

<div class="post-metadata">

**Author:** ![Stehlel](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/stehlel/32/1247_2.png) [@Stehlel](https://kanboard.discourse.group/u/Stehlel)\
**Post date:** [November 3, 2022, 3:56pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/13 "2022-11-03T15:56:40Z")

</div>

Hey,

i appreciate the work you and all the other great contributers have done to make kanboard a very great and customisable tool.

I will be looking into it, if i can help with the formatting issue!

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 3, 2022, 4:37pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/14 "2022-11-03T16:37:37Z")

</div>

If you need any explanations let me know.

It’s a bit different than normal frontend stuff, but for the most part, all the layouts are in the Template/printlayout folder. Those templates are only utilized for creating the print layouts, that get sent to dompdf to create the PDF. Aside from that, the print model and controller do a bit as well, mostly the model, which parses out the img tags `src` data, gets the img content, base64 encodes it, and replaces the src data, and then shoots it through the Markdown helper to handle the rest of the markdown, and finally that all gets sent to dompdf to create the pdf…

---

<div class="post-metadata">

**Author:** ![Stehlel](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/stehlel/32/1247_2.png) [@Stehlel](https://kanboard.discourse.group/u/Stehlel)\
**Post date:** [November 3, 2022, 4:55pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/15 "2022-11-03T16:55:09Z")

</div>

Yes, thank you was about to ask about that but found there on my own! 🙂

Ehm i think i got it, please correct me if im wrong. But you had it right, before you “fixed” it 😃

You removed the table you had in before which basically did any formatting you needed?

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/6/6fbe33014ad906152fdd3503642c444ed038f762.png)

i created a pull request, please have a look at it and tell me if theres anything else to do. I will check back in from work tomorrow.

greetings

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 3, 2022, 5:19pm UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/16 "2022-11-03T17:19:10Z")

</div>

that is a small portion of the issue.

Yes, I removed the table I originally had. Mainly because at the time I was only worried about getting the images to work, those were the easy ones tho. Although I would say, to ensure large images aren’t too large on the sheet, making the PDF 5 pages, it would be nice to thumbnail size those.

The main issue is in the “Description” of the task. You will need MarkdownPlus and PITM to test this, but here is the outcome:

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/a/a8c179668a9acc6084fd1f57b17a9b673f3ee137.png)

results in:

 ![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/2X/7/75f808965fb6f6009de1a5d2e26ac1ce51ad5bf8.jpeg)

The image is so large, it covers the description. I am not sure how to account for this.

---

<div class="post-metadata">

**Author:** ![Stehlel](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/stehlel/32/1247_2.png) [@Stehlel](https://kanboard.discourse.group/u/Stehlel)\
**Post date:** [November 4, 2022, 12:34am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/17 "2022-11-04T00:34:35Z")

</div>

Ok that went past me earlier, was almost done with my time at work so i was a bit in a hurry ^^

This time i just created a style element (i dont think its important in which file it is lol, since you dont have a dedicated css file for the plugin) which limits images to 100% of the available space, which is defined in the respective containers they are in.

Works perfectly well for my new basic test environment:  
Fresh Setup  
Task2pdf, MarkdownPlus, PITM

I used to extremely large pictures (4480x1080 and 1080x4480) to test it, no weird behaviour whatsoever.

Since i am not a Frontend guy either, i wasted 4 hours trying to solve it in the backend but nope 😕

```php
    <style>
	img {
		max-width:100%;
		max-height:100%;
	}
    </style>

```

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 4, 2022, 12:50am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/18 "2022-11-04T00:50:20Z")

</div>

Ya i dont know, even with that, I’m getting a 10page PDF.

[https://www.nachostudio.ml/task/4](https://www.nachostudio.ml/task/4)

username: admin  
pw: admin

---

<div class="post-metadata">

**Author:** ![aljawaid](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/aljawaid/32/1090_2.png) [@aljawaid](https://kanboard.discourse.group/u/aljawaid)\
**Post date:** [November 4, 2022, 1:16am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/19 "2022-11-04T01:16:53Z")

</div>

this doesnt work

```auto
Fatal error: Uncaught Error: Class "ParsedownExtra" not found in /var/www/app/plugins/MarkdownPlus/vendor/leblanc-simon/parsedown-checkbox/ParsedownCheckbox.php:10 Stack trace: #0 /var/www/app/plugins/MarkdownPlus/vendor/composer/autoload_real.php(55): require() #1 /var/www/app/plugins/MarkdownPlus/vendor/composer/autoload_real.php(38): composerRequire65a8882e640840f82a5b23de49691603() #2 /var/www/app/plugins/MarkdownPlus/vendor/autoload.php(12): ComposerAutoloaderInit65a8882e640840f82a5b23de49691603::getLoader() #3 /var/www/app/plugins/MarkdownPlus/Helper/MarkdownPlusHelper.php(5): require('...') #4 /var/www/app/vendor/composer/ClassLoader.php(476): include('...') #5 /var/www/app/vendor/composer/ClassLoader.php(344): Composer\Autoload\includeFile() #6 /var/www/app/app/Core/Helper.php(102): Composer\Autoload\ClassLoader->loadClass() #7 /var/www/app/vendor/pimple/pimple/src/Pimple/Container.php(122): Kanboard\Core\Helper->Kanboard\Core\{closure}() #8 /var/www/app/app/Core/Helper.php(86): Pimple\Container->offsetGet() #9 /var/www/app/app/Core/Helper.php(74): Kanboard\Core\Helper->getHelper() #10 /var/www/app/app/Helper/FormHelper.php(191): Kanboard\Core\Helper->__get() #11 /var/www/app/app/Template/auth/index.php(14): Kanboard\Helper\FormHelper->label() #12 /var/www/app/app/Core/Template.php(83): include('...') #13 /var/www/app/app/Helper/LayoutHelper.php(188): Kanboard\Core\Template->render() #14 /var/www/app/app/Helper/LayoutHelper.php(42): Kanboard\Helper\LayoutHelper->pageLayout() #15 /var/www/app/app/Controller/AuthController.php(30): Kanboard\Helper\LayoutHelper->app() #16 /var/www/app/app/Core/Controller/Runner.php(77): Kanboard\Controller\AuthController->login() #17 /var/www/app/app/Core/Controller/Runner.php(31): Kanboard\Core\Controller\Runner->executeController() #18 /var/www/app/index.php(9): Kanboard\Core\Controller\Runner->execute() #19 {main} thrown in /var/www/app/plugins/MarkdownPlus/vendor/leblanc-simon/parsedown-checkbox/ParsedownCheckbox.php on line 10

```

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 4, 2022, 1:24am UTC](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340/20 "2022-11-04T01:24:28Z")

</div>

ya, try now, i was in the process of updating the package

its my dev server, so at any given time i could be doing something 🙂

[Next page](https://kanboard.discourse.group/t/task2pdf-publiclink-and-send-task-by-email-only-intgrate-pictures-from-external-sources/2340.md?page=2)
