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
Now I am get the coordinate from synctex and then convert it to react-pdf-highlighter coordinate like this:
const clientCoordinate = (position: PdfPosition[]) => {
var hl = new Array<IHighlight>;
position.forEach((item: PdfPosition) => {
let sc: Scaled = {
x1: item.h,
y1: item.v,
x2: item.x,
y2: item.y,
width: item.width,
height: item.height
};
let sca = new Array();
sca.push(sc);
var pos: ScaledPosition = {
pageNumber: item.page,
usePdfCoordinates: true,
boundingRect: sc,
rects: sca
};
var hightLight: IHighlight = {
id: uuidv4.toString(),
position: pos,
content: {},
comment: {
text: 'Flow or TypeScript?',
emoji: '🔥'
}
};
hl.push(hightLight);
});
return hl;
}
seems the synctex coordinate not match with the react-pdf-highlighter coordinate, I have tried both pdf coordinate and not pdf coordinate. does anyone facing the same issue?
The text was updated successfully, but these errors were encountered:
Now I am get the coordinate from synctex and then convert it to react-pdf-highlighter coordinate like this:
seems the synctex coordinate not match with the react-pdf-highlighter coordinate, I have tried both pdf coordinate and not pdf coordinate. does anyone facing the same issue?
The text was updated successfully, but these errors were encountered: