New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Frame (No Screen Display) PDF broken #3280

Closed
shiffman opened this Issue May 13, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@shiffman
Member

shiffman commented May 13, 2015

In 3.0a7, the example from the reference is not working:

https://processing.org/reference/libraries/pdf/

import processing.pdf.*;

void setup() {
  size(400, 400, PDF, "filename.pdf");
}

void draw() {
  // Draw something good here
  line(0, 0, width/2, height);

  // Exit the program 
  println("Finished.");
  exit();
}
Because you're not running from the PDE, add this to your code:
public String sketchRenderer() {
  return "processing.pdf.PGraphicsPDF";
}

Adding the requested method results in:

java.lang.NullPointerException
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:230)

Apologies if this is known as I know renderer work is in progress. I'll be testing other examples today and will follow-up in this thread.

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman May 13, 2015

Member

"Single Frame (With Screen Display)" does, in fact, work correctly.

Member

shiffman commented May 13, 2015

"Single Frame (With Screen Display)" does, in fact, work correctly.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 13, 2015

Member

Ugh, ok.

Member

benfry commented May 13, 2015

Ugh, ok.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 14, 2015

Member

Interesting, this is actually a bug in how size() is parsed. It's just not shown up until now, when we're getting pickier about how the renderer is specified.

Member

benfry commented May 14, 2015

Interesting, this is actually a bug in how size() is parsed. It's just not shown up until now, when we're getting pickier about how the renderer is specified.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 16, 2015

Member

Fixed for 3.0a8.

Member

benfry commented May 16, 2015

Fixed for 3.0a8.

@benfry benfry closed this May 16, 2015

benfry added a commit that referenced this issue May 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment