Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4544C200BD7 for ; Sun, 11 Dec 2016 09:46:16 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 43BC1160B20; Sun, 11 Dec 2016 08:46:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9320D160B07 for ; Sun, 11 Dec 2016 09:46:14 +0100 (CET) Received: (qmail 31193 invoked by uid 500); 11 Dec 2016 08:46:13 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 31184 invoked by uid 99); 11 Dec 2016 08:46:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Dec 2016 08:46:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A65C2E35C8; Sun, 11 Dec 2016 08:46:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: msahyoun@apache.org To: commits@pdfbox.apache.org Message-Id: <41938487c0a34c3aa6602324bfeed600@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: pdfbox-docs git commit: Site checkin for project Apache PDFBox Website Date: Sun, 11 Dec 2016 08:46:13 +0000 (UTC) archived-at: Sun, 11 Dec 2016 08:46:16 -0000 Repository: pdfbox-docs Updated Branches: refs/heads/asf-site b9520b6fc -> 1f5ba131b Site checkin for project Apache PDFBox Website Project: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/commit/1f5ba131 Tree: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/tree/1f5ba131 Diff: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/diff/1f5ba131 Branch: refs/heads/asf-site Commit: 1f5ba131b305afaedd6b2252ed060d9a0e986097 Parents: b9520b6 Author: Maruan Sahyoun Authored: Sun Dec 11 09:46:09 2016 +0100 Committer: Maruan Sahyoun Committed: Sun Dec 11 09:46:09 2016 +0100 ---------------------------------------------------------------------- content/1.8/architecture.html | 26 +-- content/1.8/faq.html | 48 ++--- content/2.0/cookbook/encryption.html | 42 ++-- content/2.0/faq.html | 48 ++--- content/download.html | 92 ++++----- content/index.html | 24 +-- .../news/2016/12/09/pdfbox-1.8.13-released.html | 200 ------------------- 7 files changed, 140 insertions(+), 340 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/1.8/architecture.html ---------------------------------------------------------------------- diff --git a/content/1.8/architecture.html b/content/1.8/architecture.html index 27ba0c4..a339df9 100644 --- a/content/1.8/architecture.html +++ b/content/1.8/architecture.html @@ -247,21 +247,21 @@ doesn’t provide the functionality needed.

A page in a pdf document is represented with a COSDictionary. The entries that are available for a page can be seen in the PDF Reference and an example of a page looks like this:

-

text -<< +

<<
     /Type /Page
     /MediaBox [0 0 612 915]
     /Contents 56 0 R
 >>
-

+
+

The information within the dictionary can be accessed using the COS model

-

java -COSDictionary page = ...; -COSArray mediaBox = (COSArray)page.getDictionaryObject( "MediaBox" ); -System.out.println( "Width:" + mediaBox.get( 3 ) ); -

+
COSDictionary page = ...;
+COSArray mediaBox = (COSArray)page.getDictionaryObject( "MediaBox" );
+System.out.println( "Width:" + mediaBox.get( 3 ) );
+
+

As can be seen from that little example the COS model provides a low level API to access information within the PDF. In order to use the COS model successfully a good knowledge of @@ -279,11 +279,11 @@ available to access the attributes.

The same code from above to get the page width can be rewritten to use PD Model classes.

-

java -PDPage page = ...; -PDRectangle mediaBox = page.getMediaBox(); -System.out.println( "Width:" + mediaBox.getWidth() ); -

+
PDPage page = ...;
+PDRectangle mediaBox = page.getMediaBox();
+System.out.println( "Width:" + mediaBox.getWidth() );
+
+

PD Model objects sit on top of COS model. Typically, the classes in the PD Model will only store a COS object and all setter/getter methods will modify data that is stored in the http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/1.8/faq.html ---------------------------------------------------------------------- diff --git a/content/1.8/faq.html b/content/1.8/faq.html index 84d642f..d332541 100644 --- a/content/1.8/faq.html +++ b/content/1.8/faq.html @@ -156,25 +156,25 @@

### I am getting the below Log4J warning message, how do I remove it? ###

-

java -log4j:WARN No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader). -log4j:WARN Please initialize the log4j system properly. -

+
log4j:WARN No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader).
+log4j:WARN Please initialize the log4j system properly.
+
+

This message means that you need to configure the log4j logging system. See the log4j documentation for more information.

PDFBox comes with a sample log4j configuration file. To use it you set a system property like this

-

java -java -Dlog4j.configuration=log4j.xml org.apache.pdfbox.ExtractText <PDF-file> <output-text-file> -

+
java -Dlog4j.configuration=log4j.xml org.apache.pdfbox.ExtractText <PDF-file> <output-text-file>
+
+

If this is not working for you then you may have to specify the log4j config file using a URL path, like this:

-

java -log4j.configuration=file:///<path to config file> -

+
log4j.configuration=file:///<path to config file>
+
+

### Is PDFBox thread safe? ###

@@ -190,20 +190,20 @@ don’t then the document will not be closed properly. Also, you must close all PDDocument objects that get created. The following code creates two PDDocument objects; one from the “new PDDocument()” and the second by the load method.

-

java -PDDocument doc = new PDDocument(); -try -{ - doc = PDDocument.load( "my.pdf" ); -} -finally -{ - if( doc != null ) - { - doc.close(); - } -} -

+
PDDocument doc = new PDDocument();
+try
+{
+   doc = PDDocument.load( "my.pdf" );
+}
+finally
+{
+   if( doc != null )
+   {
+      doc.close();
+   }
+}
+
+

Text Extraction

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/2.0/cookbook/encryption.html ---------------------------------------------------------------------- diff --git a/content/2.0/cookbook/encryption.html b/content/2.0/cookbook/encryption.html index b8e0c1c..400f718 100644 --- a/content/2.0/cookbook/encryption.html +++ b/content/2.0/cookbook/encryption.html @@ -139,28 +139,28 @@

This small sample shows how to encrypt a file so that it can be viewed, but not printed..

-

``` java -PDDocument doc = PDDocument.load(“filename.pdf”);

+
PDDocument doc = PDDocument.load("filename.pdf");
 
-

// Define the length of the encryption key. -// Possible values are 40, 128 or 256. -int keyLength = 256;

- -

AccessPermission ap = new AccessPermission();

- -

// disable printing, everything else is allowed -ap.setCanPrint(false);

- -

// owner password (to open the file with all permissions) is “12345” -// user password (to open the file but with restricted permissions, is empty here) -StandardProtectionPolicy spp = new StandardProtectionPolicy(“12345”, “”, ap); -spp.setEncryptionKeyLength(keyLength); -spp.setPermissions(ap); -doc.protect(spp);

- -

doc.save(“filename-encrypted.pdf”); -doc.close(); -```

+// Define the length of the encryption key. +// Possible values are 40, 128 or 256. +int keyLength = 256; + +AccessPermission ap = new AccessPermission(); + +// disable printing, everything else is allowed +ap.setCanPrint(false); + +// owner password (to open the file with all permissions) is "12345" +// user password (to open the file but with restricted permissions, is empty here) +StandardProtectionPolicy spp = new StandardProtectionPolicy("12345", "", ap); +spp.setEncryptionKeyLength(keyLength); +spp.setPermissions(ap); +doc.protect(spp); + +doc.save("filename-encrypted.pdf"); +doc.close(); +
+
http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/2.0/faq.html ---------------------------------------------------------------------- diff --git a/content/2.0/faq.html b/content/2.0/faq.html index de6427a..c12d217 100644 --- a/content/2.0/faq.html +++ b/content/2.0/faq.html @@ -175,25 +175,25 @@

I am getting the below Log4J warning message, how do I remove it?

-

java -log4j:WARN No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader). -log4j:WARN Please initialize the log4j system properly. -

+
log4j:WARN No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader).
+log4j:WARN Please initialize the log4j system properly.
+
+

This message means that you need to configure the log4j logging system. See the log4j documentation for more information.

PDFBox comes with a sample log4j configuration file. To use it you set a system property like this

-

java -java -Dlog4j.configuration=log4j.xml org.apache.pdfbox.ExtractText <PDF-file> <output-text-file> -

+
java -Dlog4j.configuration=log4j.xml org.apache.pdfbox.ExtractText <PDF-file> <output-text-file>
+
+

If this is not working for you then you may have to specify the log4j config file using a URL path, like this:

-

java -log4j.configuration=file:///<path to config file> -

+
log4j.configuration=file:///<path to config file>
+
+

@@ -213,20 +213,20 @@ don’t then the document will not be closed properly. Also, you must close all PDDocument objects that get created. The following code creates two PDDocument objects; one from the “new PDDocument()” and the second by the load method.

-

java -PDDocument doc = new PDDocument(); -try -{ - doc = PDDocument.load( "my.pdf" ); -} -finally -{ - if( doc != null ) - { - doc.close(); - } -} -

+
PDDocument doc = new PDDocument();
+try
+{
+   doc = PDDocument.load( "my.pdf" );
+}
+finally
+{
+   if( doc != null )
+   {
+      doc.close();
+   }
+}
+
+

Font Handling

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/download.html ---------------------------------------------------------------------- diff --git a/content/download.html b/content/download.html index 6917dce..8c3f95a 100644 --- a/content/download.html +++ b/content/download.html @@ -137,7 +137,7 @@ -

PDFBox 1.8.13

+

PDFBox 1.8.12

This is an incremental feature release based on the earlier `1.8.x` releases. - See the Release Notes for more details. + See the Release Notes for more details.

Verify

- It is essential that you verify the integrity of the downloaded files using the PGP signatures or + It is essential that you verify the integrity of the downloaded files using the PGP signatures or MD5 and SHA1 checksums. Please read Verifying Apache HTTP Server Releases for more information on why you should verify our releases.

- The PGP signatures can be verified using PGP or GPG. First download the - KEYS file as well as the .asc signature files for the + The PGP signatures can be verified using PGP or GPG. First download the + KEYS file as well as the .asc signature files for the relevant release packages. Make sure you get these - files from the main distribution directory, rather than + files from the main distribution directory, rather than from a mirror. Then verify the signatures using

 % pgpk -a KEYS
 % pgpv pdfbox-X.Y.Z-src.zip.asc
-
+ or
 % pgp -ka KEYS
 % pgp pdfbox-X.Y.Z-src.zip.asc
-
+ or @@ -333,8 +333,8 @@ or

Previous releases

- Previous Apache releases (starting with version `0.8.0-incubating`) are available in the release archive. - Older releases (up to version `0.7.3`) published from SourceForge are still available on + Previous Apache releases (starting with version `0.8.0-incubating`) are available in the release archive. + Older releases (up to version `0.7.3`) published from SourceForge are still available on SourceForge Files.

@@ -355,7 +355,7 @@ svn checkout http://svn.apache.org/repos/asf/pdfbox/trunk/ We also have a read-only Git mirror which is further mirrored to GitHub as apache/pdfbox.

- +

Latest development snapshot

@@ -383,7 +383,7 @@ Section 740.13) for both object code and source code.

    -
  • Apache PDFBox uses the Java Cryptography Architecture (JCA) and the Bouncy Castle libraries for handling encryption in PDF documents. +
  • Apache PDFBox uses the Java Cryptography Architecture (JCA) and the Bouncy Castle libraries for handling encryption in PDF documents.
http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/index.html ---------------------------------------------------------------------- diff --git a/content/index.html b/content/index.html index a7e60b1..8c77cb1 100644 --- a/content/index.html +++ b/content/index.html @@ -140,13 +140,13 @@ Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.

-

Apache PDFBox 1.8.13 released (2016-12-09)

+

Apache PDFBox 2.0.3 released (2016-09-17)

The Apache PDFBox community is pleased to announce the release of -Apache PDFBox version 1.8.13.

+Apache PDFBox version 2.0.3. It is available for download at:

-

The release is available for download at: http://pdfbox.apache.org/download.cgi

+

http://pdfbox.apache.org/download.cgi

-

See the full release notes for details about this release.

+

See the full release notes for details about this release.

Getting Help

@@ -199,14 +199,6 @@ skills. Subscribe to the Mailing Lists and find

News

-

Apache PDFBox 2.0.3 released (2016-09-17)

-

The Apache PDFBox community is pleased to announce the release of -Apache PDFBox version 2.0.3. It is available for download at:

- -

http://pdfbox.apache.org/download.cgi

- -

See the full release notes for details about this release.

-

Apache PDFBox 2.0.2 released (2016-06-09)

The Apache PDFBox community is pleased to announce the release of Apache PDFBox version 2.0.2. It is available for download at:

@@ -243,6 +235,14 @@ PDFBox 1.8 or earlier an overview about things to look at when switching over. M

See the full release notes for details about this release.

+

Apache PDFBox 1.8.11 released (2016-01-18)

+

The Apache PDFBox community is pleased to announce the release of +Apache PDFBox version 1.8.11.

+ +

The release is available for download at: http://pdfbox.apache.org/download.cgi

+ +

See the full release notes for details about this release.

+ http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/1f5ba131/content/news/2016/12/09/pdfbox-1.8.13-released.html ---------------------------------------------------------------------- diff --git a/content/news/2016/12/09/pdfbox-1.8.13-released.html b/content/news/2016/12/09/pdfbox-1.8.13-released.html deleted file mode 100644 index 6353e76..0000000 --- a/content/news/2016/12/09/pdfbox-1.8.13-released.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - Apache PDFBox | Apache PDFBox 1.8.13 released - - - - - - - - - - - - - - - - - -
- -
- -
-

The Apache PDFBox community is pleased to announce the release of -Apache PDFBox version 1.8.13.

- -

The release is available for download at: http://pdfbox.apache.org/download.cgi

- -

See the full release notes for details about this release.

- -
-
-
- - - - - - - - - - - \ No newline at end of file