Skip to content

Commit

Permalink
some housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzido committed May 14, 2018
1 parent 0705bc6 commit 2bc505e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/main/java/technology/tabula/Line.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void addTextChunk(TextChunk textChunk) {
public String toString() {
StringBuilder sb = new StringBuilder();
String s = super.toString();
sb.append(s.substring(0, s.length() - 1));
sb.append(s, 0, s.length() - 1);
sb.append(",chunks=");
for (TextChunk te: this.textChunks) {
sb.append("'" + te.getText() + "', ");
Expand Down
28 changes: 13 additions & 15 deletions src/main/java/technology/tabula/ObjectExtractorStreamEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class ObjectExtractorStreamEngine extends PDFGraphicsStreamEngine {
private GeneralPath currentPath = new GeneralPath();
public List<Shape> clippingPaths;

private Matrix translateMatrix;

protected ObjectExtractorStreamEngine(PDPage page) {
super(page);

Expand All @@ -62,7 +60,7 @@ protected ObjectExtractorStreamEngine(PDPage page) {
}

@Override
public void appendRectangle(Point2D p0, Point2D p1, Point2D p2, Point2D p3) throws IOException {
public void appendRectangle(Point2D p0, Point2D p1, Point2D p2, Point2D p3) {
currentPath.moveTo((float) p0.getX(), (float) p0.getY());
currentPath.lineTo((float) p1.getX(), (float) p1.getY());
currentPath.lineTo((float) p2.getX(), (float) p2.getY());
Expand All @@ -72,30 +70,30 @@ public void appendRectangle(Point2D p0, Point2D p1, Point2D p2, Point2D p3) thro
}

@Override
public void clip(int windingRule) throws IOException {
public void clip(int windingRule) {
// the clipping path will not be updated until the succeeding painting
// operator is called
clipWindingRule = windingRule;
}

@Override
public void closePath() throws IOException {
public void closePath() {
currentPath.closePath();
}

@Override
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) throws IOException {
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) {
currentPath.curveTo(x1, y1, x2, y2, x3, y3);
}

@Override
public void drawImage(PDImage arg0) throws IOException {
public void drawImage(PDImage arg0) {
// TODO Auto-generated method stub

}

@Override
public void endPath() throws IOException {
public void endPath() {
if (clipWindingRule != -1) {
currentPath.setWindingRule(clipWindingRule);
getGraphicsState().intersectClippingPath(currentPath);
Expand All @@ -105,38 +103,38 @@ public void endPath() throws IOException {
}

@Override
public void fillAndStrokePath(int arg0) throws IOException {
public void fillAndStrokePath(int arg0) {
strokeOrFillPath(true);
}

@Override
public void fillPath(int arg0) throws IOException {
public void fillPath(int arg0) {
strokeOrFillPath(true);
}

@Override
public Point2D getCurrentPoint() throws IOException {
public Point2D getCurrentPoint() {
return currentPath.getCurrentPoint();
}

@Override
public void lineTo(float x, float y) throws IOException {
public void lineTo(float x, float y) {
currentPath.lineTo(x, y);
}

@Override
public void moveTo(float x, float y) throws IOException {
public void moveTo(float x, float y) {
currentPath.moveTo(x, y);
}

@Override
public void shadingFill(COSName arg0) throws IOException {
public void shadingFill(COSName arg0) {
// TODO Auto-generated method stub

}

@Override
public void strokePath() throws IOException {
public void strokePath() {
strokeOrFillPath(false);
}

Expand Down

0 comments on commit 2bc505e

Please sign in to comment.