I have an angular 6 application for tex compilation and pdf output. Ace editor is used for creating tex files. It can be compiled at the realtime using pdflatex. Output pdf is shown using ng2-pdf-viewer . Inorder to implement synctex (sync between editor content and pdf) i have used "synctex view" command for forward search and it returns some output values such as h,v,x,y,width,height. I need to highlight these points in ng2-pdf-viewer. I found a canvas tag inside pdf viewer and i created and appended a new canvas with the same height and width and was able to draw shapes over the pdf. But iam unable to plot it exactly where the points are. Does anyone have any idea about this, how this synctex output point works and how can we highlight pdf using the canvas draw function.
How to highlight synctex output values on ng2-pdf-viewer
1.2k Views Asked by Yadu Chandran At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in ANGULAR
- Firebase link existing user to anonymous account?
- It doesnt always show all the books on my homepage
- Google adsense ads.txt status cannot be not found
- When I navigate to the URL'http://localhost:4200/', it redirects me back
- Ionic Angular Standalone ion-icon are not showing at all
- How to make Angular understand that view child is of a specific type, not a general ElementRef?
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- How to perform CRUD operations on a static JSON array in Angular? (without API)
- Ngrx props<>() method in createAction()
- How to animate rotation of an image inside input control?
- Detecting click inside and outside of the listening component in Angular
- Angular - type guard not narrowing types
- In node_modules file i am getting Angular genric error while using fontawesome in angular12
- Angular 16 sending null values to API
- GoogleCloud Error: Not Found The requested URL was not found on this server
Related Questions in ACE-EDITOR
- how to make this simple ace editor take full height?
- Unable to delete character from an AceEditor JSON Widget from a class based react component
- facing problems getting the native element of child component instances in Angular using Ace editor
- Custom rule added to the HTML mode that uses "push" instead of "next" doesn't work
- Are mode and theme imports required for react-ace?
- Ace editor adding a red dot when clicking enter
- Styling hooks for the find/replace dialog
- Event handled in Key Handler is then being subsequently handled by Ace
- I want to update the Ace code editor with uploaded file contents specially for python file
- Why is the return value of the ace editor's getScrollTop function different from the value of the scrollTop property?
- Is there a way to highlight a set of custom keywords in ace editor in Angular?
- How to highlight custom keywords in Ace Editor in Angular?
- Import vue2-ace-ditor modes list
- Ace Editor Editing existing mode
- ACE Editor's cursor position resetting to beginning of line
Related Questions in NG2-PDFJS-VIEWER
- Annotation not visible in ng2-pdfjs-viewer?
- PDFViewer for Django
- pdfAnnotate/other pdf annotation library for annotating PDF in Angular
- Angular17 I need to draw a rectangle over pdf selected zone and get the exact coordinates to be used later in OCR the Zone
- PDF file only displays on Samsung devices and not on iPhones when using ng2-pdf-viewer in an ionic with angular app
- Angular - HTML Canvas turns black when I start drawing
- Using Angular with Yarn PNP, how to include assets since there is no node_modules anymore?
- Edit ng2-pdf-viewer scrollbar
- How to install offline ng2-pdfjs-viewer package under the Angular application
- Problem rendering a PDF file on mobile using ng2-pdf-viewer [Angular 12]
- How can I call a shortcode in a shortcode?
- Using the ng2-pdfjs-viewer, is it possible to print all pdfs?
- Signed url from S3 to display PDF in Angular using ng2-pdfjs-viewer
- cannot customize the icons using ng2-pdfjs-viewer
- PDF text search in Angular 5+
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After hours of research i found a solution for synctex highlight in ng2-pdf-viewer. Rather than drawing the synctex output values over canvas, we can create a div element and adjust its top,left,width,height according to those values. Before that we need to recalculate the values relative to our pdf-viewer.
Result of "synctex view" command returns v,h,width,height,page number values. Then parse as follows.
If your synctex command returns multiple h,v.. values then loop over and append the highlight element.
Hope it helps.