Re: ps2pdf issues

2016-07-22 Thread Masamichi Hosoda
>> For remote PDF links, rather than they are lost, I think that PDF
>> destination names are replaced.
> 
> Hmm.  This smells fishy.
> 
>> Would you know a tool other than texinfo that can generate remote
>> PDF links?
> 
> Sorry, no.

I've noticed that
plain pdfTeX (without texinfo) can generate PDF destination names
and web browsers can jump to them.

If I understand correctly,
Ghostscript seems to discard PDF destination names.

I've reported to Ghostscript Bugzilla.
http://bugs.ghostscript.com/show_bug.cgi?id=696943

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: ps2pdf issues

2016-07-21 Thread Masamichi Hosoda
>> PDF outline is not lost.  It is hidden.  The following command can
>> let show it.
>> 
>> $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=foo.new.pdf \
>>  foo.pdf -c '[ /PageMode /UseOutlines /DOCVIEW pdfmark'
> 
> What exactly do you mean with `hidden'?  Are PDF viewers still capable
> to show the outlines?

Yes.

If you use `ps2pdf foo.pdf foo.new.pdf`,
foo.new.pdf contains PDF outline but PDF viewers do not show it in default.
In this case, you can show it by some operating the PDF viewer.

On the other hand,
if you use the command I showed instead of `ps2pdf`,
PDF viewers show the PDF outline in default.

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: ps2pdf issues

2016-07-21 Thread Werner LEMBERG

> I've created Issue 4940.
> https://sourceforge.net/p/testlilyissues/issues/4940/

Thanks!

> PDF outline is not lost.  It is hidden.  The following command can
> let show it.
> 
> $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=foo.new.pdf \
>  foo.pdf -c '[ /PageMode /UseOutlines /DOCVIEW pdfmark'

What exactly do you mean with `hidden'?  Are PDF viewers still capable
to show the outlines?

> For remote PDF links, rather than they are lost, I think that PDF
> destination names are replaced.

Hmm.  This smells fishy.

> Would you know a tool other than texinfo that can generate remote
> PDF links?

Sorry, no.


Werner

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: ps2pdf issues

2016-07-21 Thread Masamichi Hosoda
>> I think this is due to texinfo.tex bug.
>> This patch might fix it.  [...]

I've created Issue 4940.
https://sourceforge.net/p/testlilyissues/issues/4940/

>> However, even if fix this, there are two problems.
>> 
>> PDF outline is lost.
>> Remote PDF links (between PDFs) are lost.
> 
> Interesting.  Do you think this is a bug in gs or in texinfo, or both?
> And do you have time to send bug reports and/or asking for help?

I was wrong.

PDF outline is not lost.
It is hidden.
The following command can let show it.

$ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=foo.new.pdf foo.pdf -c 
'[ /PageMode /UseOutlines /DOCVIEW pdfmark'

For remote PDF links, rather than they are lost,
I think that PDF destination names are replaced.

Would you know a tool other than texinfo
that can generate remote PDF links?

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: ps2pdf issues

2016-07-20 Thread Werner LEMBERG

Hello Masamich-san,


> I've tried Ghostscript 9.19.  [...]

thanks for testing.

> I think this is due to texinfo.tex bug.
> This patch might fix it.  [...]
> 
> However, even if fix this, there are two problems.
> 
> PDF outline is lost.
> Remote PDF links (between PDFs) are lost.

Interesting.  Do you think this is a bug in gs or in texinfo, or both?
And do you have time to send bug reports and/or asking for help?


Werner

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: ps2pdf issues

2016-07-20 Thread Masamichi Hosoda
> Just for fun I tried to execute
> 
>   ps2pdf notation.pdf notation.pdf.new
> 
> I got zillions of warnings
> 
> Warning: Outline has invalid link that was discarded.
> 
> and then zillions of
> 
> Warning: Link annotation points out of the document page range.
> 
> It closes with
> 
> This file had errors that were repaired or ignored.
> The file was produced by: 
>  xdvipdfmx (20160307) 
> Please notify the author of the software that produced this
> file that it does not conform to Adobe's published PDF
> specification.
> 
> Any ideas?  Could someone try with a newer gs version?

I've tried Ghostscript 9.19.
The following warnings are displayed a lot.

    Warning: Outline has invalid link that was discarded.
    Warning: Link annotation points out of the document page range.

I think this is due to texinfo.tex bug.
This patch might fix it.

```
--- a/tex/texinfo.tex
+++ b/tex/texinfo.tex
@@ -1540,7 +1540,7 @@ output) for that.)}
   %
   % Emulate the primitive of pdfTeX
   \def\pdfdest name#1 xyz{%
-\special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}%
+\special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos null]}%
   }
   \def\pdfmkdest#1{{%
 % We have to set dummies so commands such as @code, and characters

```

However, even if fix this, there are two problems.

PDF outline is lost.
Remote PDF links (between PDFs) are lost.

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel