Last Comment Bug 770409 - pdf containing vertical japanese text does not render correctly
: pdf containing vertical japanese text does not render correctly
Status: RESOLVED FIXED
[pdfjs-c-rendering][pdfjs-f-fixed-ups...
:
Product: Firefox
Classification: Client Software
Component: PDF Viewer (show other bugs)
: unspecified
: x86 All
: -- normal with 2 votes (vote)
: Firefox 22
Assigned To: Artur Adib
:
Mentors:
Depends on: 848641 849627 849628
Blocks: 748924
  Show dependency treegraph
 
Reported: 2012-07-02 21:23 PDT by John Daggett (:jtd)
Modified: 2013-04-08 07:56 PDT (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
affected
-
affected


Attachments
About the MVO of UTR50 (392.29 KB, application/pdf)
2012-07-02 21:23 PDT, John Daggett (:jtd)
no flags Details
screenshot, pdf displayed with pdf.js vs. preview (298.50 KB, image/png)
2012-08-27 21:18 PDT, John Daggett (:jtd)
no flags Details

Description John Daggett (:jtd) 2012-07-02 21:23:48 PDT
Created attachment 638586 [details]
About the MVO of UTR50

Steps:

1. Open the attached pdf file

Result: file is never loaded, browser just shows the loading animation.

Original file: http://blogs.adobe.com/CCJKType/files/2012/07/TaroUTR50SortedList112.pdf
Comment 1 John Daggett (:jtd) 2012-07-02 21:25:42 PDT
Confirmed using 2012-07-02 nightly.
Comment 2 Alice0775 White 2012-07-02 22:40:31 PDT
Regression window(m-c)
Good(but No Japanese text):
http://hg.mozilla.org/mozilla-central/rev/305cd10b57d2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120601055003
Bad:
http://hg.mozilla.org/mozilla-central/rev/12ab69851e05
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120601073103
Pushlog:

Regression window(m-i)
Good(but No Japanese text):
http://hg.mozilla.org/integration/mozilla-inbound/rev/63ed999a6fe9
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120530222224
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/ff2ad97929e8
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120531021523
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=63ed999a6fe9&tochange=ff2ad97929e8

Triggered by: Bug 748924
Comment 3 Alex Keybl [:akeybl] 2012-07-16 08:50:40 PDT
Given bug 773397, tracking for FF16's release but not FF15. Also sending over to Artur since he landed the suspected regressing bug.
Comment 4 Brendan Dahl [:bdahl] 2012-07-16 09:51:39 PDT
This file should be loading fine in the current nightly. However, the CJK font doesn't seem to be rendering correctly.
Comment 5 Alex Keybl [:akeybl] 2012-08-23 15:02:23 PDT
It's not clear if this is a common problem, and PDF.js will ship in 17 or later, so untracking for release.
Comment 6 John Daggett (:jtd) 2012-08-27 21:17:51 PDT
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Firefox/17.0
Build date: 2012-08-27

PDF now loads but vertical text elements display incorrectly (see attached screenshot).
Comment 7 John Daggett (:jtd) 2012-08-27 21:18:50 PDT
Created attachment 655873 [details]
screenshot, pdf displayed with pdf.js vs. preview
Comment 8 rshimazu 2013-01-29 16:24:57 PST
The following urls are other examples of this bug, I think.

http://yama2so.com/hoki/jiinkyoukai.pdf
http://www.asahi-net.or.jp/~td6i-st/fuku-cathedral/new/gat.pdf
http://www.jcp.or.jp/web_download/seisaku/201204_teigen_panf.pdf#page=2
http://www.jsad.or.jp/paralympic/london/pdf/directory.pdf#page=2

Maybe if the PDF has not only vertical characters but also horizntal characters in the same document, it shows the problem.
Comment 9 Brendan Dahl [:bdahl] 2013-02-25 12:53:20 PST
Fixed in https://github.com/mozilla/pdf.js/pull/2686
Comment 10 rshimazu 2013-02-28 04:24:54 PST
I confirmed the fix with pdf.js 0.7.283 on Firefox 19(Vista).
Thank you.
Comment 11 David Frank 2013-03-13 00:08:32 PDT
further confirm issue fixed in 0.7.355 with traditional chinese vertical text document sample:

http://www.kadokawa.com.tw/Upload/product_201212281735422.pdf

I can see japan and taiwan pdf layout use vertical text a lot (especially with long article like novel), would love to see it in stable Firefox sooner than later (Firefox 19.0.2 still have this issue.)
Comment 12 Masatoshi Kimura [:emk] 2013-03-13 05:12:00 PDT
Fixed by bug 848641.
Unfortunately the fix is too big to backport to branches, IMO. So merging to Firefox will not be sooner than Firefox 22.
You can install the latest development version of PDF.js add-on if you can't wait: http://mozilla.github.com/pdf.js/extensions/firefox/pdf.js.xpi
Usually this is much newer than the Firefox internal version.
Comment 13 Mitar 2013-03-31 13:15:29 PDT
This fix does not yet completely resolve the text layer positioning. Even on the test PDF above, text layer is nit position correctly:

http://blogs.adobe.com/CCJKType/files/2012/07/TaroUTR50SortedList112.pdf

Tested using http://mozilla.github.com/pdf.js/web/viewer.html at 79c3546c924501ba4c9852233cd4638414cdf5ea.

If you select all text or make text be displayed, you can see that latin text on the first page is not displayed correctly.
Comment 14 Mitar 2013-03-31 13:16:13 PDT
Furthermore, it fails in same manner (hidden text layer) for PDFs from arXiv: http://arxiv.org/pdf/0707.3023.pdf
Comment 15 Masatoshi Kimura [:emk] 2013-03-31 15:38:16 PDT
The latin text problem is a separate issue and tracked by <https://github.com/mozilla/pdf.js/issues/2817>.
Comment 16 Mitza 2013-04-08 07:56:29 PDT
Verified as fixed on Firefox 23 Nightly(Build ID: 20130408030928) 
-the page loads correctly
-the text is correctly displayed	

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20130408 Firefox/23.0
Mozilla/5.0 (X11; Linux i686; rv:23.0) Gecko/20130408 Firefox/23.0
Mozilla/5.0 (Windows NT 6.2; rv:23.0) Gecko/20130408 Firefox/23.0

Note You need to log in before you can comment on or make changes to this bug.