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
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in ANGULAR
- Is it possible to use ES5 JavaScript with Angular 2 instead of TypeScript?
- Module '"angular2/angular2"' has no exported member 'For'
- import syntax in typescript creating another js file in visual studio
- Separate ts file for imports
- How to use an AngularJS 2 component multiple times in the same page?
- injectables not working in angular 2.0 latest build 26
- Does angular2 bootstrap have a way to dynamically target elements like it does in angular 1.x
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Angular 2/Typescript: require not found
- ng-switch in Angular2
- Angular 2 import issue: "Zone already exported on window the object!"
- How to make FileReader work with Angular2?
- Writing the most basic Unit test in Angular 2?
- Angular2: Creating child components programmatically
- AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined
Related Questions in ACE-EDITOR
- Get code from Ace Editor in JavaFX WebView
- Create custom mode of ace-editor without requireJS
- Removing listeners from an ace-editor
- Ace editor custom error checking
- How to implement the "auto pairing of quotes" feature in custom mode in ace-editor
- How to load ace editor with requirejs from CDN?
- How to find out the keyword in ace-editor
- How do I disable line selection on gutter click in ACE editor?
- Fire an event before `cut` event in ace editor
- How to implement eclipse editor into JavaFX UI
- How to automate the Ace Editor (send keys) using WebDriver?
- Reset the undo stack in ACE editor
- How to integrate syntax check in Ace Editor using custom mode?
- Ace Editor HTML mode how enable automatically close brackets
- Adding to ace-editor wise autocomplete: List user-defined functions and variables (javascript language)
Related Questions in NG2-PDFJS-VIEWER
- No component factory found for t. Did you add it to @NgModule.entryComponents?
- ng2-pdfjs-viewer: PDF is all black
- Search with accented characters in pdf.js
- Angular17 I need to draw a rectangle over pdf selected zone and get the exact coordinates to be used later in OCR the Zone
- cannot customize the icons using ng2-pdfjs-viewer
- Invalid PDF Structure with ng2-pdfjs-viewer
- Custom pdf rendering in ng2-pdf-viewer for large pdf documents?
- angular 7 How to reduce production build size
- Get the tag "a" from iframe
- How to install offline ng2-pdfjs-viewer package under the Angular application
- Is there any hack to control the in pdf search of ng2-pdfjs-viewer using angular component
- Is there any way to add outline to text with destinations, so that it can viewed in getOutline of ng2-pdf-viewer
- Signed url from S3 to display PDF in Angular using ng2-pdfjs-viewer
- Using the ng2-pdfjs-viewer, is it possible to print all pdfs?
- Converting base64 string to uint8Array or Blob in Typescript/Angular8
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 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.