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

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.

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:
Printing as PDF from browser
Zooming in in browser and making screenshot

I was on this page.

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

Thanks a lot!

1 Like

Hey there optimaprima,

The visual result of the code looks nifty design wise! :+1:

I never used Processing or P5 to export for print, but I remember a post 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?

Hey There!

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

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.

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

Hey There!

There does seem to be a way using pure JS

There is also a tutorial on print

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.


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 :stuck_out_tongue_winking_eye:

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

1 Like