How to print diagrams (collection of DRepresentation) in my wordx using M2DOC - m2doc

Programmatically, I can get a collection of DPresentation diagrams.
But how I can print the representation of theses diagrams in my doc using M2DOC ?
Thanks for help.

You can have a look at Sirius services, and more precisely to the asImage() service. You can use it like that:
{m:myVar.anyServiceReturningADPresentation().asImage()}
optionally you can then apply an image service like fit().
Under Windows system you might also need to change the image size in the Sirius settings.

Related

How to fetch Edge browsing history programmatically? Is there is any way using COM/Windows API to fetch it? [duplicate]

I used FindFirstUrlCacheEntry/FindNextUrlCacheEntry Win API to get Internet Explorer's history programmatically in C++.
Can you tell me how to get Microsoft Edge History using C++ (Windows API)?
Not possible at this point in time. Might want to use the 'suggestions routes' at some of the links below.
Developer Feedback Home - https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer
Developer Feedback Twitter - https://www.twitter.com/msedgedev
Feature Suggestions - https://windowsphone.uservoice.com/forums/101801-feature-suggestions/category/18985-web-browsing
Healy in Tampa
The history is stored in \AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat. It uses Microsoft’s Extensible Storage Engine to store data. There is a C++ wrapper for accessing Extensible Storage Engine files I've used to access data from this file.
The "Containers" table inside WebCacheV01.dat tells which "Container_X" tables have type of "Content" or "History", as well as the Secure Directories and their order. You can use the ESEDatabaseView utility to view the data inside the WebCacheV01.dat file.

Use map data offline with osmdroid

My ultimate goal is to have map data (offline, because I will customize it myself) and display it in an app (Android). I could make osmdroid work to load maps online and I was trying to figure out how to download and display offline maps. I downloaded MOBAC (Mobile Atlas Creator) and export the data to SQLite format and when I had a look at it I realized that tiles are saved in image format (PNG).
What I would like to do is to import data to the phone to later use it in algorithms such as a search engine or a routing algorithm, so I need the "nodes" and "ways" (as I get them from the original OSM XML), import them to the phone and visualize it to later have this data available for the algorithms I want to develop. Basically, what MAPS.ME does. I think it wouldn't be difficult to convert the XML into the SQLite since a simple script could make it, but then, how can I generate the tiles from this custom SQLite database? Or, is there a way I can download the data in a more appropriate way to do what I'm planning to do?
Thanks.
Rendering the tiles in an app from raw Openstreetmap data would be computation heavy and inefficient. I would suggest to use image tiles you exported for visual representation.
In addition to tiles you should export a data set you will need in the application for desired functionality. You will not need all data from Openstreetmap so you should identify what you need and build your custom export (there are tools and libraries for processing and filtering of Openstreetmap data. I have used pyosmium for some filtering and processing but there are others.) For example, you can build your custom database with POIs you want to search for.
Routing is another chapter. You can implement it yourself but it is a very complex task. There is java library called Graphopper which can do the data extraction (from Openstreetmap) and offline routing for you. They have an online API too but it is possible to make it working completely offline (I did it for one application). Try to look at the source code because than you can see how complex topic routing is. Final note: data exported from Graphopper contains information about some POIs along routes. It may be possible to search for some things via its java API but I haven't investigated this yet.

Export Microstrategy grid data in text format to a FTP server

Can anybody please let me know whether it is possible to export microstrategy grid data in text format to a FTP server (required access will be provided). If not directly, then can we use some kind of java coding/web services to achieve this. I don't want the process but want to understand whether this can be achieved or not?
Thanks in Advance!
You can retrieve report results (and build a new report from scratch at that) via the SDK and from there you can process the data to your liking, i.e. transform & upload to a ftp-server.
Possibly easier would be to create a file-subscription and store the file to a specific directory where you automatically pick it up and deliver it to your ftp.
There might be other solutions as well, but Yes is the answer to the "Yes/No" part of your question.

Java library to create and dynamically modify business diagrams

I am looking for a good java library to manipulate box, arrows and labels in order to dynamically create and fill diagrams like the following and render them to a png :
Another example
I can create a static template to be filled later, but I will need to dynamically create labels for every box and edges in the diagrams.
For now I have tried using batik to manipulate an svg template but creating multiline labels for the edges is proving quite complicated. The SVG way with batik seems to force me to create 1 text object for each label line with absolute positioning for each which is a real pain.
I would like to be able to define the label specifying only the text and the link they relate to, eventually some hints as to how it should be placed and let the library place them.
Any suggestions ?
If this is in a commercial scenario, the Java graph drawing library yFiles can be a good match for your requirements:
You can use a convenient API to create and style your diagram and automatically layout the diagram with lots and lots options to constrain the resulting layout to suit your needs.
Multi-line and (simple) HTML labels are supported out-of-the-box.
Also you can export to PNG (as well as other pixel based image formats) and vector graphics formats like SVG, PDF, EPS.
This can be done both in a regular Java (Swing) application as well as in a headless environment (e.g. to create images on a server and to send them to a web-based thin client dynamically).
To get a feel what can be done using that library, I suggest you take a look at the freely available graph editor application "yEd" that is based on yFiles and lets you try out the above steps in an interactive manner.
(Disclosure: I work for yWorks, but on Stackoverflow I do not represent my employer.)

Google Image Charts API - How does it work?

I'm looking to create something loosely similar to the Google Image Charts API, where by I can construct a query string, and an image is returned.
For example:
http://chart.apis.google.com/chart?cht=p3&chs=550x250&chd=t:73,13,10,3,1&chco=80C65A,224499,FF0000&chl=Chocolate|Puff+Pastry|Cookies|Muffffffins|Gelato
I was wondering, what would the best way to achieve this be?
Does anybody have any info on how the Google Image Charts API works "under the hood" ?
Are there any libraries that provide dynamic image generation already?
You can use a server side script to read the query string parameters, generate the image and output the content using the image MIME type.
If you are on PHP, you can use an image library like GD to do this. More information here: http://us3.php.net/manual/en/book.image.php