Is there a PDF generation library similar to http://prawnpdf.org/ - pdf-generation

I am looking for the ability to generate PDFs in a similar manner to Prawnpdf using Crystal language. Is there such a library, or is there a way for me to call into ruby code (like a ruby binding)?

There is actually NO pdf generation library for Crystal..
But if you have the time, there are libraries which has a C/C++ interface that you could use to create a pdf generation lib :
JagToPdf : Exemple in C (Full user guide here)
libHaru : It is written entirely in C, so interfacing with Crystal should not be difficult. Exemple Usage here

Related

Generating DLL out of Simulink model

I'd be interested in knowing if any of you has direct experience in porting Simulink models into working DLL (Dynamic Linking Library).
I am aware of this document:
From Simulink to DLL
but it is a rather outdated documentation. Perhaps there exist faster ways to accomplish this task successfully.
EDIT
As far as I understood, I just proceed this way:
Derive a custom TLC from the grt.tlc file using the "Custom Target" example in the RTW Embedded Coder documentation, which does NOT require RTWEC, only RTW.
Derive a custom TMF from the grt_vc.tmf file.
Finally derive a C file.
Does it make sense or not?
If you have Embedded Coder, you can use the ert_shrlib.tlc target, see for example How can I create a DLL target for RTW so I can create a DLL from my Simulink model that can be called from other C/Fortran programs?.
Failing that, you'll have to manually create the DLL from the generated C code using Visual Studio or other IDE.

What language are NSIS scripts written in?

What language are NSIS scripts written in?
Is it NSIS's own language or is it a common language or even Assembly itself? Its looks very familiar to Assembly. I've looked on the website to try to find out what language it is but it doesn't explain what language it is.
The instructions that NSIS uses for scripting are sort of a cross
between PHP and assembly.
That is what the manual has to say. The scripting language is unique to NSIS, I don't really see the point of comparing it to other languages. (NSIS evolved from the basic Winamp plugin installer, more history available here)
Several years ago the LogicLib was added which added "high" level macros so you can do basic If's and loops without goto's. Calling functions and plugins still require push'ing parameters to a stack asm style.
The language basically has three types of instructions:
Preprocessor (defines, includes and macros etc), they start with ! (!if 1 > 0)
Attributes/Properties: Icon, Version info etc
Instructions executed during install/uninstall (Instructions are placed inside functions and sections)
The installer UI consists of one or more pages. Each page can execute code based on several callback functions (Show, Leave etc) but most instructions are executed on the instfiles page (A page with a progress bar and log window) The instfiles page executes the code in all the sections. A section is basically a collection of files and instructions used to organize your installer into different parts. If the installer includes a component page, the user is given a list where they can choose which sections to execute.
The full list of instructions can be found in the source (This list does not include plugins and helper macros from external include files) The compiler (makensis.exe) validates and compresses these instructions (along with other files you have included) into a blob that is appended to a small GUI application written in C. This little application interprets these instructions...
It is their own 'language' loosely based on assembler.
From what I understand, it compiles this down to native code, and hence why the installer is so small :)

How to compile and run LISP project?

I am new to LISP, currently using LispWorks and ListBox IDE on window server 2008.
I want to know that, how can we compile and run LISP project, contain 350 LISP source file.
and what will be generate after compilation and how can i run it...?
and what's techniques are available to debug lisp project.
(it is old technology, so I cannot get much help from internet)
LispWorks comes with a lot of documentation. This documentation is also available on their website.
LispWorks can:
organize source code with a system management tool
save images with saved state
compile individual files to loadable machine code
create shared libraries
create stand-alone applications
Their Delivery User Guide describes how to generate applications.
The documentation of DEFSYSTEM describes how to organize source code and how to compile systems.

Is it possible to generate from code using T4

I have used T4 to generate partial classes from some input file (XML, etc) and then hand code additional partial bits onto those generated classes.
Is it possible to go the other way? To hand craft partial classes, and use T4 to template boiler plate bits to them?
Obviously I can't use reflection to look for the classes since it's not compiled yet, but I see Visual Studio inspect uncompiled code for different utilities. Perhaps Visual Studio offers some feature to support this I don't know about. Long shot, I guess.
Thanks
Also, you can use T4 with VS's CodeModel to read the code in your project without compiling and then generate from that metadata.
There's some pointers to examples here: http://blogs.msdn.com/b/garethj/archive/2009/09/25/dte-and-t4-better-together.aspx
Actually, T4 is used this way frequently. Yes, it requires reflection, but partial classes compile even if bits of them aren't generated yet. I would look at examples for generating strongly typed views as described here for examples of using reflection to generate new files.

T4 template for Ruby or Java

I am using T4 for generating code. With Visual Studio I could generate code in C# or VB. What is required for generating code in Ruby or Java ?
I have a some utility classes that is required in multiple language (C#, Ruby and Java). I am looking for defining T4 templates...
Thanks
With a standard T4 template, you can generate any code, but what comes out is part of your project. While you can generate any kind of text, this is really most useful if you're compiling the code that comes out.
With VS2010, you can now use a T4 PreProcessed Template. Instead of generating a text file, you generate the generator. Making the generator instead of the resulting code should give you lots of flexibility with integrating your Java/Ruby output.
Anything can come out of the generator, but I think you still have to write the actual T4 code in VB or C#.
You can generate code in any language using T4 or indeed any other textual artifact.
You just need to start with an example of what you want to generate and begin to parameterize it.
Only the code generation control code inside the template needs to be in C# or VB.

Resources