# PDF library is only exporting corner of image

**URL:** <https://discourse.processing.org/t/pdf-library-is-only-exporting-corner-of-image/40590>\
**Category:** Coding Questions\
**Created:** [January 14, 2023, 9:15pm UTC](https://discourse.processing.org/t/pdf-library-is-only-exporting-corner-of-image/40590 "2023-01-14T21:15:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asymmetric](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/asymmetric/32/16577_2.png) [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Post date:** [January 14, 2023, 9:15pm UTC](https://discourse.processing.org/t/pdf-library-is-only-exporting-corner-of-image/40590/1 "2023-01-14T21:15:12Z")

</div>

Hi! My goal is to make a high resolution PDF of my processing sketch so I can print it large. When using the following PDF library I am only getting a portion of the sketch. Why is this? My sketch is size(900, 900);

```auto
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(); }

```

This is the output:

 ![Screen Shot 2023-01-14 at 1.14.40 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/b/fb624d32efc45cfc9508b6004d1cf6667840a89f.jpeg)

---

<div class="post-metadata">

**Author:** ![asymmetric](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/asymmetric/32/16577_2.png) [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Post date:** [January 14, 2023, 9:31pm UTC](https://discourse.processing.org/t/pdf-library-is-only-exporting-corner-of-image/40590/2 "2023-01-14T21:31:55Z")

</div>

I figure it out! After I removed pixelDensity(2); the sketch successfully exported!
