Transform XML to PDF using XSLT with nodejs - node.js

I have xml file that contains remote xsl stylesheet link. I need to convert that xml to pdf? I have tried Prince but it is not adding desired style. Is there any other package that i can use for this purpose?

You can try with package (https://www.npmjs.com/package/xml-pdf) in this you can set your custom template also for design purpose. I have committed a GitHub repo for you. https://github.com/vivek9716/convert_pdf please check if this is helpful.

Related

How to Import Programatically a file or an XML string in Acumatica that supports import XML

I just wanted to know if this is possible via code, I think of as a post-installation of my customization which needs some imported XML that cannot be included in the Customization Project objects. I looked up on Customization Code Plug-in, this is the solution but I do not know where to start to manipulate the File Upload or Import an XML then I pass a string variable to make it readable for the screen to accept the Import XML and just save the data.
Thanks!
I would consider just including in customization necessary xml staff, as file. Then in Customization plugin just read from that xml, and persist it wherever needed in db.

Is there any way to remove or not to include certain xml elements while creating from mpxj library?

currently when working with mpxj library, generated task xml will have following attributes
<Task>
<UID>0</UID>
<ID>0</ID>
<Name>Naruto Uzumaki</Name>
<Active>1</Active>
<Manual>0</Manual>
......
......
</Task>
I do not want Active and Manual tags present in the generated xml, is there any way to achieve this? Kindly help.
Thanks in Advance.
I'm not sure of MS Project's behaviour if these values are removed entirely... if it would give you the defaults you are expecting when it reads the file. On that basis it is not something you can change in MPXJ itself.
However, one simple way to achieve what you want would be to apply an XSL transformation to the generated XML to remove the elements you don't want. The answer to this StackOverflow question provides an example of how this could be done.
Assuming you are using Java and you are writing to a stream you can probably use one of the mechanisms highlighted in this StackOverflow question to take the output directly from MPXJ and pass it through an XSL transformation.

How to render asciidoc filename in asciidoctor template?

I have a asciidoctor template similar to this one:
https://github.com/asciidoctor/asciidoctor-backends/blob/asciidoctor-v0.1.4/erb/html5/document.html.erb
I would like to include a link into my documents which points to the asciidoc file that was used to generate the document.
Is there a way to access the asciidoc filename within my template?
I'm using the asciidoctor-maven-plugin to render my documents.
By looking at the built-in data attributes, I think that you are looking for {docfile} (evaluation depends from how the document is processed and when and where is it processed).
For me it works with the asciidoctor-maven-plugin (I get the absolute path to the file) but not in the chrome preview.

Include the file name of the xsd schema I am processing with xslt

Hello
I am generating Objective-C class files with Saxon via XSLT and in a comment header would like to include information as to which xsd was used for their creation. Is there any way I can access the current filename during an xslt transformation?
Would be great if anyone had an idea...thanks!
Assuming XSLT/XPath 2.0 or later you can use document-uri(/) http://www.w3.org/TR/xpath-functions/#func-document-uri to find the URI of the input document and if you only want the file name then you could use tokenize(document-uri(/), '/')[last()].

How to access a excel file in CF8?

How to read an excel file from cfm page?
That depends on what you want to do. If you simply need to upload the file, you can use the cffile tag (CF8 documentation here).
If you want to extract data from it, you may want to look at Ben Nadel's POI Utility CFC. (Note that it's not been updated since the release of CF9 because of the introduction of the cfspreadsheet tag in that version of ColdFusion.)

Resources