Bug 655713

Summary: Publican should not ship PDFs for known broken languages
Product: [Community] Publican Reporter: Ankit Patel <ankit>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 2.3CC: jfearn, mhideo, misty, mmcallis, peter.moulder, publican-list, r.landmann
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Known issues are present in the tools that publican uses to render PDF documents. Consequently, rendering PDFs for Indic and right to left languages is broken. To work around the upstream issues, publican no builds PDFs when packaging the following languages: *
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-07 22:49:17 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 654951    
Attachments:
Description Flags
Add si-LK to the set of Indic languages (to be excluded from pdf generation). (Untested.) none

Description Ankit Patel 2010-11-22 04:14:34 EST
Description of problem:
With publican and brew combination one can't publish specific formatted documents to docs.redhat.com.

How reproducible:
Everytime

 
Actual results:
With publican+brew one can generate specific formatted document (html, pdf, html-single, etc) locally, but this option is not available in the case of publishing docs to docs.redhat.com

Expected results:
One should be allowed to publish documents in any format of document.

Additional info:
Since Indic localized PDF rendering is not supported at the moment, it has become the high priority to get rid of PDFs generated and published using publican+brew combination.
Comment 2 Jeff Fearn 2010-11-22 17:26:58 EST
I'd rephrase this bug to:

Indic PDFs should never be generated for web site packages due to the fonts not being compatible with FOP.
Comment 3 Michael Hideo 2010-11-22 17:40:36 EST
Changed Product to Fedora.

I think having a switch in the publican.cfg file that allows one to specify individual languages to show pdfs in english would be a wide enough functionality to trap this case and future cases that may arise.
Comment 4 Jeff Fearn 2010-11-22 18:05:10 EST
(In reply to comment #3)
> Changed Product to Fedora.
> 
> I think having a switch in the publican.cfg file that allows one to specify
> individual languages to show pdfs in english would be a wide enough
> functionality to trap this case and future cases that may arise.

The untranslated content is not available by the time the PDF is being generated for the web site. It would take quite a bit of re-engineering to carry two XML payloads in the SRPM.
Comment 5 Ruediger Landmann 2010-11-22 22:05:22 EST
(In reply to comment #2)
> I'd rephrase this bug to:
> 
> Indic PDFs should never be generated for web site packages due to the fonts not
> being compatible with FOP.

There's a related problem for RTL languages (such as ar-SA, fa-IR, he-IL),
since presently, FOP does not support these at all. (Support is expected in FOP
1.1 --
http://www.mail-archive.com/fop-users@xmlgraphics.apache.org/msg15558.html)

If we're going to exclude Indic languages, we should probably exclude these as
well.
Comment 6 Jeff Fearn 2010-11-22 22:24:14 EST
Removed PDF from the list of web formats for all Indic + ar-SA, fa-IR, he-IL languages.

Fixed in build: 2.3-0%{?dist}.t47
Comment 7 Ankit Patel 2010-11-23 01:55:42 EST
(In reply to comment #6)
> Removed PDF from the list of web formats for all Indic + ar-SA, fa-IR, he-IL
> languages.
> 
> Fixed in build: 2.3-0%{?dist}.t47

Thx Jeff, Is there a way I could grab this build and test it?

Couldn't find it on koji neither brew!
Comment 8 Ruediger Landmann 2010-11-23 02:14:41 EST
(In reply to comment #7)
> (In reply to comment #6)
> > Removed PDF from the list of web formats for all Indic + ar-SA, fa-IR, he-IL
> > languages.
> > 
> > Fixed in build: 2.3-0%{?dist}.t47
> 
> Thx Jeff, Is there a way I could grab this build and test it?

Instructions are here: https://fedorahosted.org/publican/wiki/Installing

If you're using an operating system other than Fedora 13, the dependencies might be somewhat different, but the procedure is otherwise the same. Any error messages that you get while trying to run ./Build local will tell you what dependencies you're missing.
Comment 9 Ankit Patel 2010-11-23 02:36:56 EST
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > Removed PDF from the list of web formats for all Indic + ar-SA, fa-IR, he-IL
> > > languages.
> > > 
> > > Fixed in build: 2.3-0%{?dist}.t47
> > 
> > Thx Jeff, Is there a way I could grab this build and test it?
> 
> Instructions are here: https://fedorahosted.org/publican/wiki/Installing
> 
> If you're using an operating system other than Fedora 13, the dependencies
> might be somewhat different, but the procedure is otherwise the same. Any error
> messages that you get while trying to run ./Build local will tell you what
> dependencies you're missing.

Ok, I think better wait for the update from Fedora 13 or Fedora 14, as the bug moved to MODIFIED state.
Comment 10 Misty Stanley-Jones 2010-11-24 00:08:09 EST
Jeff, I just build a hi-IN PDF in a website. 

publican build --embedtoc --formats=pdf --langs=hi-IN --publish
publican install_book --site_config ./testsite.cfg --lang hi-IN

[mstanley@cheezel testbook]$ pwd
/home/mstanley/testbook/website/hi-IN/Documentation/0.1/pdf/testbook

[mstanley@cheezel testbook]$ rpm -qa |grep publican
publican-2.3-0.fc14.t51.noarch
Comment 11 Ruediger Landmann 2010-11-24 00:50:01 EST
(In reply to comment #10)
> Jeff, I just build a hi-IN PDF in a website. 

The real test is whether Publican will package the PDF for /shipping/; you can test this by building the package with: 

publican package --binary --lang hi-IN

Take a look in the web RPM and confirm that there's no pdf directory in there

You could also install the package to verify that it installs cleanly, although unless you have a Publican-generated website at the default location (/var/www/html/docs) on your machine, you won't see much when you browse the results.
Comment 12 Misty Stanley-Jones 2010-11-24 00:59:20 EST
OK, testing the proper thing. When I installed the resultant RPM, no PDF was present in /var/www/html/docs/hi-IN/. Verified.
Comment 13 Ryan Lerch 2010-11-28 19:23:32 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Known issues are present in the tools that publican uses to render PDF documents. Consequently, rendering PDFs for Indic and right to left languages is broken. To work around the upstream issues, publican no builds PDFs when packaging the following languages:
*
Comment 14 Jeff Fearn 2010-12-07 22:49:17 EST
Publican 2.4 has shipped with a fix for this issue.
Comment 15 Peter Moulder 2011-09-06 02:29:50 EDT
(I was delaying sending this, but it looks like FOP will still be with us for a while.)

Please add the Indic language si-LK to the list.  From what I can see in the one or two si-LK pdfs I looked at from docs.redhat.org, FOP output for this language suffers both from the font fallback problem (lots of text simply missing) and from poor shaping (resulting in vowel marks disconnected from their consonant).

It looks like publican/lib/publican/Builder.pm is the only file that's affected.  I attach an untested patch.
Comment 16 Peter Moulder 2011-09-06 02:31:54 EDT
Created attachment 521580 [details]
Add si-LK to the set of Indic languages (to be excluded from pdf generation).  (Untested.)