Answers.Body: <p>No, I don't think there's a way of having a "live" pdf open, in the same way as a webpage. </p>
  
  <p>But, what I usually do is just open the pdf template directly in the browser and create the HTML and CSS while using my normal workflow to check how it looks in the browser. This usually get me 95% of the way, and then I can do the final tweaks when I see what dompdf makes of it.</p>
  
  <p>You need a variable <code>order</code> that's an OrderModel to make this work, so I just grab one like this at the top of my template or in my layout:</p>
  
  <pre><code>{% if not order is defined %}
      {% set order = craft.commerce.orders.first() %}
  {% endif %}
  </code></pre>
  
  <p>And if you want to test with different orders you can get one at random, or a specific one by id. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-21T18:41:40.730Z
Answers.Text: I kinda figured that'd be the case. Your method is good enough - should save some time! Thanks
Answers.UserDisplayName: taylor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-03T13:40:03.897Z
Answers.Text: Fortunately, the _Brave_ Browser does that.
Answers.UserDisplayName: Marcus Scheller
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-20T21:44:51.307Z
Answers.LastActivityDate: 2016-11-20T21:44:51.307Z
Answers.UserDisplayName: André Elvan
Body: <p>Is it possible to 'view' an order's PDF rather than download/create it first? I ask because I'm working on PDF templates and I can't figure out how to view the progress/changes I'm making without having to re-download a order PDF everytime. </p>
  
Tags: <templating><plugin-craftcommerce><pdf>
Title: Craft Commerce View Order PDF, Not Download
ThreadText: # Craft Commerce View Order PDF, Not Download
  
  (Asked by: username_0 on 2016-11-20)
  
  Is it possible to 'view' an order's PDF rather than download/create it first? I ask because I'm working on PDF templates and I can't figure out how to view the progress/changes I'm making without having to re-download a order PDF everytime.
  
  **Tags:** templating, plugin-craftcommerce, pdf
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-11-20. Score: 3 | Accepted answer
  
  No, I don't think there's a way of having a "live" pdf open, in the same way as a webpage.
  
  But, what I usually do is just open the pdf template directly in the browser and create the HTML and CSS while using my normal workflow to check how it looks in the browser. This usually get me 95% of the way, and then I can do the final tweaks when I see what dompdf makes of it.
  
  You need a variable `order` that's an OrderModel to make this work, so I just grab one like this at the top of my template or in my layout:
  
  ```
  {% if not order is defined %}
      {% set order = craft.commerce.orders.first() %}
  {% endif %}
  
  ```
  
  And if you want to test with different orders you can get one at random, or a specific one by id.
  
  > **Comments:**
  > **username_0**: I kinda figured that'd be the case. Your method is good enough - should save some time! Thanks  
  > **username_2**: Fortunately, the _Brave_ Browser does that.  
  
  ---
  
  