how to convert IFC file to Png with Node.js - node.js

I tried to find a way to convert IFC file to PNG by his layers. The only ways that I have found are by java or c# that are not working.
Does someone dicover a way to convert it by js or python?

Related

How to generate svg images using python 'quantstat' library

using quantstat library's report.py module, I am able to successfully generate .html images when I call quanstat.reports.html function, and quanstat.reports.full function to generate .png images for the various graphs, charts, reports.
https://github.com/ranaroussi/quantstats/blob/main/quantstats/reports.py
can someone help me at the earliest how to use the same 'report.py' module or other modules in this 'quantstat' library to generate images in .svg format so that they can be opened in any browser such as google-chrome.
Which files of this library need to be modified or enhanced with python code to successfully generate .svg files ?
following code is generating png images when I am passing file path to 'savefig' in my local. used VS Code as IDE
import quantstats as qs
stock1 = qs.utils.download_returns('XLE', period="1y")
stock2 = qs.utils.download_returns('SPY' , period="1y")
qs.reports.full(stock1, stock2)
how can I get images in .svg format using same qs.reports.full(stock1, stock2) ?

Image resolution low after converting pdf to image using GraphicsMagick for NodeJS

I'm trying to convert pdf into image using gm package and i just can't understand how should i adjust the output resolution.
If i'm doing like this:
gm(`${sourcePath}[0]`)
.setFormat('jpg')
.stream()
.pipe(writeStream);
The output quality here is very low, so i'm trying to use density(594, 842)
like this:
gm(`${sourcePath}[0]`)
.setFormat('jpg')
.quality(100)
.density(595, 842)
.stream()
.pipe(writeStream);
but doing this the image looks very starchy.
Can anyone please point me what should i do in order to receive the
output image close as possible to the pdf source using the npm package?
Or maybe recommend me about a different library that i can use for converting pdf to image (before ocr)

How can I call convert a piece of SVG to MVG via RMagick?

I want to convert a piece of SVG to MVG. Could I do something similar to this convert msvg:pram.svg pram.mvg using RMagick methods? I don't want to save the output in a file, but I want to have it in a variable in Ruby.
In general, converting an image in one format to another format is as simple as making a copy of the image using a different suffix. https://rmagick.github.io/comtasks.html#convert
Use the to_blob method to get an image as a Ruby string:
https://rmagick.github.io/comtasks.html#blob

Parsing xls files by a coordinates [Node.JS]

I've got a question. Is it possible to parse xls files by a coordinates? I've searched some npm modules but the biggest part of them are converting to json or csv. So does anybody know how to do that?
use node-xlsx
It will help you to parse ".xlsx" i.e.
const workSheetsFromFile=xlsx.parse(__dirname+'/myFile.xlsx');
Read the documentation for more functionality.

Highcharts PhantomJS export SVG as base64

I have a question regarding generating an SVG instead of an PNG serverside using PhantomJS. I have PhantomJS running as a server and am POSTing JSON to it (http://www.highcharts.com/docs/export-module/render-charts-serverside). I would like to receive an SVG represented as a BASE64 result stream. I am running in some problems however.
I tried both the following requests, but the base64 result would always represent a png file:
{"infile":".......", "type":"image/svg+xml"}
And:
{"infile":".......", "type":"svg"}
I do however get a valid svg file when I use the outfile parameter:
{"infile":".......", "type":"svg", "outfile":"anActualSVG.svg"}
This writes a file to disk, which is not what I am looking for.
Does anyone have some suggestions?
Thanks!

Resources