all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Aguilar <carlos.aguilar@unilim.fr>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: emacs-devel@gnu.org
Subject: Re: Suggestion / feature request
Date: Thu, 19 Apr 2012 19:15:28 +0200	[thread overview]
Message-ID: <4F904830.5010401@unilim.fr> (raw)
In-Reply-To: <87sjfzst54.fsf@thinkpad.tsdh.de>

[-- Attachment #1: Type: text/plain, Size: 3003 bytes --]

I have found a simple test "by hand" that works. Initial conditions : 
two files file1.pdf and file2.pdf with 101 pages and only a small 
difference in page 85.

time (mkdir file1_burst; cd file1_burst; pdftk ../file1.pdf burst; cd ..
mkdir file2_burst; cd file2_burst; pdftk ../file2.pdf burst
for I in pg*; do echo $I; diff -a $I ../file1_burst/$I|grep -v 
'BaseFont\|FontName\|Creator\|Info\|...c...\|\-\-\-\|..c..'; done
cd .. ; rm -Rf file1_burst; rm -Rf file2_burst)

pg_0001.pdf
pg_0002.pdf
pg_0003.pdf
pg_0004.pdf
pg_0005.pdf
.
.
.
pg_0084.pdf
pg_0085.pdf
< x?T?n?0
          ??W?(\x015CQ?\x15?^
< 0000059304 00000 n
 > 0000059305 00000 n
< 0000059402 00000 n
< 0000059466 00000 n
< 0000059513 00000 n
 > 0000059403 00000 n
 > 0000059467 00000 n
 > 0000059514 00000 n
< 59672
 > 59673
pg_0086.pdf
pg_0087.pdf
pg_0088.pdf
pg_0089.pdf
pg_0090.pdf
pg_0091.pdf
pg_0092.pdf
pg_0093.pdf
pg_0094.pdf
pg_0095.pdf
pg_0096.pdf
pg_0097.pdf
pg_0098.pdf
pg_0099.pdf
pg_0100.pdf
pg_0101.pdf


real    0m7.009s
user    0m6.160s
sys    0m0.210s


This can probably be optimized much. The only page for which there is a 
difference is the one with a change. Doc-view reconversion needs in the 
same computer 20 seconds.


Cheers,

Carlos

Le 19/04/2012 16:17, Tassilo Horn a écrit :
> Carlos Aguilar<carlos.aguilar@unilim.fr>  writes:
>
> Hi Carlos,
>
>> I often use doc-view mode with medium to large pdf/ps/dvi files, when
>> writing/modifying latex documents.
> Yes, frequently changing documents are clearly not the prime use-case
> for doc-view, exactly because of the reasons you mention.  Do you use
> AUCTeX for writing your documents?  If yes, then preview-latex might be
> exactly what you need.
>
> ,----[ (info "(preview-latex)Top") ]
> |    preview-latex is a package embedding preview fragments into Emacs
> | source buffers under the AUCTeX editing environment for LaTeX.  It uses
> | `preview.sty' for the extraction of certain environments (most notably
> | displayed formulas).  Other applications of this style file are
> | possible and exist.
> `----
>
>> I wondered if it would be possible to keep a set of signatures of the
>> pdf/ps/dvi pages processed so that those that are unchanged are not
>> reconverted to (already existing) bitmap images.
> Um, I have no idea how to do that.  Doc-view only knows the PNG images
> generated from the original document, and you can't compare those with
> pages in the document.
>
> Well, it also has the old document's contents in the current buffer and
> the updated document is on the file system, so in theory it could also
> compare the documents.  But I have no clue how to do that.  Googling
> around, I've found http://www.qtrac.eu/comparepdf.html, but I'm not sure
> if it does the trick.  (Oh, and of course if the comparison of the docs
> is not significantly cheaper than a reconversion, there's no sense in
> doing so. ;-))
>
> Bye,
> Tassilo

[-- Attachment #2: Type: text/html, Size: 4343 bytes --]

  parent reply	other threads:[~2012-04-19 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 13:28 Suggestion / feature request Carlos Aguilar
2012-04-19 14:17 ` Tassilo Horn
2012-04-19 16:36   ` Carlos Aguilar
2012-04-19 17:15   ` Carlos Aguilar [this message]
2012-04-19 18:59     ` Tassilo Horn
2012-04-19 22:21 ` Stefan Monnier
2012-04-20 18:15   ` Tassilo Horn
2012-04-20 20:16     ` Stefan Monnier
2012-04-23  7:06       ` Carlos Aguilar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F904830.5010401@unilim.fr \
    --to=carlos.aguilar@unilim.fr \
    --cc=emacs-devel@gnu.org \
    --cc=tassilo@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.