[
https://issues.apache.org/jira/browse/PDFBOX-3550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15632116#comment-15632116
]
Maruan Sahyoun commented on PDFBOX-3550:
----------------------------------------
If awt works for us I'm fine with it. I have the same question as Tilman - why
is FOP not using awt for that. In addition the Adobe Java PDF library AFAIK is
also using their own implementation. One limitation we need to be aware of is
that not all of art works on Android. I know that we don't support that but the
more we do in that direction the bigger the task is we want to change that
(which I personally would love to see).
What I currently don't understand is how we get from a GlyphVector to a typical
content stream maybe you can elaborate on that a bit. I'd also be able to
replicate Acrobats (undocumented) layout model when it comes to form filling as
users typically compare our form filling with how it looks compared to Acrobat.
In order to not create issues we can't fix we need to be able to match that.
My current preference would be to work with the FOP people on that topic. At
least the enhanced OpenType support would be something we can jointly work on
and put it into FontBox. Harfbuzz on the other hand is well established but it
yet has to find it's way into Java - do we want to force us to use Java 9
because of that?
> 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: [email protected]
For additional commands, e-mail: [email protected]