Skip to content
Advertisement

How to write javascript to reorder pages of a pdf document?

I have a double-sided document as two separate pdf files — front-facing pages in one document and rear-facing pages in the second. I have also combined them into a single document with all the pages but with all the front-facing pages before the rear-facing pages. The page ordering is of the form, {1,3,5,7,…,[n],2,4,6,8,…,[n-1 OR n+1]} I wish to write a

Javascript – sort array based on another array

Is it possible to sort and rearrange an array that looks like this: to match the arrangement of this array: Unfortunately, I don’t have any IDs to keep track on. I would need to priority the items-array to match the sortingArr as close as possible. Update: Here is the output I’m looking for: Any idea how this can be done?

How to read and write JSON offline on local machine?

Problem I need a way to store and collect JSON data in an entirely offline(!) web application, hosted on a local (shared) machine. Several people will access the app but it will never actually be online. I’d like the app to: Read and write JSON data continuously and programmatically (i.e. not using a file-upload type schema) Preferably not require any

execute javascript from textarea

I’m not entirely sure if this is possible, but I’m trying to create a mini faux editor in a browser that runs javascript on the page. Here’s what I’ve been trying to do in theory HTML javascript more specifically I’m trying to write to a canvas element via the ‘code’ I type into the text area, so that if, for

Add/delete row from a table

I have this table with some dependents information and there is a add and delete button for each row to add/delete additional dependents. When I click “add” button, a new row gets added to the table, but when I click the “delete” button, it deletes the header row first and then on subsequent clicking, it deletes the corresponding row. Here

Advertisement