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
A string find query on the PDF itself (https://arxiv.org/pdf/1708.08021.pdf) for the string “Type Checking for Javascript” obtains the following coordinate values:
const coordinatesFromPdf = {
width: 298.81699979999996,
height: 14.3462,
str: "Fast and Precise Type Checking for JavaScript",
transform: [14.3462, 0, 0, 14.3462, 45.828, 625.368],
};
I think there is an argument that this library should be modified to use coordinatesFromPdf as the default highlight state, rather than the existing boundingRect approach. The former would enable more advanced manipulation of highlights and highlights to be added 'headlessly' without rendering the dom
Can you please clarify the calculation of the bounding rectangle for the “Type Checking for Javascript” example shown on the webpage https://agentcooper.github.io/react-pdf-highlighter/ ?
Coordinate Values from PDF
A string find query on the PDF itself (https://arxiv.org/pdf/1708.08021.pdf) for the string “Type Checking for Javascript” obtains the following coordinate values:
Hardcoded values in example
However, the hardcoded value in the example to highlight the subtext “Type Checking for javascript” requires the definition the hardcoded coordinates below (https://github.com/agentcooper/react-pdf-highlighter/blob/main/example/src/test-highlights.ts#L5)
Transformation function
x1, y1, x2, y2, width
andheight
are obtained ?The text was updated successfully, but these errors were encountered: