omarss / pdfium

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

FPDF_GetMetaText should not skip 2 bytes behind U+001B for "Title". #191

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The title of property of attached file is "Super Visual Formade".
But it becomes the "uper Visual Formade" when I use "FPDF_GetMetaText" to get 
"Title".
The attached file title include the "language code".
"language code" is sandwiched in between "U+001B".
2 bytes behind rear "U+001B" are skipped.

・What steps will reproduce the problem?
Call the FPDF_GetMetaText to get the "Title".

・What is the expected output?
"Super Visual Formade.pdf" 

・What do you see instead?
"uper Visual Formade.pdf" 

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

Original issue reported on code.google.com by kowa0...@gmail.com on 5 Aug 2015 at 1:30

Attachments:

GoogleCodeExporter commented 8 years ago
> The title of property of attached file is "Super Visual Formade".

I am sorry for the error.
The actual title is "[1B]ja[1B]Super Visual Formade", where "[1B]" means the 
Unicode value U+001B so as "[1B]ja[1B]" forms an escape sequence specified in 
"ISO 32000-1:2008 Document management – Portable document format – Part 1: 
PDF 1.7 / 7.9.2.2 Text String Type".

> ・What is the expected output?
> "Super Visual Formade.pdf".
> 
> ・What do you see instead?
> "uper Visual Formade.pdf".

I am very sorry for the error again.
The title does not include an extension ".pdf".
I should have reported as follows:

 ・What is the expected output?
It returns "Super Visual Formade".

 ・What do you see instead?
It returns "uper Visual Formade".

Original comment by kowa0...@gmail.com on 11 Aug 2015 at 7:11