Update to 0.9.1 official release.

Add a patch to fix ColorSpace parsing.

Feature safe:	yes
This commit is contained in:
Alex Dupre 2011-11-17 08:54:16 +00:00
parent e600cc4ba2
commit 26168c89ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285949
3 changed files with 35 additions and 5 deletions

View file

@ -6,16 +6,19 @@
#
PORTNAME= pdf-renderer
PORTVERSION= 0.20110427
PORTVERSION= 0.9.1
PORTEPOCH= 1
CATEGORIES= print java
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= ale
MASTER_SITES= http://java.net/downloads/${PORTNAME}/
DISTNAME= PDFRenderer-full-${PORTVERSION}
MAINTAINER= ale@FreeBSD.org
COMMENT= A 100% Java PDF renderer and viewer
LICENSE= LGPL21
USE_ZIP= yes
NO_WRKSUBDIR= yes
USE_JAVA= yes
JAVA_VERSION= 1.5+
USE_ANT= yes

View file

@ -1,2 +1,2 @@
SHA256 (pdf-renderer-0.20110427.tar.gz) = 560173d88b8ed36b546082ab6d3c65b38c393d68ec6b9a4feafeeb2ce0d8ee12
SIZE (pdf-renderer-0.20110427.tar.gz) = 1586523
SHA256 (PDFRenderer-full-0.9.1.zip) = 29b194cbcb24edaa35b9d4de2a75d4c68acc0e0fc4c1c0fd2649c78e127e609f
SIZE (PDFRenderer-full-0.9.1.zip) = 3877379

View file

@ -0,0 +1,27 @@
--- ./src/com/sun/pdfview/colorspace/PDFColorSpace.java.orig 2011-11-17 09:12:43.000000000 +0100
+++ ./src/com/sun/pdfview/colorspace/PDFColorSpace.java 2011-11-17 09:12:53.000000000 +0100
@@ -161,7 +161,13 @@
PDFObject[] ary = csobj.getArray();
name = ary[0].getStringValue();
- if (name.equals("CalGray")) {
+ if (name.equals("DeviceGray") || name.equals("G")) {
+ return getColorSpace(COLORSPACE_GRAY);
+ } else if (name.equals("DeviceRGB") || name.equals("RGB")) {
+ return getColorSpace(COLORSPACE_RGB);
+ } else if (name.equals("DeviceCMYK") || name.equals("CMYK")) {
+ return getColorSpace(COLORSPACE_CMYK);
+ } else if (name.equals("CalGray")) {
value = new PDFColorSpace(new CalGrayColor(ary[1]));
} else if (name.equals("CalRGB")) {
value = new PDFColorSpace(new CalRGBColor(ary[1]));
@@ -194,8 +200,7 @@
return new PatternSpace(base);
} else {
- throw new PDFParseException("Unknown color space: " + name +
- " with " + ary[1]);
+ throw new PDFParseException("Unknown color space: " + name);
}
csobj.setCache(value);