bugs in web.pdf

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bugs in web.pdf

Federico Bruni-2
If you give a look at this PDF:
http://lilypond.org/doc/v2.19/Documentation/web.pdf

you'll see some bugs:

- the images not generated by LilyPond have often a poor quality and
some of them run out of the page
- PDF page 10 is in landscape (while the document is a regular A4 of
course)




_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bugs in web.pdf

Federico Bruni-2


Il giorno dom 16 apr 2017 alle 8:46, Federico Bruni
<[hidden email]> ha scritto:
> If you give a look at this PDF:
> http://lilypond.org/doc/v2.19/Documentation/web.pdf
>
> you'll see some bugs:
>
> - the images not generated by LilyPond have often a poor quality and
> some of them run out of the page

Well, this is not a new issue and depends on the quality of the images
used.
I guess that we can ignore it.

> - PDF page 10 is in landscape (while the document is a regular A4 of
> course)
>
>
>

This is the actual bug. I've investigated...
If you replace v2.19 with previous versions you can see that previous
builds used PdfTex instead of Xetex and the image was compressed to fit
on the vertical A4 sheet.

What's interesting is that my locally compiled web.pdf (with Xetex
version 2017.03.30:1237) displays page 10 almost correctly, in that the
page stays A4 vertical but the image is rotated 90° counter-clockwise.
See attached the extracted page.
web.pdf on lilypond.org was built with a more recent version of Xetex.

Masamichi, any idea of what's going on?



_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

web-page10.pdf (106K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bugs in web.pdf

Masamichi HOSODA-2
>> - PDF page 10 is in landscape (while the document is a regular A4 of
>> - course)
>>
>
> This is the actual bug. I've investigated...
> If you replace v2.19 with previous versions you can see that previous
> builds used PdfTex instead of Xetex and the image was compressed to
> fit on the vertical A4 sheet.
>
> What's interesting is that my locally compiled web.pdf (with Xetex
> version 2017.03.30:1237) displays page 10 almost correctly, in that
> the page stays A4 vertical but the image is rotated 90°
> counter-clockwise. See attached the extracted page.
> web.pdf on lilypond.org was built with a more recent version of Xetex.
>
> Masamichi, any idea of what's going on?

In my investigate, if I understand correctly,
`Documentation/ly-example/granados.ly` has landscape settings.
So `granados.pdf` generated from `granados.ly` has `/Rotate 90`.

pdfTeX supports `/Rotate` in including PDFs.
Unfortunately, XeTeX does not support it.
http://tug.org/pipermail/xetex/2015-November/026197.html

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bugs in web.pdf

Masamichi HOSODA-2
>> What's interesting is that my locally compiled web.pdf (with Xetex
>> version 2017.03.30:1237) displays page 10 almost correctly, in that
>> the page stays A4 vertical but the image is rotated 90°
>> counter-clockwise. See attached the extracted page.
>> web.pdf on lilypond.org was built with a more recent version of Xetex.

I think that it is not caused by the difference in XeTeX version.
Does your environment have `extractpdfmark`?

GUB has `extractpdfmark` and Ghostscript 9.20.
In such environments, PDFs are processed by Ghostscript after extractpdfmark.
At that time, Ghostscript seems to rotate by "majority decision".

http://latex.org/forum/viewtopic.php?f=45&t=9783&sid=fe022a82377196e9b0fb5ff24955ecf9
http://stackoverflow.com/questions/3089773/how-to-change-page-orientation-of-pdf-ghostscript-or-postscript-solution-neede

`-dAutoRotatePages=/None` option for Ghostscript seems to need.
This will prevent landscape pages like lilypond.org web.pdf page 10.
However, it can not prevent image rotation like your web.pdf page 10.

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bugs in web.pdf

Federico Bruni-2


Il giorno mer 26 apr 2017 alle 17:29, Masamichi Hosoda
<[hidden email]> ha scritto:

>>>  What's interesting is that my locally compiled web.pdf (with Xetex
>>>  version 2017.03.30:1237) displays page 10 almost correctly, in that
>>>  the page stays A4 vertical but the image is rotated 90°
>>>  counter-clockwise. See attached the extracted page.
>>>  web.pdf on lilypond.org was built with a more recent version of
>>> Xetex.
>
> I think that it is not caused by the difference in XeTeX version.
> Does your environment have `extractpdfmark`?
>

No, it's not packaged for Fedora.
Should I install it from source?
https://github.com/trueroad/extractpdfmark

> GUB has `extractpdfmark` and Ghostscript 9.20.
> In such environments, PDFs are processed by Ghostscript after
> extractpdfmark.
> At that time, Ghostscript seems to rotate by "majority decision".
>
> http://latex.org/forum/viewtopic.php?f=45&t=9783&sid=fe022a82377196e9b0fb5ff24955ecf9
> http://stackoverflow.com/questions/3089773/how-to-change-page-orientation-of-pdf-ghostscript-or-postscript-solution-neede
>
> `-dAutoRotatePages=/None` option for Ghostscript seems to need.
> This will prevent landscape pages like lilypond.org web.pdf page 10.
> However, it can not prevent image rotation like your web.pdf page 10.


_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bugs in web.pdf

Masamichi HOSODA-2
> No, it's not packaged for Fedora.
> Should I install it from source?
> https://github.com/trueroad/extractpdfmark

No.
I've found out the difference between
your environment and the GUB environment.
Thank you.

If I understand correctly, there are two different problems.

The former one is that XeTeX does not support `/Rotate`.
It occurs in both your environment and the GUB environment.

The latter one is that Ghostscript is
"too clever" to rotate pages automatically with "majority decision".
It occurs only in GUB environment
which has `extractpdfmark` and Ghostscript 9.20,
and it does not occur in your environment
which does not have `extractpdfmark`.

If you would like to reproduce the latter one,
Debian stretch and Ubuntu 17.04 have `extractpdfmark` package.

Anyway, I've created a patch to solve the latter one.
https://sourceforge.net/p/testlilyissues/issues/5126/

But, the former one seems to be difficult to solve.

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bugs in web.pdf

Masamichi HOSODA-2
> If I understand correctly, there are two different problems.
>
> The former one is that XeTeX does not support `/Rotate`.
> It occurs in both your environment and the GUB environment.
>
[...snip...]
>
> But, the former one seems to be difficult to solve.

I've created the patch to solve the former one.
https://sourceforge.net/p/testlilyissues/issues/5128/

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Loading...