[ 
https://issues.apache.org/jira/browse/PDFBOX-3550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15639250#comment-15639250
 ] 

Maruan Sahyoun commented on PDFBOX-3550:
----------------------------------------

[~omidp] thank you very much for your consistent input on that topic. If you'd 
like to help us out on that here are some things you could do.

- develop and document some small tests cases rtl text, ltr text, mixed
- look at the edge cases Arabic has when it comes to laying out the word 
properly
- make sure these are also reflected
- start from very basic single words to combinations word, numbers, Arabic 
intermixed with English text.
- create PDF and/or graphics from these using whatever library you think will 
provide the correct result so we can compare these with a future outcome using 
PDFBox for that
- if possible use the above mentioned Java APIs such as TextLayout, Bidi and 
GlyphVector to create these
- create test cases using PDFBox current API to replicate the result although 
we do know that these will be wrong and/or the API might change

You can attach these to that issue.

If you can think about other ways of providing help please let us know.

And please note that this is neither a commitment that the functionality will 
land in PDFBox nor is there a definitive timeframe when this will be a 
available. I had hoped to implement that but given current commitments I have 
it is unlikely that I'm able to do it in the short term (I'm trying to 
concentrate on resolving AcroForms related stuff in my spare time for the 
momen).

> OpenType Shaping
> ----------------
>
>                 Key: PDFBOX-3550
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3550
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>         Environment: All
>            Reporter: Omid Pourhadi
>              Labels: unicode
>         Attachments: BYekan.ttf
>
>
> the problem is, in some languages letters need to be joined together for 
> example, consider this word 
> {color:red}
> سلام 
> {color}
> but after creating a pdf it contorts to 
> {color:red}
> س‌ل‌ام
> {color}
> with extra semi-spaces. I think this is a bug in pdfbox and definetly is not 
> related to font.
> {code:title=SampleCode.java|borderStyle=solid}
> public class SampleCode
> {
>     public static void main(String[] args) throws IOException
>     {
>         
>         PDDocument document = new PDDocument();
>       //this font perfectly works in iText and JasperReport with the same text
>         PDFont titleFont = PDType0Font.load(document, 
> SampleCode.class.getResourceAsStream("/BYekan.ttf"));
>         PDPage page = new PDPage(PDRectangle.A4);
>         document.addPage(page);
>         PDPageContentStream contentStream = new PDPageContentStream(document, 
> page);
>         contentStream.beginText();
>         contentStream.setFont(titleFont, 12);
>         contentStream.newLineAtOffset(0, 100);
>         contentStream.showText("سلام");
>         contentStream.endText();
>         contentStream.close();
>         
>       
>         document.save(new File("/home/omidp/temp/htmltopdf/output.pdf"));
>         document.close();
>     }
> }
> {code}



--
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

Reply via email to