JohnsonGao / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

When get a title, text string should not be skipped is 2 byte behind the U+001B. #182

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Prepare the PDF that meet the following requirements in "Title".
   -> I have attached the sample pdf.

---
ISO 32000-1:2008 Document management – Portable document format – Part 1: 
PDF 1.7
7.9.2.2 Text String Type

An escape sequence may appear anywhere in a Unicode text string to indicate the 
language in which subsequent text shall be written.
The escape sequence shall consist of the following elements, in order:
a)The Unicode value U+001B (that is, the byte sequence 0 followed by 27).
b)A 2- byte ISO 639 language code.
EXAMPLEen for English or ja for Japanese encoded as ASCII characters.
c)(Optional) A 2-byte ISO 3166 country code.
EXAMPLEUS for the United States or JP for Japan.
d)The Unicode value U+001B.

---
2. Call the FPDF_GetMetaText to get the "Title".
3. It has been deleted 2byte after the "d)The Unicode value U+001B" at 
"pdfium\core\src\fpdfapi\fpdf_parser\fpdf_parser_decode.cpp PDF_DecodeText" 

What is the expected output?
・It has not deleted 2byte after the "d)The Unicode value U+001B".

What version of the product are you using? On what operating system?
・chromium/2441 master
・Windows7(x64)

Original issue reported on code.google.com by yamashit...@gmail.com on 3 Jul 2015 at 9:26

Attachments: