Creating Layered PDF using Javascript in NodeJS - javascript

I've read through the documentation of PDFMake, and PDFKit, and WPS: PostScript for the Web but haven't been able to find any reference to anything other than background layers, from looking at various documentation, it sounds like Optional Content Groups are what I need, but how to handle them using Javascript, I've no idea (I've found little about OCG and layers generally, which isn't sounding promising)!
Any suggestions would be greatly appreciated!

Having tried a few libraries, PDFKit appears to be the best bet, it doesn't discuss layers, but each object you add does exist as a layer, and placing items on top of each other will layer them.

Related

Is it possible to add a Leaflet Layer Search

Alright so I've been working on a custom version of leaflet and is currently pretty advanced compared to it's stock counterpart. The problem with it is however that some core functionality isn't required in most custom versions of Leaflet. My problem here is, is it possible to add a search algorithm to the layer control to search for specific layers.
I've tried several plugins that don't immediately search for layers and tried to rewrite them so it works for layers. I've also got the plugin that groups all layers in an expandable group. I'm not the best at google searches but I can't find an answer to this problem anywhere.
Since it's part of police software I can't write any code here without permission, due to the dutch laws (even if it doesn't contain crucial code).
I hope someone can help me with this issue, since it's a huge part of this piece of software. I'll have over 200 layers. They might already be grouped but searching is way nicer and faster in some occasions.
Just post some examples or links below that might work. Thanks for helping in advance!
In your place, I would add all layers to layers-control and leave only the most important ones visible on the map.
I would also add input to the layer-control and searchable in the DOM. I would probably approach this problem in this way.

Image manipulation - Creating characters on fly

I have set of designs needs to be applied to an image and saved. So if you are a user, you come to my page and add mustachio or any other face elements like hair or eyebrows to a face and save your image.
Im looking for a plugin where I can use this kind of techniques and also allow me to save it as an image on fly.
I can see a lot of masking techniques/ plugins used but I'm not sure if these techniques are capable enough to handle such a thing,
Could you please share your thoughts on this?
Thank you all in advance
You may want to look into the element for creating and saving the image.
a good library that can handle multiple canvas's as layers is EaselJS or FabricJS. Both have pros and cons but can handle multiple layered images as output to one.

Find intersections of Ways without Nodes

I'm working on a javascript project to navigate pedestrians. I use openstreetmap to give me the needed map information. I'm using ajax-requests with overpass-api to get the streets and footways (separately).
What I want to find are intersections of streets and footways, that aren't marked as such. They could only overlap each other.
Is there an efficent Query to achieve this goal?
In principle, I do second scai's anwser: it's mostly better using already existing qa tools. But if you really want to go fancy with overpass, you can also get something like that with this somewhat complex (and probably not so über-efficient) query:
http://overpass-turbo.eu/s/1mk
Finding such errors via JavaScript would be very inefficient. What are you trying to achieve?
There are lots of quality assurance tools for OSM, some of them look for such missing intersections. One example is Keep Right. KeepRight offers a GPX export which you could use in your JavaScript application.

drawing charts with the help of javascript and HTML5 in android

I was going on through certain ways and codes to draw charts and graphs, I found many libraries some free some commercial etc.,but at last i draw it on canvas,One thing which I found interesting is to draw with the help of javascript and HTML5.
For reference:
enter link description here
I have no idea how to do this dyanamically(not with the fixed values),I really want to use it,but i don't know javascript or HTML so i am unable to go ahead,It would be a great help if you would be able to tell me, how to do this with dynamic values.(either by accessing the database or any other way if possible).
You can access db in java and inject results to the javascript by using
webView.loadUrl("javascript:refreshData(someDynamicContent)");
Where are you getting your "dynamic values" from (the user or a database)? Regardless you will need to know at least a little html and javascript. Google Charts has some really nice libraries for this.

how to load a huge image on the style of google maps?

i would load a huge image in my web page (8Mpx x 5Mpx). I thought of creating a simple mechanism on the style of google maps..
But, honestly, I do not have very clear ideas on how to implement it.. any advice on how to structure it?
in particular, I have many doubts about how to handle the drag with the asynchronous loading of the image to vary the portion of the images displayed
Thank you in advance for your help : )
An easy answer would to be use Google Maps.
It's a rather advanced topic, but it shouldn't be any harder than doing it by hand.
Here is more information
I've used Zoomify's products in the past to accomplish this. I work on a team that manages a few datacenters, so we have some gigantic floor maps (drawn up in CAD, exported as a huge image). I take those maps and convert them to what I consider a "Google style map" using Zoomify Express (free).
More info here: http://www.zoomify.com/express.htm
I realize this is an old question, but I'd like to suggest http://leafletjs.com/.
I can only think of some sort of tiles. You break down the image in several parts ( tiles ). Then you only draw the one that are in your viewport.

Categories