# Would like display the pdf in the 3d space

**URL:** https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093
**Category:** Questions
**Tags:** material
**Created:** [September 11, 2020, 12:25pm UTC](https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093 "2020-09-11T12:25:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Krishna\_Kishore](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_kishore/32/3682_2.png) [@Krishna\_Kishore](https://forum.babylonjs.com/u/Krishna_Kishore)
#### Post date: [September 11, 2020, 12:25pm UTC](https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093/1 "2020-09-11T12:25:59Z")

</div>

Would like display the pdf in the 3d space, how to do it , can you refer me to some exmaples

---

<div class="post-metadata">

### Author: ![REX\_DUNGEUR](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rex_dungeur/32/17559_2.png) [@REX\_DUNGEUR](https://forum.babylonjs.com/u/REX_DUNGEUR)
#### Post date: [September 11, 2020, 1:28pm UTC](https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093/2 "2020-09-11T13:28:21Z")

</div>

var scene = new BABYLON.Scene(engine);  
var camera = new BABYLON.FreeCamera(“camera1”, new BABYLON.Vector3(0, 5, -10), scene);  
// This targets the camera to scene origin  
camera.setTarget(BABYLON.Vector3.Zero());  
// This attaches the camera to the canvas  
camera.attachControl(canvas, true);

---

<div class="post-metadata">

### Author: ![waverider404](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/waverider404/32/17464_2.png) [@waverider404](https://forum.babylonjs.com/u/waverider404)
#### Post date: [September 11, 2020, 2:04pm UTC](https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093/3 "2020-09-11T14:04:24Z")

</div>

@Krishna_Kishore

Hello,  
you can simply use pdf.js [Examples](https://mozilla.github.io/pdf.js/examples/)  
then you can use dynamic texture to convert the rendered pdf into usable canvas context or simply use canvas.todataurl.

Here’s an example I made for you  
[https://www.babylonjs-playground.com/#32HPCB#1](https://www.babylonjs-playground.com/#32HPCB#1)

you can learn about other available api  
[https://mozilla.github.io/pdf.js/api/](https://mozilla.github.io/pdf.js/api/)

---

<div class="post-metadata">

### Author: ![Krishna\_Kishore](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_kishore/32/3682_2.png) [@Krishna\_Kishore](https://forum.babylonjs.com/u/Krishna_Kishore)
#### Post date: [September 12, 2020, 11:45am UTC](https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093/4 "2020-09-12T11:45:35Z")

</div>

@waverider404 can you please let me know how to render the pdf with orignal colors, in example document is have some grey sade

---

<div class="post-metadata">

### Author: ![waverider404](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/waverider404/32/17464_2.png) [@waverider404](https://forum.babylonjs.com/u/waverider404)
#### Post date: [September 12, 2020, 4:50pm UTC](https://forum.babylonjs.com/t/would-like-display-the-pdf-in-the-3d-space/14093/5 "2020-09-12T16:50:56Z")

</div>

This is much better, i used backgroundmaterial  
[https://www.babylonjs-playground.com/#32HPCB#3](https://www.babylonjs-playground.com/#32HPCB#3)
