FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 08-06-2012, 11:09 AM
Reinhard Tartler
 
Default RFH: non-blocking desktop conforming viewer

On Mon, Aug 6, 2012 at 10:25 AM, Norbert Preining <preining@logic.at> wrote:
> Hi Reinhard,
>
> thanks for your answers
>
> On Mo, 06 Aug 2012, Reinhard Tartler wrote:
>> > Unfortunately, xdg-open, at least under gnome, is non-blocking, i.e.,
>> > immediately returns (in fact it is the underlying gvfs-open that
>> > returns immediately), which makes it impossible to use texdoc
>> > for searching and viewing compressed docs.
>>
>> That sounds like an easy-to-implement extension in xdg-open.
>
> Unfortunately not. Since it calls gvfs-open it is the fault of
> gvfs-open in this case. In other cases it calls evince, which is
> blocking.
>
> It depends on the program xdg-open chooses, whether it is blocking
> or not. So that is something that cannot be easily fixed in xdg-open.

Quick research reveals:
https://bugzilla.redhat.com/show_bug.cgi?id=571932
which points to
https://bugzilla.gnome.org/show_bug.cgi?id=652262

The proposed solutions do not indicate that the problem was unfixable...

>
>> > I see several options here:
>> > * forget about compressed documentation
>> > PDF since format 1.4 has internal compression, meaning that
>> > the other compression does not win a lot at all
>> > We could advise packagers to use dh_compress -X.pdf
>>
>> I'm not sure, but wouldn't it be better to change dh_compress to do
>> the right thing and use the pdf format internal compression instead of
>> running gzip?
>
> THat is not something dh_compress can do, that is pdf creation time.
> I guess there *might* be a way to recompress pdfs, but that is dangerous
> at least I guess.

Well, lossy compression (such as done by imagemagick's convert tool or
ghostscript) may or may not be "dangerous", however, lossless
compression (such as done by pdftk or qpdf) should do fine. But I do
not claim particular PDF expertise, so maybe others can comment.

--
regards,
Reinhard


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAJ0cceYuFS80E7hmjV=Tew2kZKMB9PMLoaXDf+9XTzJwrH=m1 g@mail.gmail.com
 
Old 08-06-2012, 12:06 PM
Manuel Pégourié-Gonnard
 
Default RFH: non-blocking desktop conforming viewer

On 06/08/2012 13:09, Reinhard Tartler wrote:
> On Mon, Aug 6, 2012 at 10:25 AM, Norbert Preining <preining@logic.at> wrote:
>>>> * forget about compressed documentation
>>>> PDF since format 1.4 has internal compression, meaning that
>>>> the other compression does not win a lot at all
>>>> We could advise packagers to use dh_compress -X.pdf

Sounds quite reasonnable to me. Just tested with the files in question:

% ls -lh beameruserguide.pdf* pgfmanual.pdf*
-rw-r--r-- 1 mpg mpg 1,5M août 6 13:44 beameruserguide.pdf
-rw-r--r-- 1 mpg mpg 5,1M août 6 13:41 pgfmanual.pdf
% gzip beameruserguide.pdf pgfmanual.pdf
% ls -lh beameruserguide.pdf* pgfmanual.pdf*
-rw-r--r-- 1 mpg mpg 1,4M août 6 13:44 beameruserguide.pdf.gz
-rw-r--r-- 1 mpg mpg 4,9M août 6 13:41 pgfmanual.pdf.gz

Is a 5% or 7% gain in size really worth the trouble?

> Well, lossy compression (such as done by imagemagick's convert tool or
> ghostscript) may or may not be "dangerous", however, lossless
> compression (such as done by pdftk or qpdf) should do fine. But I do
> not claim particular PDF expertise, so maybe others can comment.
>
pdftk compression isn't as good as the original compression of the pdf files
created by (recent versions of) LaTeX (with pdfTeX), and qpdf does not seem to
change the compression level.

% pdftk beameruserguide.pdf output beamer-pdftk.pdf compress
% pdftk pgfmanual.pdf output pgf-pdftk.pdf compress
% qpdf --stream-data=compress --object-streams=generate --min-version=1.5
pgfmanual.pdf pgf-qpdf.pdf
% qpdf --stream-data=compress --object-streams=generate --min-version=1.5
beameruserguide.pdf beamer-qpdf.pdf
% ls -lh beamer*.pdf
-rw-r--r-- 1 mpg mpg 2,2M août 6 13:57 beamer-pdftk.pdf
-rw-r--r-- 1 mpg mpg 1,5M août 6 14:02 beamer-qpdf.pdf
-rw-r--r-- 1 mpg mpg 1,5M août 6 13:44 beameruserguide.pdf
% ls -lh pgf*.pdf
-rw-r--r-- 1 mpg mpg 5,1M août 6 13:41 pgfmanual.pdf
-rw-r--r-- 1 mpg mpg 11M août 6 13:58 pgf-pdftk.pdf
-rw-r--r-- 1 mpg mpg 5,1M août 6 14:03 pgf-qpdf.pdf

I do not claim to be an expert with pdftk nor qpdf, but I searched the man and
didn't find any obvious way to do better.

Manuel.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 501FB360.9040605@elzevir.fr">http://lists.debian.org/501FB360.9040605@elzevir.fr
 
Old 08-06-2012, 11:08 PM
Charles Plessy
 
Default RFH: non-blocking desktop conforming viewer

> > On Mon, Aug 6, 2012 at 10:25 AM, Norbert Preining <preining@logic.at> wrote:
> >>>>
> >>>> PDF since format 1.4 has internal compression, meaning that
> >>>> the other compression does not win a lot at all
> >>>> We could advise packagers to use dh_compress -X.pdf

Le Mon, Aug 06, 2012 at 02:06:56PM +0200, Manuel Pégourié-Gonnard a écrit :
>
> % ls -lh beameruserguide.pdf* pgfmanual.pdf*
> -rw-r--r-- 1 mpg mpg 1,5M août 6 13:44 beameruserguide.pdf
> -rw-r--r-- 1 mpg mpg 5,1M août 6 13:41 pgfmanual.pdf
> % gzip beameruserguide.pdf pgfmanual.pdf
> % ls -lh beameruserguide.pdf* pgfmanual.pdf*
> -rw-r--r-- 1 mpg mpg 1,4M août 6 13:44 beameruserguide.pdf.gz
> -rw-r--r-- 1 mpg mpg 4,9M août 6 13:41 pgfmanual.pdf.gz
>
> Is a 5% or 7% gain in size really worth the trouble?

Hi,

PDF compression has been discussed similarly at least in 2006 and 2012.

- http://lists.debian.org/debian-devel/2006/06/msg01015.html
- http://lists.debian.org/debian-policy/2012/02/msg00056.html

Since compressing PDFs is not required by the Policy it has been proposed
to change Debhelper's defaults: http://bugs.debian.org/375406

If there is a consensus on the matter, perhaps #375406 can be reopened with
a good summary taking into account why it was closed (because there are
mainstream viewers that can open gzipped PDF files).

Have a nice day,

--
Charles Plessy
Tsurumi, Kanagawa, Japan


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120806230859.GB4218@falafel.plessy.net">http://lists.debian.org/20120806230859.GB4218@falafel.plessy.net
 

Thread Tools




All times are GMT. The time now is 02:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org