pdf printed without text
in
Programming Questions
•
3 years ago
hi. This sketch creates an A4 PDF file. When I open ia a viewer it works but when I print it (even in preview) there is no text.
What's wrong?
Thanks.
What's wrong?
Thanks.
- import processing.pdf.*;
- int[] dim = {842,595};
- PFont font;
- void setup() {
- size(dim[0]*2, dim[1]*2, PDF, "linesAndTextPdf.pdf");
- background(255);
- font = createFont("Arial",48);
- textFont(font);
- fill(0);
- noLoop();
- }
- void draw() {
- line(dim[0], 0, dim[0], dim[1]*2);
- line(0, dim[1], dim[0]*2, dim[1]);
- text("Text",200,200);
-
- PGraphicsPDF pdf = (PGraphicsPDF) g;
- pdf.nextPage();
-
- text("Text 2!",200,200);
- line(dim[0], 0, dim[0], dim[1]*2);
- line(0, dim[1], dim[0]*2, dim[1]);
- exit();
- }
1
