--- psiconv/trunk/lib/psiconv/parse_page.c 2000/12/15 01:16:43 65 +++ psiconv/trunk/lib/psiconv/parse_page.c 2000/12/25 00:26:53 76 @@ -18,11 +18,13 @@ */ #include "config.h" +#include "compat.h" + #include #include -#include "data.h" #include "parse_routines.h" +#include "error.h" int psiconv_parse_page_header(const psiconv_buffer buf,int lev,psiconv_u32 off, int *length,psiconv_page_header *result) @@ -194,12 +196,14 @@ temp = psiconv_read_u32(buf,lev+2,off+len,&res); if (res) goto ERROR4; - if (temp != PSICONV_ID_PAGE_DIMENSIONS) { + if ((temp != PSICONV_ID_PAGE_DIMENSIONS1) && + (temp != PSICONV_ID_PAGE_DIMENSIONS2)) { psiconv_warn(lev+2,off+len, "Page layout section page dimensions marker not found"); psiconv_debug(lev+2,off+len, - "Page dimensions marker: read %08x, expected %08x",temp, - PSICONV_ID_PAGE_DIMENSIONS); + "Page dimensions marker: read %08x, expected %08x or %08x", + temp, PSICONV_ID_PAGE_DIMENSIONS1, + PSICONV_ID_PAGE_DIMENSIONS2); } len += 4; @@ -217,6 +221,13 @@ psiconv_debug(lev+2,off+len,"Page height: %6.3f",(*result)->page_height); len += leng; + psiconv_progress(lev+2,off+len,"Going to read page portrait/landscape"); + if ((res = psiconv_parse_bool(buf,lev+2,off+len,&leng,&(*result)->landscape))) + goto ERROR4; + psiconv_debug(lev+2,off+len,"Landscape: %d",(*result)->landscape); + len += leng; + + if (length) *length = len;