You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/01/13 18:42:19 UTC
svn commit: r1651423 -
/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFText2HTML.java
Author: tilman
Date: Tue Jan 13 17:42:19 2015
New Revision: 1651423
URL: http://svn.apache.org/r1651423
Log:
PDFBOX-2576: make fields final
Modified:
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFText2HTML.java
Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFText2HTML.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFText2HTML.java?rev=1651423&r1=1651422&r2=1651423&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFText2HTML.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFText2HTML.java Tue Jan 13 17:42:19 2015
@@ -40,7 +40,7 @@ public class PDFText2HTML extends PDFTex
private static final int INITIAL_PDF_TO_HTML_BYTES = 8192;
private boolean onFirstPage = true;
- private FontState fontState = new FontState();
+ private final FontState fontState = new FontState();
/**
* Constructor.
@@ -81,6 +81,7 @@ public class PDFText2HTML extends PDFTex
/**
* {@inheritDoc}
*/
+ @Override
protected void writePage() throws IOException
{
if (onFirstPage)
@@ -94,6 +95,7 @@ public class PDFText2HTML extends PDFTex
/**
* {@inheritDoc}
*/
+ @Override
public void endDocument(PDDocument document) throws IOException
{
super.writeString("</body></html>");
@@ -155,6 +157,7 @@ public class PDFText2HTML extends PDFTex
* @throws IOException
* If there is an error writing to the stream.
*/
+ @Override
protected void startArticle(boolean isLTR) throws IOException
{
if (isLTR)
@@ -173,6 +176,7 @@ public class PDFText2HTML extends PDFTex
* @throws IOException
* If there is an error writing to the stream.
*/
+ @Override
protected void endArticle() throws IOException
{
super.endArticle();
@@ -187,6 +191,7 @@ public class PDFText2HTML extends PDFTex
* @param textPositions the corresponding text positions
* @throws IOException If there is an error writing to the stream.
*/
+ @Override
protected void writeString(String text, List<TextPosition> textPositions) throws IOException
{
super.writeString(fontState.push(text, textPositions));
@@ -199,6 +204,7 @@ public class PDFText2HTML extends PDFTex
* @throws IOException
* If there is an error writing to the stream.
*/
+ @Override
protected void writeString(String chars) throws IOException
{
super.writeString(escape(chars));
@@ -266,7 +272,7 @@ public class PDFText2HTML extends PDFTex
* A helper class to maintain the current font state. It's public methods will emit opening and
* closing tags as needed, and in the correct order.
*
- * @author Axel Dörfler
+ * @author Axel D�rfler
*/
private static class FontState
{