Comments (13)
Ok i'll try to take a look this weekend, thanks!
from pdf-writer.
you got it just right. hummus uses a simple glyph mapping which does not take into account script arabic considerations (and then there's right to left). There was a discussion on how to resolve this in galkahana/HummusJS#56.
you can take the solution we figured from there.
from pdf-writer.
Thanks for your quick reply.
The solution pointed by @hussasad looks promising albiet it is written in Javascript. Need to figure out how to use C++ version of that.
from pdf-writer.
@nashwaan can you provide a fully working cpp sample that shows the problem, i'm back on tackling this issue.
from pdf-writer.
I'm having the same issue ,is it fixed?
from pdf-writer.
@reemshahban It's fixed on my fork but it's not been merged. If I remember correctly @galkahana said it needs to be tested on Windows before we can merge.
Would you be able to do that?
from pdf-writer.
@amrnablus I tried to test the code of your fork on Windows but had some issues with PDFWriter code itself (could not get Arabic text to show), since those issues seem to be fixed on the master code, I merged your fixTextDirection(const std::string& inText, const std::string& charset)
with the code that uses fribidi only and it works as expected as you can see bellow (@amrnablus code vs original code).
Not sure if you want me to test something else.
from pdf-writer.
Looks good to me but @galkahana has some concerns on using fribidi only, would you be able to test icu as well?
from pdf-writer.
Did it now, same results, so both of them are ok.
Edit: maybe it is important to mention that I built all libraries using Visual Studio 2013 and not MinGW
from pdf-writer.
Sounds good, tbh i have no experience whatsoever with building on windows so i can't really comment, best get a review from @galkahana and then possibly merge.
Thanks @MarcoMartins86
from pdf-writer.
Hi. I'm using this code and I noticed two mem leaks in it. One is at line 65 of UnicodeTextUtils.cpp (visual_str is never freed). The other one is deeper in the C code and I didn't have the time to pinpoint it, but it seemed to have something to do with the list manipulations in fribidi-run.c.
from pdf-writer.
Ah! thanks!
Can you provide a sample code that causes the memory leak?
from pdf-writer.
Well, I can't provide a sample right now, but it seems to happen when you call the AbstractContentContext::fixTextDirection function.
from pdf-writer.
Related Issues (20)
- Can not modify a document by creating a new form XObject and using it in one of the pages HOT 3
- [Question] - pdf to image HOT 1
- Question about attachments HOT 2
- some example projects in wiki are missing HOT 2
- Streams objects writing problem HOT 2
- Add watermark to PDF HOT 7
- Missing lib.obj file HOT 3
- Android Build Workflow HOT 3
- CIDSet encoding does not conform with ISO 19005-2:2011, ISO 19005-3:2012 (PDF/A-2b or PDF/A-3b) HOT 21
- annotations are lost with PDFDocumentCopyingContext::AppendPDFPageFromPDF HOT 3
- How to draw Bezier curves using PDF-Witer library? HOT 2
- Parse a screenplay into scene objects? HOT 2
- color emojis HOT 16
- Links are removed when documents are merged HOT 8
- Color inversion problem occurs when exporting images HOT 1
- infinite loop HOT 2
- Crash when WriteUsedFontsDefinitions HOT 17
- Publish to github releases without PDFWriterTesting HOT 4
- U3D support, 10 years later HOT 10
- `Segmentation fault (core dumped)` just for adding `PDFWriter pdfWriter` in the `h` file HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf-writer.