You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basicaly we are using a pdf sdk to add comment on the pdf which works fine.
but to extract the note from the PDF we are using pdf-lib.
its working fine in case of english.
but with arbaic or udru
it returns the encoded value which we are not able to decode properly.
the PDF SDK is storing the annotation comment in Arabic as they are but when we try to extract that with pdf-lib it give this value
What were you trying to do?
Basicaly we are using a pdf sdk to add comment on the pdf which works fine.
but to extract the note from the PDF we are using pdf-lib.
its working fine in case of english.
but with arbaic or udru
it returns the encoded value which we are not able to decode properly.
the PDF SDK is storing the annotation comment in Arabic as they are but when we try to extract that with pdf-lib it give this value
need help on this @Hopding
How did you attempt to do it?
const annotRef = annotations.get(j);
const annot = pdfDoc.context.lookup(annotRef);
const comment = getAnnotationComment(annot);
const getAnnotationComment = (annot: any) => {
let comment = 'No comment found';
annot.dict.forEach((value: any, key: any) => {
if (key && key.encodedName === '/Contents') {
console.log(value.value, " value.value ");
comment = value.value || 'No comment found';
}
});
return comment;
};
What actually happened?
LOG:
þÿA1'F3
What did you expect to happen?
it should be in arbaic format not this
How can we reproduce the issue?
add the arabic annotaiton in pdf and then test
Version
1.1.1
What environment are you running pdf-lib in?
React Native
Checklist
Additional Notes
No response
The text was updated successfully, but these errors were encountered: