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
I am evaluating libraries and languages to develop an app. My program has use cases similar to a vector drawing program. I.e I need to parse the vector graphics commands in a PDF file and store them in-memory (for example as rectangle and paths).
From what I can tell, many PDF renderers don't store the graphics commands -- instead they immediately pass them on to a graphics library for drawing.
I need to be able to do things like render a page with certain vector graphics elements modified -- changing the color or line width, or perhaps deleting a particular path.
The user will need to be able to click on a rendered PDF and I will need to be able to figure out which path was selected and present options to operate on it.
The paths will need to be uniquely identified and stored in memory.
Can the parser in pdf.js be modified / extended to do this? Does anyone have an example of accomplishing something like this?
Can a developer extend the parser / evaluator in a way to intercept the operations (say moveto and lineto) to modify how they work? Assuming so, how can the overall system be instructed to use the modified parser?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am evaluating libraries and languages to develop an app. My program has use cases similar to a vector drawing program. I.e I need to parse the vector graphics commands in a PDF file and store them in-memory (for example as rectangle and paths).
From what I can tell, many PDF renderers don't store the graphics commands -- instead they immediately pass them on to a graphics library for drawing.
I need to be able to do things like render a page with certain vector graphics elements modified -- changing the color or line width, or perhaps deleting a particular path.
The user will need to be able to click on a rendered PDF and I will need to be able to figure out which path was selected and present options to operate on it.
The paths will need to be uniquely identified and stored in memory.
Can the parser in pdf.js be modified / extended to do this? Does anyone have an example of accomplishing something like this?
Can a developer extend the parser / evaluator in a way to intercept the operations (say moveto and lineto) to modify how they work? Assuming so, how can the overall system be instructed to use the modified parser?
Beta Was this translation helpful? Give feedback.
All reactions