unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, "David Edmondson" <dme@dme.org>,
	"Stefan Kangas" <stefan@marxist.se>,
	"Daniel Martín" <mardani29@yahoo.es>
Subject: Re: [PATCH] nextstep: Emacs can be used to edit PDF files
Date: Sat, 20 Nov 2021 19:51:26 +0000	[thread overview]
Message-ID: <YZlRvs73lwsTy8SX@idiocy.org> (raw)
In-Reply-To: <jwvpmqv0ymn.fsf-monnier+emacs@gnu.org>

On Sat, Nov 20, 2021 at 08:06:20AM -0500, Stefan Monnier wrote:
> Stefan Kangas [2021-11-20 04:55:17] wrote:
> 
> > Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >
> >> Any chance we could change doc-view so it works without `gs` (nor
> >> `mupdf`) using one of the tools pre-installed in macOS?
> >
> > It seems like we could, from searching the web there's apparently a tool
> > called "sips" that is pre-installed on macOS.  I just checked my machine
> > and I have it there.
> >
> > AFAICT, you can't convert only one page with it, only the full page.
> > But it seems to be a hard requirement of a
> > `doc-view-pdf->png-converter-function' that we can specify a page number
> > to it, so I'm not sure how tricky it is to fit into what we have now.
> >
> > Maybe someone more familiar with doc-view could take a look.
> 
> Apparently it might also be possible to do it via AppleScript
> (according to http://preserve.mactech.com/articles/mactech/Vol.21/21.03/BasicImageManipulation/index.html)

NSImage supports loading of PDF files natively. In fact, as I
understand it the entire NEXTstep API is built on some sort of PDF
technology. (Or is it PostScript? It only supports EPS natively, not
standard PostScript...)

I've yet to work out how to teach Emacs to open files using the native
support. It can obviously do it because it manages it for PNG, JPEG,
etc., I just need to work it out for HEIC and PDF.
-- 
Alan Third



  reply	other threads:[~2021-11-20 19:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  8:38 [PATCH] nextstep: Emacs can be used to edit PDF files David Edmondson
2021-11-19  0:15 ` Daniel Martín
2021-11-19  3:22   ` Stefan Monnier
2021-11-19  3:42     ` Stefan Kangas
2021-11-19 18:03       ` Stefan Monnier
2021-11-20  3:55         ` Stefan Kangas
2021-11-20 13:06           ` Stefan Monnier
2021-11-20 19:51             ` Alan Third [this message]
2021-11-23 10:09   ` David Edmondson
2021-11-23 17:35     ` Tomas Hlavaty
2021-11-24 21:10       ` James Cloos

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=YZlRvs73lwsTy8SX@idiocy.org \
    --to=alan@idiocy.org \
    --cc=dme@dme.org \
    --cc=emacs-devel@gnu.org \
    --cc=mardani29@yahoo.es \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefan@marxist.se \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).