Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #998 > unrolled thread
| Started by | Marco <netuse@lavabit.com> |
|---|---|
| First post | 2012-10-13 11:17 +0200 |
| Last post | 2012-10-22 07:52 +0100 |
| Articles | 11 — 3 participants |
Back to article view | Back to comp.lang.postscript
Transfer PDF metadata to outputfile with pdfwrite driver Marco <netuse@lavabit.com> - 2012-10-13 11:17 +0200
Re: Transfer PDF metadata to outputfile with pdfwrite driver ken <ken@spamcop.net> - 2012-10-13 20:35 +0100
Re: Transfer PDF metadata to outputfile with pdfwrite driver ken <ken@spamcop.net> - 2012-10-15 13:39 +0100
Re: Transfer PDF metadata to outputfile with pdfwrite driver Marco <netuse@lavabit.com> - 2012-10-15 15:12 +0200
Re: Transfer PDF metadata to outputfile with pdfwrite driver ken <ken@spamcop.net> - 2012-10-15 16:26 +0100
Re: Transfer PDF metadata to outputfile with pdfwrite driver Marco <netuse@lavabit.com> - 2012-10-15 19:22 +0200
Re: Transfer PDF metadata to outputfile with pdfwrite driver ken <ken@spamcop.net> - 2012-10-16 07:54 +0100
Re: Transfer PDF metadata to outputfile with pdfwrite driver Chris <cjl@spamcop.net> - 2012-10-16 07:39 +0000
Re: Transfer PDF metadata to outputfile with pdfwrite driver Marco <netuse@lavabit.com> - 2012-10-16 10:21 +0200
Re: Transfer PDF metadata to outputfile with pdfwrite driver Marco <netuse@lavabit.com> - 2012-10-21 19:25 +0200
Re: Transfer PDF metadata to outputfile with pdfwrite driver ken <ken@spamcop.net> - 2012-10-22 07:52 +0100
| From | Marco <netuse@lavabit.com> |
|---|---|
| Date | 2012-10-13 11:17 +0200 |
| Subject | Transfer PDF metadata to outputfile with pdfwrite driver |
| Message-ID | <5079318d$0$6566$9b4e6d93@newsspool4.arcor-online.net> |
Hi,
when processing a PDF with ghostscript using the `pdfwrite` driver
the PDF metadata (like author, title, etc.) is not transferred to
the output file.
Here are the steps to reproduce.
$ pdfinfo input.pdf
Title: AAA
Subject: BBB
Keywords: CCC
Author: DDD
Creator: ConTeXt - 2012.09.23 12:40
Producer: LuaTeX-0.70.2
CreationDate: Sat Oct 13 11:00:55 2012
ModDate: Sat Oct 13 11:00:55 2012
Tagged: no
Pages: 1
Encrypted: no
Page size: 595.276 x 841.89 pts (A4)
File size: 7254 bytes
Optimized: no
PDF version: 1.6
$ gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
-sOutputFile=output.pdf input.pdf
$ pdfinfo output.pdf
Producer: GPL Ghostscript 9.06
CreationDate: Sat Oct 13 11:01:27 2012
ModDate: Sat Oct 13 11:01:27 2012
Tagged: no
Pages: 1
Encrypted: no
Page size: 595.276 x 841.89 pts (A4)
File size: 7603 bytes
Optimized: no
PDF version: 1.4
The file `input.pdf` can be found at
http://freeshell.de/~mpfusion/input.pdf
How can I make pdfwrite to transfer the metadata `Title`, `Subject`,
etc to the output file? Is this intended behaviour or a bug?
I use the ghostscript binary version 9.06 from
http://downloads.ghostscript.com/public/binaries/ghostscript-9.06-linux-x86_64.tgz
Kind regards
Marco
[toc] | [next] | [standalone]
| From | ken <ken@spamcop.net> |
|---|---|
| Date | 2012-10-13 20:35 +0100 |
| Message-ID | <MPG.2ae3d2c3c457dff498989d@usenet.plus.net> |
| In reply to | #998 |
In article <5079318d$0$6566$9b4e6d93@newsspool4.arcor-online.net>, netuse@lavabit.com says... > How can I make pdfwrite to transfer the metadata `Title`, `Subject`, > etc to the output file? Is this intended behaviour or a bug? > > I use the ghostscript binary version 9.06 from > http://downloads.ghostscript.com/public/binaries/ghostscript-9.06-linux-x86_64.tgz For me this worked as expected on Windows, I'll try Linux on Monday. Ken
[toc] | [prev] | [next] | [standalone]
| From | ken <ken@spamcop.net> |
|---|---|
| Date | 2012-10-15 13:39 +0100 |
| Message-ID | <MPG.2ae6143cd81d34f498989e@usenet.plus.net> |
| In reply to | #998 |
In article <5079318d$0$6566$9b4e6d93@newsspool4.arcor-online.net>, netuse@lavabit.com says... > How can I make pdfwrite to transfer the metadata `Title`, `Subject`, > etc to the output file? Is this intended behaviour or a bug? > > I use the ghostscript binary version 9.06 from > http://downloads.ghostscript.com/public/binaries/ghostscript-9.06-linux-x86_64.tgz This appears to be resttricted to Linux, and is fixed in teh current version of the source code. If you build from the *currennt* up to date source it should work as expected. Ken
[toc] | [prev] | [next] | [standalone]
| From | Marco <netuse@lavabit.com> |
|---|---|
| Date | 2012-10-15 15:12 +0200 |
| Message-ID | <507c0bd6$0$6640$9b4e6d93@newsspool2.arcor-online.net> |
| In reply to | #1002 |
2012-10-15 ken: Hi Ken > > How can I make pdfwrite to transfer the metadata `Title`, `Subject`, > > etc to the output file? Is this intended behaviour or a bug? > > > > I use the ghostscript binary version 9.06 from > > http://downloads.ghostscript.com/public/binaries/ghostscript-9.06-linux-x86_64.tgz > > This appears to be resttricted to Linux, and is fixed in teh current > version of the source code. If you build from the *currennt* up to date > source it should work as expected. Thanks for the fix. I will test it as soon as I can. May I ask a dumb question: Where do I find the current source? The download page [1] only lists version 9.06 (probably the stable version). The FAQ mentions the sourceforge page [2], but the repository contains no current source, but a notice that the page has moved to [3]. The page [3], however does not exist. The FAQ further mentions the mirror [4], which displays “The page you asked for does not exist.”. The ghostscript page also links to [5] which lists a bunch of git repositories. I don't know which repository is the correct one, I assume that it's one of those ending in `ghostpdl.git`, however none of them were changed recently. Marco [1] http://www.ghostscript.com/download/ [2] http://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/ [3] http://cvs.ghoststscript.com/ [4] http://code.google.com/p/ghostscript/downloads/list/ [5] http://git.ghostscript.com/
[toc] | [prev] | [next] | [standalone]
| From | ken <ken@spamcop.net> |
|---|---|
| Date | 2012-10-15 16:26 +0100 |
| Message-ID | <MPG.2ae63b8b5a39984398989f@usenet.plus.net> |
| In reply to | #1003 |
In article <507c0bd6$0$6640$9b4e6d93@newsspool2.arcor-online.net>, netuse@lavabit.com says... > Thanks for the fix. I will test it as soon as I can. I have to admit I haven't fixed anything, but the 9.06 source fails as described, and the current code doesn't. I could bisect the source to find when it was fixed, but that would take a while. > May I ask a dumb question: Where do I find the current source? Ah, good question. Ghostscript is held in a Git repository. Unless you really want to get involved I'd suggest you probably don't want to get that. Instead you can go to : http://git.ghostscript.com/?p=ghostpdl.git;a=summary click the 'commit' link on the most recent entry in the log. From the page which comes up press the 'snapshot' link. This should deliver you a tarball (if I remember correctly) of the current source. Unpack it somewhere convenient, run ./configure and make. Its possible that snapshot may deliver the entire ghostpdl source (I don't remember I'm afraid) In which case you need to do ./configure and make in the ghostpdl/gs sub folder. > The download page [1] only lists version 9.06 (probably the stable > version). Its the most recent release. THe stuff in Git is the absolute most up- to-date code. THere is some small risk attached to taking it, but its small. Every commit is run through our regression test suite (some 50,000+ tests) Ken
[toc] | [prev] | [next] | [standalone]
| From | Marco <netuse@lavabit.com> |
|---|---|
| Date | 2012-10-15 19:22 +0200 |
| Message-ID | <507c463b$0$6556$9b4e6d93@newsspool4.arcor-online.net> |
| In reply to | #1004 |
2012-10-15 ken:
> Instead you can go to :
>
> http://git.ghostscript.com/?p=ghostpdl.git;a=summary
>
> click the 'commit' link on the most recent entry in the log. From the
> page which comes up press the 'snapshot' link. This should deliver you a
> tarball (if I remember correctly) of the current source.
>
> Unpack it somewhere convenient, run ./configure and make. Its possible
> that snapshot may deliver the entire ghostpdl source (I don't remember
> I'm afraid) In which case you need to do ./configure and make in the
> ghostpdl/gs sub folder.
I will install the current dev version, since it will take some time
until the fixed version will reach the repo of my distribution.
However, there seems to be something wrong with the `configure`
script, the `--prefix` setting is ignored. If I run
./configure --prefix=/home/marco/usr/local
I get
[…]
Installation directory: /usr/local
[…]
instead of
[…]
Installation directory: /home/marco/usr/local
[…]
Is there another method of setting a custom installation directory?
Marco
[toc] | [prev] | [next] | [standalone]
| From | ken <ken@spamcop.net> |
|---|---|
| Date | 2012-10-16 07:54 +0100 |
| Message-ID | <MPG.2ae714ed3e3336b89898a0@usenet.plus.net> |
| In reply to | #1005 |
In article <507c463b$0$6556$9b4e6d93@newsspool4.arcor-online.net>, netuse@lavabit.com says... > Is there another method of setting a custom installation directory? To the best of my knowledge, which is limited on Linux, the configure script doesn't install Ghostscript at all. It merely creates the makefiles necessary to build Ghostscript. If you want it in a specific place after building you'll have to put it there yourself. Ken
[toc] | [prev] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-10-16 07:39 +0000 |
| Message-ID | <Na8fs.366141$2%5.52680@fx05.am4> |
| In reply to | #1005 |
On Mon, 15 Oct 2012 19:22:03 +0200, Marco wrote: > 2012-10-15 ken: > >> Instead you can go to : >> >> http://git.ghostscript.com/?p=ghostpdl.git;a=summary >> >> click the 'commit' link on the most recent entry in the log. From the >> page which comes up press the 'snapshot' link. This should deliver you >> a tarball (if I remember correctly) of the current source. >> >> Unpack it somewhere convenient, run ./configure and make. Its possible >> that snapshot may deliver the entire ghostpdl source (I don't remember >> I'm afraid) In which case you need to do ./configure and make in the >> ghostpdl/gs sub folder. > > I will install the current dev version, since it will take some time > until the fixed version will reach the repo of my distribution. > > However, there seems to be something wrong with the `configure` script, > the `--prefix` setting is ignored. If I run > > ./configure --prefix=/home/marco/usr/local > > I get > > […] > Installation directory: /usr/local […] > > instead of > > […] > Installation directory: /home/marco/usr/local […] > > Is there another method of setting a custom installation directory? The "--prefix" option seems to work for me in the Ghostscript configure, but not in the "GhostPDL" configure (known limitation). Are you *sure* you used the script in the "ghostpdl/gs" directory, and not the one in the "ghostpdl" directory? Chris
[toc] | [prev] | [next] | [standalone]
| From | Marco <netuse@lavabit.com> |
|---|---|
| Date | 2012-10-16 10:21 +0200 |
| Message-ID | <507d1915$0$6558$9b4e6d93@newsspool4.arcor-online.net> |
| In reply to | #1009 |
2012-10-16 Chris: > > However, there seems to be something wrong with the `configure` script, > > the `--prefix` setting is ignored. If I run > > > > ./configure --prefix=/home/marco/usr/local > > > > I get > > > > […] > > Installation directory: /usr/local […] > > > > instead of > > > > […] > > Installation directory: /home/marco/usr/local […] > > > > Is there another method of setting a custom installation directory? > > The "--prefix" option seems to work for me in the Ghostscript configure, > but not in the "GhostPDL" configure (known limitation). > > Are you *sure* you used the script in the "ghostpdl/gs" directory, and > not the one in the "ghostpdl" directory? No, I launched the `configure` in the ghostpdl root directory. My fault. Everything works fine if I use the ghostpdl/gs `configure` script. It installs in the user directory and the test file from my first post succeeds and the metadata is carried over. Problem solved. Thanks to both of you, Chris and Ken for your help and patience. Kind regards Marco
[toc] | [prev] | [next] | [standalone]
| From | Marco <netuse@lavabit.com> |
|---|---|
| Date | 2012-10-21 19:25 +0200 |
| Message-ID | <50842ffd$0$6626$9b4e6d93@newsspool2.arcor-online.net> |
| In reply to | #998 |
Hi, the issue is still not solved. It worked for the simple test file, but it fails with more complex files. Specifically the `title` and the `creator` is not kept. Here are the steps to reproduce. $ pdfinfo input.pdf Title: AAA Subject: BBB Keywords: CCC Author: DDD Creator: ConTeXt - 2012.10.20 11:51 Producer: LuaTeX-0.70.2 CreationDate: Sun Oct 21 19:10:21 2012 ModDate: Sun Oct 21 19:10:21 2012 Tagged: no Pages: 1 Encrypted: no Page size: 595.276 x 841.89 pts (A4) File size: 87171 bytes Optimized: no PDF version: 1.6 $ gs -sDEVICE=pdfwrite -o output.pdf input.pdf GPL Ghostscript GIT PRERELEASE 9.07 (2012-07-31) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 $ pdfinfo output.pdf Title: NimbusSanL-Regu Subject: BBB Keywords: CCC Author: DDD Creator: frob Producer: GPL Ghostscript GIT PRERELEASE 9.07 CreationDate: Sun Oct 21 19:22:14 2012 ModDate: Sun Oct 21 19:22:14 2012 Tagged: no Pages: 1 Encrypted: no Page size: 595.276 x 841.89 pts (A4) File size: 10043 bytes Optimized: no PDF version: 1.4 The new test file can be found here: http://freeshell.de/~mpfusion/input.pdf Kind regards Marco
[toc] | [prev] | [next] | [standalone]
| From | ken <ken@spamcop.net> |
|---|---|
| Date | 2012-10-22 07:52 +0100 |
| Message-ID | <MPG.2aeefd81ff9ce9279898a1@usenet.plus.net> |
| In reply to | #1016 |
In article <50842ffd$0$6626$9b4e6d93@newsspool2.arcor-online.net>, netuse@lavabit.com says... > the issue is still not solved. It worked for the simple test file, > but it fails with more complex files. Specifically the `title` and > the `creator` is not kept. If you think you have found a bug, please report it at http://bugs.ghostscript.com so that we can track it, we aren't equpiied to track ad-hoc reports from random places. Ken
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.postscript
csiph-web