# Printable graphic needed: Processed graphic doesn't fit canvas (SVG export doesn't work as either)

**URL:** <https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861>\
**Category:** Libraries\
**Created:** [June 5, 2019, 3:05pm UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861 "2019-06-05T15:05:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![optimaprima](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@optimaprima](https://discourse.processing.org/u/optimaprima)\
**Post date:** [June 5, 2019, 3:05pm UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/1 "2019-06-05T15:05:02Z")

</div>

Hi there,

I am totally new to p5.js and I need this for my master thesis. I had this concept for a book that has some illustrations made with generated design.

[For example this code.](https://editor.p5js.org/generative-design/sketches/P_3_1_3_04)

Maybe someone can help to fit this graphic into a bigger canvas so I can geht a better result when saving it as a graphic from Firefox. If the SVG thing won’t happen.

* * *

Old Text starts here

* * *

I use sublime as an editor and there is a function for creating a png when pushing the Ctrl button. But the resolution isn’t high enough. SVG or vector PDf would be perfect, but every tutorial and library I found doesn’t work with that code. What am I doing wrong? I really need this, the time is running and I am sitting for hours figuring out how to get a better result than a 72 dpi screenshot.

**I trid:**  
p5.svg.js  
basil.js  
jspdf.js  
Printing as PDF from browser  
Zooming in in browser and making screenshot

[I was on this page.](https://processing.org/tutorials/print/?fbclid=IwAR1Qt9WXPfgDphyX7rI9dirln139r8CoYZ89W9P5o2-IrerMNPFpLjT9K-g)

But I can’t figure it out. Please help me. What do I have to do?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Tiemen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tiemen/32/5477_2.png) [@Tiemen](https://discourse.processing.org/u/Tiemen)\
**Post date:** [June 5, 2019, 9:32pm UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/2 "2019-06-05T21:32:11Z")

</div>

Hey there optimaprima,

The visual result of the code looks nifty design wise! 👍

I never used Processing or P5 to export for print, but I remember a [post](https://forum.processing.org/one/topic/saveframe-in-high-resolution.html) where someone asked how to save images with a higher dpi where _jbum_ explains various ways to do so. Do any of his suggestions help?

---

<div class="post-metadata">

**Author:** ![InferNova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/infernova/32/6009_2.png) [@InferNova](https://discourse.processing.org/u/InferNova)\
**Post date:** [June 5, 2019, 11:34pm UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/3 "2019-06-05T23:34:12Z")

</div>

Hey There!

Not at the computer currently but did you try just to set the size of the canvas ambiguously large and do save() ?

---

<div class="post-metadata">

**Author:** ![optimaprima](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@optimaprima](https://discourse.processing.org/u/optimaprima)\
**Post date:** [June 6, 2019, 5:03am UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/4 "2019-06-06T05:03:53Z")

</div>

Hi, yes I tried but this code doesn‘t fit to it. It stays small. I tried also to rise the font size but something stops it to just get bigger.

---

<div class="post-metadata">

**Author:** ![optimaprima](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@optimaprima](https://discourse.processing.org/u/optimaprima)\
**Post date:** [June 6, 2019, 5:18am UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/5 "2019-06-06T05:18:17Z")

</div>

Thank you Tiemen! I will try this after work. Hopefully I can implement this in p5.js

---

<div class="post-metadata">

**Author:** ![InferNova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/infernova/32/6009_2.png) [@InferNova](https://discourse.processing.org/u/InferNova)\
**Post date:** [June 6, 2019, 2:06pm UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/6 "2019-06-06T14:06:52Z")

</div>

Hey There!

There does seem to be a way using pure JS

> <https://stackoverflow.com/questions/2483919/how-to-save-svg-canvas-to-local-filesystem>

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [June 6, 2019, 2:58pm UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/7 "2019-06-06T14:58:23Z")

</div>

There is also a tutorial on print

---

<div class="post-metadata">

**Author:** ![optimaprima](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@optimaprima](https://discourse.processing.org/u/optimaprima)\
**Post date:** [June 7, 2019, 9:19am UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/8 "2019-06-07T09:19:40Z")

</div>

Thank you for all suggestions, I can’t figure it out and had to look for an other solution. But I realy will try this out after I finished my master, the time is running.

---

<div class="post-metadata">

**Author:** ![Tiemen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tiemen/32/5477_2.png) [@Tiemen](https://discourse.processing.org/u/Tiemen)\
**Post date:** [June 7, 2019, 9:35am UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861/9 "2019-06-07T09:35:22Z")

</div>

Too bad the suggestions didn’t work out with the limited time you had. Adjusting your choices when the deadline is drawing closer is a common problem within many design processes though 😜

Keep us posted when you pick it up again and good luck with graduating!
