hi all i have a problem with libreoffice in Arabic and English when I export it to pdf show (-) with the words this pictures just for example.
Share the file, not a screenshot.
Unfortunately, this is a bug that has persisted for years:
my report: https://bugs.documentfoundation.org/show_bug.cgi?id=114257
detail of the problem: https://bugs.documentfoundation.org/show_bug.cgi?id=104921
I use manual¯o process to delete unwanted kashidas from the ODG (but I don’t advise to use it in PDF, because there could be bigger tolerances in Sizes for unwanted kashidas - you can test it, but presumably you have to increase the constant ‘correction’ in 1st line of the macro).
I convert the Arabic text to curves and then use the macro to delete unwanted kashidas. It is not ideal, big disadvantage is the exported Arabic text isn’t text but curves, but I didn’t discover better solution.
- Select for example TextFrame with Arabic text and Shape/ Convert/ To Curve. It will make wrong kashidas.
- Ungroup the converted curves Shape/ Group/ Ungroup (Macro is not functional for grouped shapes)
- Select one bad kashida and run the macro
The macro will traverse the curves and then delete ones with the same size like selected kashida (± the constant ‘correction’).
Sub deleteKashidas 'delete the bad kashidas
const correction=1 '+- this number for size-detection the unwanted kashidas
dim oDoc as object, oPage as object, width&, height&, oSel as object, i&, j&, o as object, a%, bAll as boolean, oCollection as object
oDoc=ThisComponent
oSel=oDoc.getCurrentSelection()
if isNull(oSel) then
msgbox("Select one bad kashida!", 32)
exit sub 'nothing is selected
end if
o=oSel.getByIndex(0) 'selected kashida
width=o.Size.Width
height=o.Size.Height
if 6=msgbox("Delete all kashidas automatically?", 52) then bAll=true
rem prochází křivky a kašídy si uloží do pole
for i=0 to oDoc.DrawPages.Count-1 'traverse all Pages
oCollection=createUnoService("com.sun.star.drawing.ShapeCollection")
oPage=oDoc.DrawPages.getByIndex(i) 'current Page
for j=0 to oPage.Count-1 'traverse all shapes in Page
o=oPage.getByIndex(j) 'current shape
if o.Size.Width>=width-correction AND o.Size.Width<=width+correction AND o.Size.Height>=height-correction AND o.Size.Height<=height+correction then 'remember the kashida
if NOT bAll then
oDoc.CurrentController.Select(o)
a=msgbox("Delete this kashida?", 36)
else
a=6
end if
if a=6 then
o.FillColor=RGB(255,0,0) 'color bad kashida
oCollection.add(o) 'remember bad kashida
end if
end if
next j
if oCollection.Count>0 then 'delete the remembered kashidas
oDoc.CurrentController.Select(oCollection)
dim document as object, dispatcher as object
document=oDoc.CurrentController.Frame
dispatcher=createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:Delete", "", 0, array())
end if
next i
End Sub