[poppler] [PATCH] Viewer Preferences and Direction R2L

Carlos Garcia Campos carlosgc at gnome.org
Mon Mar 28 09:46:11 PDT 2011


Excerpts from SAKURAI Masashi's message of lun mar 28 10:12:33 +0200 2011:
> Hi,

Hi, 

> I implemented the viewer preferences and the flag Direction: R2L.

Great!

> Direction R2L from Adobe PDF spec:
>   This entry has no direct effect on the document's contents or page
>   numbering but may be used to determine the relative positioning
>   of pages when displayed side by side or printed n-up. Default
>   value: L2R.
> 
> This implementation of the viewer preferences and flags supports only
> the Direction R2L. However, this R2L direction is very important for
> East Asians to read books. In addition to the Poppler, I locally
> added the Direction R2L support to the Evince, and I confirmed that my
> Japanese books are displayed as Acrobat does.
> 
> I attached two sample pdf files, 
>    normal.pdf  : no viewer preferences
>    r2l.pdf     : viewer preferences with Direction R2L
> One can check the Direction R2L by the demo program for the glib interface,
> $ ./glib/demo/poppler-glib-demo (pdf file)

It seems we already had a PopplerViewerPreferences enum in glib
frontend but it was never used. I'm not sure using flags is a good
idea though, since there are preferences that can't be represented by
a flag, like PrintPageRange or NumCopies.

Thank you very much for the patch, it looks good to me, but I think we
should parse the viewer preferences dictionary in the core, probably
adding a new class that frontends could use. It could be created on
demand by the catalog.

> 
> SAKURAI Masashi (1):
>   Implements the viewer preferences dict and the entry of Direction
>     R2L.
> 
>  glib/demo/info.cc        |   35 +++++++++++++++++++++++++++++++++--
>  glib/poppler-document.cc |   40 ++++++++++++++++++++++++++++++++++++++--
>  poppler/Catalog.cc       |   21 +++++++++++++++++++++
>  poppler/Catalog.h        |    2 ++
>  4 files changed, 94 insertions(+), 4 deletions(-)

Regards, 
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110328/b03509fb/attachment.pgp>


More information about the poppler mailing list