[
https://issues.apache.org/jira/browse/PDFBOX-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13995660#comment-13995660
]
Tilman Hausherr edited comment on PDFBOX-2073 at 5/12/14 9:43 PM:
------------------------------------------------------------------
[~May 2014] could you do me a favour? Please open Acrobat Viewer with your
file, and make a screenshot of the properties, fonts. Does the font name look
like the screenshot I attached, i.e. unreadable? Or is the font name something
japanese?
I am asking because I suspect that more changes are needed, when saving names,
i.e. not make list what to convert, instead decide what we don't convert, e.g.
a-z,A-Z,0-9,-+_ .
was (Author: tilman):
[~May 2014] could you do me a favour? Please open Acrobat Viewer with your
file, and make a screenshot of the properties, fonts. Does the font name look
like the screenshot I attached, i.e. unreadable? Or is the font name something
japanese?
I am asking because I suspect that more changes are needed, when saving names,
i.e. not make list what to convert, instead decide what we don't convert, e.g.
a-z,A-Z,0-9,-+_ . For example, at this time, the "#" is not on the exception
list so it would be written unchanged.
> PDF files with unusual Japanese font can not be rewrite correctly
> -----------------------------------------------------------------
>
> Key: PDFBOX-2073
> URL: https://issues.apache.org/jira/browse/PDFBOX-2073
> Project: PDFBox
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 1.8.5, 1.8.6, 2.0.0
> Environment: Windows 7 32bit
> Reporter: May Yu
> Assignee: Tilman Hausherr
> Priority: Critical
> Fix For: 1.8.6, 2.0.0
>
> Attachments: font_screenshot1.png, landscape.pdf
>
>
> While rotate attached pdf file, The Japanese characters cannot display in the
> output pdf file.
> This problem can also occur when marge PDF files.
> We suspect that this caused by the name of font type.
> Environment
> -------------------------------------------------
> OS : Windows 7 (32bit)
> jvm : 1.6
> pdfbox: 1.8.5
> -------------------------------------------------
> Code to reproduce the problem
> -------------------------------------------------
> public static void main(String[] args) {
> String filePath = "D:\\test\\landscape.pdf";
> String newPDFFile = "D:\\test\\new_landscape.pdf";
> try {
> PDDocument rotatedDocument = PDDocument.load(filePath);
> PDDocument document = new PDDocument();
> int pageNumber = document.getNumberOfPages();
> for (int i=0; i<pageNumber; i++) {
> PDPage page =
> (PDPage)document.getDocumentCatalog().getAllPages().get(i);
> page.setRotation(-90);
> rotatedDocument.addPage(page);
> }
> rotatedDocument.save(newPDFFile);
> document.close();
> rotatedDocument.close();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> -------------------------------------------------
--
This message was sent by Atlassian JIRA
(v6.2#6252)