Export PDF and Background
in
Core Library Questions
•
1 year ago
Hi everybody;
when i used the "Many pages" example from pdf export example, i just can't get the background shown on the preview. like this:
The pdf file is just white and automatically refresh my sketch. like this:
How can i get the line superposition i have on the original file? Thanks :-)
here is my code:
- import processing.pdf.*;
- PGraphicsPDF pdf;
- void setup() {
- size(600, 600);
- frameRate(4);
- pdf = (PGraphicsPDF)beginRecord(PDF, "Lines.pdf");
- beginRecord(pdf);
- background(255);
- }
- void draw() {
- stroke(0, 20);
- strokeWeight(20.0);
- line(mouseX, 0, width-mouseY, height);
- pdf.nextPage();
- }
- void mousePressed() {
- endRecord();
- exit();
- }
1