Multiple Pages PDF generation error
in
Core Library Questions
•
1 year ago
I'm using Processing 1.5.1
The operating system is XP SP3
The hardware is a Sony Vaio VGN-FE21B
I tried this code, found at: http://processing.org/reference/libraries/pdf/index.html
Multiple Pages (No Screen Display)
The operating system is XP SP3
The hardware is a Sony Vaio VGN-FE21B
I tried this code, found at: http://processing.org/reference/libraries/pdf/index.html
Multiple Pages (No Screen Display)
It's possible to write every frame as a new page in the PDF document. This example creates a 100 page document:
- import processing.pdf.*;
- void setup() {
- size(400, 400, PDF, "filename.pdf");
- }
- void draw() { // Draw something good here
- line(0, 0, frameCount * 4, height);
- PGraphicsPDF pdf = (PGraphicsPDF) g; // Get the renderer
- pdf.nextPage(); // Tell it to go to the next page
- // When finished drawing, quit and save the file
- if (frameCount == 100) {
- exit();
- }
- }
1