Commit d9d820ff authored by Kristian Høgsberg's avatar Kristian Høgsberg
Browse files

2005-08-16 Kristian Høgsberg <krh@redhat.com>

        * configure.ac: Bump version to 0.4.0.

        * NEWS: Sum up changes.

        * poppler/PDFDoc.cc: Add extended check for %%EOF.

2005-08-15  Kristian Høgsberg  <krh@redhat.com>

        * poppler/GfxFont.cc: Add fix discussed in #3131 to only use the
        MacRoman char map if the font has one or the font dicts specifies
        /MacRoman.
parent 8ab5eeeb
2005-08-16 Kristian Høgsberg <krh@redhat.com>
* configure.ac: Bump version to 0.4.0.
* NEWS: Sum up changes.
* poppler/PDFDoc.cc: Add extended check for %%EOF.
2005-08-15 Kristian Høgsberg <krh@redhat.com>
* poppler/GfxFont.cc: Add fix discussed in #3131 to only use the
MacRoman char map if the font has one or the font dicts specifies
/MacRoman.
2005-08-06 Kristian Høgsberg <krh@redhat.com>
* glib/poppler-page.cc:
......@@ -349,6 +363,7 @@
can use cairo_show_glyphs() efficiently.
2005-06-26 Albert Astals Cid <aacid@kde.org>
* qt/poppler-page.cc:
* qt/poppler-page.h: Add PageTransition class and
PageTransition* Page::getTransition() const; to the qt frontend.
......
......@@ -3,6 +3,10 @@ Release 0.4.0
- Real text selection.
- API breakage in glib wrapper: dropping dest_x and dest_y
arguments from poppler_page_render_to_pixbuf().
- Updates to glib printing API from Martin Kretzschmar to
support setting paper size and duplex from the application.
- Much work on Qt4 bindings and Arthur output device. Still
work in progress, thouhg.
Release 0.3.3
......
dnl Based on Xpdf configure.in and evince configure.ac
AC_PREREQ(2.59)
AC_INIT(poppler, 0.3.3)
AC_INIT(poppler, 0.4.0)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AM_CONFIG_HEADER(poppler/poppler-config.h)
......
......@@ -15,7 +15,17 @@ static void str_init_source(j_decompress_ptr cinfo)
static boolean str_fill_input_buffer(j_decompress_ptr cinfo)
{
struct str_src_mgr * src = (struct str_src_mgr *)cinfo->src;
src->buffer = src->str->getChar();
if (src->index == 0) {
src->buffer = 0xFF;
src->index++;
}
else if (src->index == 1) {
src->buffer = 0xD8;
src->index++;
}
else {
src->buffer = src->str->getChar();
}
src->pub.next_input_byte = &src->buffer;
src->pub.bytes_in_buffer = 1;
return TRUE;
......@@ -50,6 +60,7 @@ DCTStream::DCTStream(Stream *strA):
src.pub.bytes_in_buffer = 0;
src.pub.next_input_byte = NULL;
src.str = str;
src.index = 0;
cinfo.src = (jpeg_source_mgr *)&src;
cinfo.err = jpeg_std_error(&jerr);
x = 0;
......@@ -98,10 +109,6 @@ void DCTStream::reset() {
n++;
}
// ...and this skips the garbage
str->reset();
for (n = n - 2; n > 0; n--) str->getChar();
jpeg_read_header(&cinfo, TRUE);
jpeg_start_decompress(&cinfo);
......
......@@ -45,6 +45,7 @@ struct str_src_mgr {
struct jpeg_source_mgr pub;
JOCTET buffer;
Stream *str;
int index;
};
......
......@@ -996,7 +996,6 @@ Gushort *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) {
cmap = msSymbolCmap;
} else if (macRomanCmap >= 0) {
cmap = macRomanCmap;
useMacRoman = gTrue;
}
} else {
if (macRomanCmap >= 0) {
......
......@@ -176,26 +176,33 @@ PDFDoc::~PDFDoc() {
// Check for a %%EOF at the end of this stream
GBool PDFDoc::checkFooter() {
// we look in the last 7 chars because it can be %%EOF %%EOF\n %%EOF\n\r etc
char eof[8];
// we look in the last 1024 chars because Adobe does the same
char *eof = new char[1025];
int pos = str->getPos();
str->setPos(7, -1);
eof[0] = str->getChar();
eof[1] = str->getChar();
eof[2] = str->getChar();
eof[3] = str->getChar();
eof[4] = str->getChar();
eof[5] = str->getChar();
eof[6] = str->getChar();
eof[7] = '\0';
if (strstr(eof, "%%EOF") == NULL)
{
error(-1, "Document has not the mandatory ending %%EOF");
str->setPos(1024, -1);
int i, ch;
for (i = 0; i < 1024; i++) {
ch = str->getChar();
if (ch == EOF)
break;
eof[i] = ch;
}
eof[i] = '\0';
bool found = false;
for (i = i - 5; i >= 0; i--) {
if (strncmp (&eof[i], "%%EOF", 5) == 0) {
found = true;
break;
}
}
if (!found) {
error(-1, "Document does not have mandatory %%EOF ending");
errCode = errDamaged;
return gFalse;
}
delete[] eof;
str->setPos(pos);
return gTrue;
return found;
}
// Check for a PDF header on this stream. Skip past some garbage
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment