convert infopath form to html form - batch-file

I need to convert infopath form to html form (Logic & visual)
Someone knows how i can do it automatically with batch script or other language script like php ?
hope you can help me
Thanks

The InfoPath File *.xsn is just a Zip file. You can change the extension to MyForm.zip and extract all the internal files. Most of the files will be xml for the data and xsl for the Views. You can use whatever scripting language you want that convert them to something else. The xsl is mostly HMTL with xsl added where the data is supposed to go.

Related

is it possible store PDF or HTML content in snowflake.Please help us what is the best data type to store PDF or HTML data. How to retrieve that

is it possible store PDF or HTML content in snowflake.Please help us what is the best data type to store PDF or HTML data. How to retrieve that
If you just want to store HTML or PDF for any technical reason, you can use binary date type which can store such files up to 8Mb size. However, you could not query binary date type directly in your query.
If you have to extract any information, you can use python CLI and use python libraries to extract additional information, but you can not use SQL to extract any information.
HTML can be saved as XML but you can try that as it has couple of limitation and not sure if XML parsing is available in GA or still preview.
Snowflake has new unstructured data storage and querying functionality now. You can store the PDF in a stage and use a directory table to view the file list within the stage. You can create scoped URL's, etc. to allow applications to render the PDF files, etc.

How to use PDF file as data source in SSIS

I'm wondering it's possible using PDF how data source in SSIS. I've tried converting to another flat file, but I haven't been able to. Please is someone have a script to convert PDF or something that might help me.
First, You have to specify if the .pdf file contains text, table or just images. If the pdf file can be parsed (not images / scanned documents), then you can use a Script Component as Source and write a C# code to convert the pdf content into rows.
You can refer to the following links for more details about parsing pdf and using Script Component as Source:
Parsing pdf using C#
Convert a pdf file to text in C#
Converting PDF to Text in C#
Read and Extract PDF Text in C# and VB.NET
Using Script Component as Source
Creating a Source with the Script Component
SSIS – USING A SCRIPT COMPONENT AS A SOURCE

Convert FDF file content into PDF readable format as attachment using APEX

I have an FDF format attachment which needs to be converted into PDF format attachment. I am facing issues while reading the FDF file content.
I believe FDF formatted files are not text files. While you can technically read any file in Apex, you will not be able to parse the file, since it's in a format designed to be ready by an Adobe product.
The only way to work with this from Apex would be to run the Acrobat Forms Data Format Toolkit on another server and then perform a callout from Apex to the other server. Apex itself will not be able to work with the format.
This concept of running a web service as a form of middleware is commonly used and Apex does make it very easy to perform callouts.

Creating Excel File in Apex code

'm wondering is it possible to create Excel or CSV file in apex code (as attachment) is it possible ? currently i only see it works with VF page, but i'm looking to do it in apex code not using vf page, I don't see any options.
Any help is appreciated.
Thanks
Unfortunately there is no native CSV Library or API in Apex to handle the creation of CSV files. Certainly not XLS documents although you could use the native XML DOM libraries to create an Excel friendly XML document.
To write a CSV, this should be fairly simple; it's basically a big huge string with a carriage return and/or line feed at the close of each full record write. You'll need to carefully manage property value escapement by using String.replaceAll('\','\''); etc. Which in turn will chew up your script statements pretty badly.
Next, create a new Document(), convert your string to a Blob using Blob.valueOf(String) and instantiate that blob as the body of the Document.
If you are planning on writing a very large document, you may want to consider writing to some other format type or offloading this processing to a remote system (EC2?) and letting it respond with the Document in time.
I have some Apex CSV utilities already written if you need them.

How do I get the C# Winforms Webbrowser control to show PDF content embedded in the html file as binary content?

I am using a Winforms webbrowser control to display HTML content stored in my SQL DB table. However, some of my contents are PDFs which I intend to store as binary data in the SQL DB and feed to the Webbrowser control. I wish to avoid the hassle of storing the binary content in a temporary file on the client machine and then create html container code to reference this temporary PDF file. Is there a way inwhich I can embed the PDF binary content into the html directly and show this html on the webbrowser control directly?
I found these previous threads referring to a COM 'hack'. Is there a simpler, easier way? Thanks!
How do I get a C# WebBrowser control to show jpeg files (raw)?
Thanks,
uniball
I wouldn't say implementing an asynchronus pluggable protocol is a hack. It is the standard approach on Windows to implement a new protocol that IE will be able to use. The registering of the protocol handler does require fiddly setup though.
But the simplest/easiest way is to actually use a temporary file, and simply link to it from your html. It's not a hassle providing you take care to use the relevant .NET functions to ensure your code doesn't make assumptions about folder/file paths etc.
Use GetTempPath() to get the temp folder.
Create a pdf file in the temp folder with a unique name using Guid.NewGuid()
Write your binary PDF data to the file.
Update the html elements href or src attribute to point the full path of the temp file.
Load the html into the WebBrowser control.
Delete the temporary pdf file when no longer needed.
Another possible approach would be to Base64 encode your binary data and store it inside a DIV/Input element. Next add an ActiveX control or some other client side broswer component to your html page that knows how to look for the Base64 data and can turn it back into a binary stream (and display as a PDF). I'm not aware of a 3d party control that does this however.

Resources