Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
ab1202
ab1202's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
pdf printed without text
[2 Replies]
24-Oct-2010 08:59 AM
Forum:
Programming Questions
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.
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();
}
«Prev
Next »
Moderate user : ab1202
Forum