# Why does my P3D sketch look weird as a PDF (and how to fix this?)

**URL:** <https://discourse.processing.org/t/why-does-my-p3d-sketch-look-weird-as-a-pdf-and-how-to-fix-this/11072>\
**Category:** Coding Questions\
**Created:** [May 9, 2019, 5:16pm UTC](https://discourse.processing.org/t/why-does-my-p3d-sketch-look-weird-as-a-pdf-and-how-to-fix-this/11072 "2019-05-09T17:16:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sorenkirk](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@sorenkirk](https://discourse.processing.org/u/sorenkirk)\
**Post date:** [May 9, 2019, 5:16pm UTC](https://discourse.processing.org/t/why-does-my-p3d-sketch-look-weird-as-a-pdf-and-how-to-fix-this/11072/1 "2019-05-09T17:16:09Z")

</div>

I have a sketch which looks very different in the Processing window than it does as an actual PDF. Would anyone be able to help me get this sketch to render well as a PDF?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [May 10, 2019, 12:21am UTC](https://discourse.processing.org/t/why-does-my-p3d-sketch-look-weird-as-a-pdf-and-how-to-fix-this/11072/2 "2019-05-10T00:21:56Z")

</div>

check again

> **[PDF Export / Libraries](https://processing.org/reference/libraries/pdf/index.html)**
>
> Create PDF files. These vector graphics files can be scaled to any size and printed at high resolutions.

about the PDF options,

> When using beginRaw() and endRaw(), it’s possible to write to either a 2D or 3D renderer. For instance, beginRaw() with the PDF library will write the geometry as flattened triangles and lines.

you could try example from this section:

> **Using createGraphics() to Create a PDF File**

---

<div class="post-metadata">

**Author:** ![sorenkirk](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@sorenkirk](https://discourse.processing.org/u/sorenkirk)\
**Post date:** [May 10, 2019, 4:10am UTC](https://discourse.processing.org/t/why-does-my-p3d-sketch-look-weird-as-a-pdf-and-how-to-fix-this/11072/3 "2019-05-10T04:10:15Z")

</div>

How would that be done here? I experimented and couldn’t get it to work

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [May 10, 2019, 4:39am UTC](https://discourse.processing.org/t/why-does-my-p3d-sketch-look-weird-as-a-pdf-and-how-to-fix-this/11072/4 "2019-05-10T04:39:39Z")

</div>

show that code please,  
anyway stay close to the example you find in that manual.
