Skip to content

PDFs are incorrectly sized #1158

Closed
Closed
@chrisspurgeon

Description

@chrisspurgeon

Most appropriate sub-area of Processing 4?

Core/Environment/Rendering

Processing version

4.4.3+

Operating system

Mac OSX

Bug description

Beginning with Processing 4.4.3, when rendering out a PDF, the resulting PDF contains only to upper left quarter of the expected image, but magnified 2X so the upper left fills the entire PDF.

Steps to reproduce this

"1.Run this example code in Processing 4.4.3 or later on Mac OSX

import processing.pdf.*;

String PDFName = "Processing PDF render test.pdf";
void setup() {
  size(1395, 1395);
  beginRecord(PDF, PDFName);

  noLoop();
}

void draw() {
  background(255);


  translate(width/2, height/2);
  fill(55,55,100);
  ellipse(0, 0, width, height);


  endRecord();
} // end of draw()

  1. Examine the generated PDF. Note how the expected image (a circle) is incorrectly expanded and clipped.

3."

snippet

import processing.pdf.*;

String PDFName = "Processing PDF render test.pdf";
void setup() {
  size(1395, 1395);
  beginRecord(PDF, PDFName);

  noLoop();
}

void draw() {
  background(255);


  translate(width/2, height/2);
  fill(55,55,100);
  ellipse(0, 0, width, height);


  endRecord();
} // end of draw()

Additional context

No response

Would you like to work on the issue?

No, I’m just reporting the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions