Bug 527395

Summary: docbook2pdf: wrong paper size in produced pdf
Product: [Fedora] Fedora Reporter: Sandro Bonazzola <sandro.bonazzola>
Component: docbook-utilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: 0.6.14-17.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-14 01:33:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sandro Bonazzola 2009-10-06 08:17:02 UTC
Description of problem:
Using the following configuration:
LANG=it_IT.UTF-8

$ paperconf
a4
$ cat /etc/papersize
a4
$ locale LC_PAPER
297
210
UTF-8
$ cat source.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN">
<book>
<title>Test</title>
</book>
$ docbook2pdf source.xml

produce a source.pdf with papersize Letter instead of A4.

Note that:
$ docbook2ps source.xml
$ ps2pdf source.ps
produce a source.pdf with the correct A4 paper size.

Alwais reproducible.



Version-Release number of selected component (if applicable):
$ rpm -qf /usr/bin/docbook2ps /usr/bin/docbook2pdf /usr/bin/ps2pdf /usr/bin/paperconf
docbook-utils-pdf-0.6.14-16.fc11.noarch
docbook-utils-pdf-0.6.14-16.fc11.noarch
ghostscript-8.70-1.fc11.i586
libpaper-1.1.23-5.fc11.i586

  
Actual results:
produce a source.pdf with papersize Letter instead of A4.

Expected results:
produce a source.pdf with the correct A4 paper size.

Comment 1 Ondrej Vasik 2009-10-07 12:58:34 UTC
Thanks for report, I fixed docbook2pdf (in fact general jw issue, so affecting more formats) issue with locale based papersize selection. Now the locale based selection works - in docbook-utils-0.6.14-21.fc13. Could you please check the fix by using srpm/rpm from http://koji.fedoraproject.org/koji/taskinfo?taskID=1732873 before I'll make F-11 update? TIA.  

However, it is still not perfect - although tex source generated by jade (step in the middle of pdf generation) contains correct A4 paper size, size of the generated pdf (by pdfjadetex) is slightly different - not exact A4. Anyway - still better than USLetter-like size (the size differed from the exact Letter size as well even before my change).

Comment 2 Sandro Bonazzola 2009-10-09 07:39:31 UTC
output pdf opened with evince, property says: US Letter, Portrait (215 x 278 mm)
the problem affect Fedora 10 also.

Comment 3 Ondrej Vasik 2009-10-09 15:51:41 UTC
Yes, it does and I'm ok with F10 update as well ... is the srpm from koji working for you? I could make update for F-10 and F-11 afterwards if confirmed...

Comment 4 Sandro Bonazzola 2009-10-09 18:00:38 UTC
Well, the koji srpm build fine on F-11. However, as I said in comment #2 the final pdf is 215 x 278 mm (Letter is 216 × 279 mm), but A4 210 x 297 mm was expected as result. So it seems that the issue is not fixed.

Comment 5 Ondrej Vasik 2009-10-10 06:59:25 UTC
Strange ... on my machine it had almost A4 dimension for A4 LC_PAPER locale(actually in .tex middle-step it was defined exactly the same dimension of A4, final pdf was 2.2 pts x 3.3 pts smaller - so about 0,7 mm x 1mm smaller - this difference was done by pdfjadetex and I have no chance to influence it from docbook-utils). I'll check the fix once more time on Monday and probably do an testing update for F-11 and F-10, so you'll be able to use directly koji-built rpm's on your machine.

Comment 6 Fedora Update System 2009-10-12 10:24:15 UTC
docbook-utils-0.6.14-16.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/docbook-utils-0.6.14-16.fc10

Comment 7 Fedora Update System 2009-10-12 10:25:33 UTC
docbook-utils-0.6.14-17.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/docbook-utils-0.6.14-17.fc11

Comment 8 Fedora Update System 2009-10-12 10:27:10 UTC
docbook-utils-0.6.14-21.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/docbook-utils-0.6.14-21.fc12

Comment 9 Sandro Bonazzola 2009-10-13 06:05:06 UTC
(In reply to comment #7)
> docbook-utils-0.6.14-17.fc11 has been submitted as an update for Fedora 11.
> http://admin.fedoraproject.org/updates/docbook-utils-0.6.14-17.fc11  

This works fine for me on F-11: output size is A4, Portrait (209 x 296 mm).
Thanks.

Comment 10 Sandro Bonazzola 2009-10-13 06:11:28 UTC
(In reply to comment #6)
> docbook-utils-0.6.14-16.fc10 has been submitted as an update for Fedora 10.
> http://admin.fedoraproject.org/updates/docbook-utils-0.6.14-16.fc10  

This works fine also, thanks.

Comment 11 Fedora Update System 2009-10-14 01:33:18 UTC
docbook-utils-0.6.14-16.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2009-10-14 01:45:16 UTC
docbook-utils-0.6.14-17.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.