PDF export does not work quite well in Processing 4.5.7

I just installed the new version of Processing (4.5.7) and I found that old sketches which worked well in Processing 4.4.1 are not exporting the PDF correctly.

Is there any change? According to the Documentation page of PDFexport, there is not.
Thanks!

ALSO: I connot open the sketches in previous versions of Processing!

Hello @lalibarriere and welcome! :slightly_smiling_face:

This might be related to the recent changes to pixel density in Processing. Try adding pixelDensity(1) in your setup function. See this page for more info.

void setup(){
    pixelDensity(1);
}

If the problem persists, could you share a small sketch that reproduces the PDF export issue?

Can you describe what happens when you try? Which version are you testing? Do you get an error message, a crash, or something else? Are you using Windows, Linux, macOS? Can you share a small sketch that has this issue?

Thank you.

I use macOS and what happend is that after installing 4.5.7, previous versions didn’t open the sketches. The older version opened, with a new empty sketch, but not the sketch I wanted.

Anyway, I removed all the files in the system related with Processing preferences and eliminated the 4.5.7 version, and I work with 4.4.1.

Now I have to re-install it and try the “density” trick.

Thank you!!!

I’m not sure I completely understand the problem you’re describing, but here’s my best guess.

When you double-click a .pde file, it opens with the latest installed version of Processing by default, for you now that is 4.5.7. As far as I remember, this has always been the case.

If you want to open a sketch in an older version of Processing, you can still launch that version first, then use File > Open then select your sketch, or open it via the sketchbook if your sketches are stored there.

Are you saying that this no longer works after installing 4.5.7? Also, which other versions have you used in the past besides 4.4.1?

The pixelDensity(1) fix is worth trying. Strange that the older Processing version stopped opening the existing sketches too. Hopefully the PDF export works normally after reinstalling 4.5.7.