pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r927905 - in /websites/staging/pdfbox/trunk/content: ./ cookbook/documentcreation.html
Date Tue, 04 Nov 2014 15:16:41 GMT
Author: buildbot
Date: Tue Nov  4 15:16:41 2014
New Revision: 927905

Log:
Staging update by buildbot for pdfbox

Modified:
    websites/staging/pdfbox/trunk/content/   (props changed)
    websites/staging/pdfbox/trunk/content/cookbook/documentcreation.html

Propchange: websites/staging/pdfbox/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Nov  4 15:16:41 2014
@@ -1 +1 @@
-1636517
+1636601

Modified: websites/staging/pdfbox/trunk/content/cookbook/documentcreation.html
==============================================================================
--- websites/staging/pdfbox/trunk/content/cookbook/documentcreation.html (original)
+++ websites/staging/pdfbox/trunk/content/cookbook/documentcreation.html Tue Nov  4 15:16:41
2014
@@ -158,22 +158,18 @@
                  <h2 id="document-creation">Document Creation</h2>
 <h3 id="create-a-blank-pdf">Create a blank PDF</h3>
 <p>This small sample shows how to create a new PDF document using PDFBox.</p>
-<div class="codehilite"><pre><span class="c1">// Create a new empty document</span>
-<span class="n">PDDocument</span> <span class="n">document</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">PDDocument</span><span
class="o">();</span>
-
-<span class="c1">// Create a new blank page and add it to the document</span>
-<span class="n">PDPage</span> <span class="n">blankPage</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">PDPage</span><span
class="o">();</span>
-<span class="n">document</span><span class="o">.</span><span class="na">addPage</span><span
class="o">(</span> <span class="n">blankPage</span> <span class="o">);</span>
-
-<span class="c1">// Save the newly created document</span>
-<span class="n">document</span><span class="o">.</span><span class="na">save</span><span
class="o">(</span><span class="s">&quot;BlankPage.pdf&quot;</span><span
class="o">);</span>
-
-<span class="c1">// finally make sure that the document is properly</span>
-<span class="c1">// closed.</span>
-<span class="n">document</span><span class="o">.</span><span class="na">close</span><span
class="o">();</span>
-</pre></div>
-
-
+<p>````java
+// Create a new empty document
+PDDocument document = new PDDocument();</p>
+<p>// Create a new blank page and add it to the document
+PDPage blankPage = new PDPage();
+document.addPage( blankPage );</p>
+<p>// Save the newly created document
+document.save("BlankPage.pdf");</p>
+<p>// finally make sure that the document is properly
+// closed.
+document.close();
+````</p>
 <h3 id="hello-world-using-a-pdf-base-font">Hello World using a PDF base font</h3>
 <p>This small sample shows how to create a new document and print the text "Hello World"
using one of the PDF base fonts.</p>
 <div class="codehilite"><pre><span class="c1">// Create a document and
add a page to it</span>



Mime
View raw message