[jira] [Commented] (PDFBOX-3147) PDFBox fail to write Thai character properly
[ https://issues.apache.org/jira/browse/PDFBOX-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15039709#comment-15039709 ] Nattapong Sirilappanich commented on PDFBOX-3147: - The leftmost oval in compareresult.jpg issue seem to be better in your file (example.pdf) The remain issue of that text in oval is the above combining character should be render a little bit lower. I think there's a glyph in font or some offset define in GPOS or GSUB for this case. The other red green oval in compareresult.jpg issue seem to be found in your file as well. > PDFBox fail to write Thai character properly > > > Key: PDFBOX-3147 > URL: https://issues.apache.org/jira/browse/PDFBOX-3147 > Project: PDFBox > Issue Type: Bug > Components: Writing >Affects Versions: 2.0.0 > Environment: Windows 7 x86-64. > JRE 8 build 1.8.0_66-b17 >Reporter: Nattapong Sirilappanich > Attachments: ArialUnicode.pdf, ThaiText.txt, compareresult.jpg, > example.pdf > > > {code} > try { > // Create a document and add a page to it > PDDocument document = new PDDocument(); > PDPage page = new PDPage(); > document.addPage( page ); > // Create a new font object by loading a TrueType font > into the document > PDFont font = PDType0Font.load(document, new > File("ARIALUNI.TTF")); > // Start a new content stream which will "hold" the to > be created content > PDPageContentStream contentStream = new > PDPageContentStream(document, page); > // Define a text content stream using the selected > font, moving the cursor and drawing the text "Hello World" > contentStream.beginText(); > contentStream.setFont( font, 12 ); > contentStream.newLineAtOffset( 100, 700 ); > contentStream.showText( "กูกินก้งปิ้งอยู่ในถ้ำ" ); > contentStream.endText(); > // Make sure that the content stream is closed: > contentStream.close(); > // Save the results and ensure that the document is > properly closed: > document.save( "ArialUnicode.pdf"); > document.close(); > } catch (IOException e) { > e.printStackTrace(); > } > {code} > The code above is modified from sample code provided via PDFBox example. > I tried to use Arial Unicode font which is shipped as part of Windows 7. > The generated PDF missing some glyph and render some other gibberish glyph. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-3147) PDFBox fail to render Thai character properly
Nattapong Sirilappanich created PDFBOX-3147: --- Summary: PDFBox fail to render Thai character properly Key: PDFBOX-3147 URL: https://issues.apache.org/jira/browse/PDFBOX-3147 Project: PDFBox Issue Type: Bug Components: Rendering Affects Versions: 2.0.0 Environment: Windows 7 x86-64. JRE 8 build 1.8.0_66-b17 Reporter: Nattapong Sirilappanich {code} try { // Create a document and add a page to it PDDocument document = new PDDocument(); PDPage page = new PDPage(); document.addPage( page ); // Create a new font object by loading a TrueType font into the document PDFont font = PDType0Font.load(document, new File("ARIALUNI.TTF")); // Start a new content stream which will "hold" the to be created content PDPageContentStream contentStream = new PDPageContentStream(document, page); // Define a text content stream using the selected font, moving the cursor and drawing the text "Hello World" contentStream.beginText(); contentStream.setFont( font, 12 ); contentStream.newLineAtOffset( 100, 700 ); contentStream.showText( "กูกินก้งปิ้งอยู่ในถ้ำ" ); contentStream.endText(); // Make sure that the content stream is closed: contentStream.close(); // Save the results and ensure that the document is properly closed: document.save( "ArialUnicode.pdf"); document.close(); } catch (IOException e) { e.printStackTrace(); } {code} The code above is modified from sample code provided via PDFBox example. I tried to use Arial Unicode font which is shipped as part of Windows 7. The generated PDF missing some glyph and render some other gibberish glyph. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-3147) PDFBox fail to render Thai character properly
[ https://issues.apache.org/jira/browse/PDFBOX-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nattapong Sirilappanich updated PDFBOX-3147: Attachment: ThaiText.txt The text file encoded in UTF-8 contains Thai text similar to the one in code that used to generate PDF file. > PDFBox fail to render Thai character properly > - > > Key: PDFBOX-3147 > URL: https://issues.apache.org/jira/browse/PDFBOX-3147 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 7 x86-64. > JRE 8 build 1.8.0_66-b17 >Reporter: Nattapong Sirilappanich > Attachments: ArialUnicode.pdf, ThaiText.txt, compareresult.jpg > > > {code} > try { > // Create a document and add a page to it > PDDocument document = new PDDocument(); > PDPage page = new PDPage(); > document.addPage( page ); > // Create a new font object by loading a TrueType font > into the document > PDFont font = PDType0Font.load(document, new > File("ARIALUNI.TTF")); > // Start a new content stream which will "hold" the to > be created content > PDPageContentStream contentStream = new > PDPageContentStream(document, page); > // Define a text content stream using the selected > font, moving the cursor and drawing the text "Hello World" > contentStream.beginText(); > contentStream.setFont( font, 12 ); > contentStream.newLineAtOffset( 100, 700 ); > contentStream.showText( "กูกินก้งปิ้งอยู่ในถ้ำ" ); > contentStream.endText(); > // Make sure that the content stream is closed: > contentStream.close(); > // Save the results and ensure that the document is > properly closed: > document.save( "ArialUnicode.pdf"); > document.close(); > } catch (IOException e) { > e.printStackTrace(); > } > {code} > The code above is modified from sample code provided via PDFBox example. > I tried to use Arial Unicode font which is shipped as part of Windows 7. > The generated PDF missing some glyph and render some other gibberish glyph. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-3147) PDFBox fail to render Thai character properly
[ https://issues.apache.org/jira/browse/PDFBOX-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nattapong Sirilappanich updated PDFBOX-3147: Attachment: compareresult.jpg The screen shot comparing rendered PDF generated by PDFBox and actual text with similar font rendered in Microsoft Notepad. > PDFBox fail to render Thai character properly > - > > Key: PDFBOX-3147 > URL: https://issues.apache.org/jira/browse/PDFBOX-3147 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 7 x86-64. > JRE 8 build 1.8.0_66-b17 >Reporter: Nattapong Sirilappanich > Attachments: ArialUnicode.pdf, compareresult.jpg > > > {code} > try { > // Create a document and add a page to it > PDDocument document = new PDDocument(); > PDPage page = new PDPage(); > document.addPage( page ); > // Create a new font object by loading a TrueType font > into the document > PDFont font = PDType0Font.load(document, new > File("ARIALUNI.TTF")); > // Start a new content stream which will "hold" the to > be created content > PDPageContentStream contentStream = new > PDPageContentStream(document, page); > // Define a text content stream using the selected > font, moving the cursor and drawing the text "Hello World" > contentStream.beginText(); > contentStream.setFont( font, 12 ); > contentStream.newLineAtOffset( 100, 700 ); > contentStream.showText( "กูกินก้งปิ้งอยู่ในถ้ำ" ); > contentStream.endText(); > // Make sure that the content stream is closed: > contentStream.close(); > // Save the results and ensure that the document is > properly closed: > document.save( "ArialUnicode.pdf"); > document.close(); > } catch (IOException e) { > e.printStackTrace(); > } > {code} > The code above is modified from sample code provided via PDFBox example. > I tried to use Arial Unicode font which is shipped as part of Windows 7. > The generated PDF missing some glyph and render some other gibberish glyph. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-3147) PDFBox fail to render Thai character properly
[ https://issues.apache.org/jira/browse/PDFBOX-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nattapong Sirilappanich updated PDFBOX-3147: Attachment: ArialUnicode.pdf The generated PDF file > PDFBox fail to render Thai character properly > - > > Key: PDFBOX-3147 > URL: https://issues.apache.org/jira/browse/PDFBOX-3147 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 7 x86-64. > JRE 8 build 1.8.0_66-b17 >Reporter: Nattapong Sirilappanich > Attachments: ArialUnicode.pdf > > > {code} > try { > // Create a document and add a page to it > PDDocument document = new PDDocument(); > PDPage page = new PDPage(); > document.addPage( page ); > // Create a new font object by loading a TrueType font > into the document > PDFont font = PDType0Font.load(document, new > File("ARIALUNI.TTF")); > // Start a new content stream which will "hold" the to > be created content > PDPageContentStream contentStream = new > PDPageContentStream(document, page); > // Define a text content stream using the selected > font, moving the cursor and drawing the text "Hello World" > contentStream.beginText(); > contentStream.setFont( font, 12 ); > contentStream.newLineAtOffset( 100, 700 ); > contentStream.showText( "กูกินก้งปิ้งอยู่ในถ้ำ" ); > contentStream.endText(); > // Make sure that the content stream is closed: > contentStream.close(); > // Save the results and ensure that the document is > properly closed: > document.save( "ArialUnicode.pdf"); > document.close(); > } catch (IOException e) { > e.printStackTrace(); > } > {code} > The code above is modified from sample code provided via PDFBox example. > I tried to use Arial Unicode font which is shipped as part of Windows 7. > The generated PDF missing some glyph and render some other gibberish glyph. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Comment Edited] (PDFBOX-3147) PDFBox fail to render Thai character properly
[ https://issues.apache.org/jira/browse/PDFBOX-3147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15035312#comment-15035312 ] Nattapong Sirilappanich edited comment on PDFBOX-3147 at 12/2/15 5:52 AM: -- The screen shot comparing rendered PDF generated by PDFBox and actual text with similar font rendered in Microsoft Notepad. Notice that in left most red oval have one glyph missing under base line character compare to left most green oval being rendered in Notepad. The second to left most oval contain some overlap rectangular character due to it fail to render glyph properly. The right most green oval illustrate how Notepad render it. was (Author: na...@th.ibm.com): The screen shot comparing rendered PDF generated by PDFBox and actual text with similar font rendered in Microsoft Notepad. > PDFBox fail to render Thai character properly > - > > Key: PDFBOX-3147 > URL: https://issues.apache.org/jira/browse/PDFBOX-3147 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 7 x86-64. > JRE 8 build 1.8.0_66-b17 >Reporter: Nattapong Sirilappanich > Attachments: ArialUnicode.pdf, ThaiText.txt, compareresult.jpg > > > {code} > try { > // Create a document and add a page to it > PDDocument document = new PDDocument(); > PDPage page = new PDPage(); > document.addPage( page ); > // Create a new font object by loading a TrueType font > into the document > PDFont font = PDType0Font.load(document, new > File("ARIALUNI.TTF")); > // Start a new content stream which will "hold" the to > be created content > PDPageContentStream contentStream = new > PDPageContentStream(document, page); > // Define a text content stream using the selected > font, moving the cursor and drawing the text "Hello World" > contentStream.beginText(); > contentStream.setFont( font, 12 ); > contentStream.newLineAtOffset( 100, 700 ); > contentStream.showText( "กูกินก้งปิ้งอยู่ในถ้ำ" ); > contentStream.endText(); > // Make sure that the content stream is closed: > contentStream.close(); > // Save the results and ensure that the document is > properly closed: > document.save( "ArialUnicode.pdf"); > document.close(); > } catch (IOException e) { > e.printStackTrace(); > } > {code} > The code above is modified from sample code provided via PDFBox example. > I tried to use Arial Unicode font which is shipped as part of Windows 7. > The generated PDF missing some glyph and render some other gibberish glyph. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org