Setting InfoPath form name for printing as PDF? - forms

We have some custom print code to print an Infopath form on the user's default printer as well as a server-based PDF printer for loading into a document management system. This is working perfectly, but we would like to control the name of the generated PDF file. The PDF print utility can automatically generate a file name using various parameters such as file name, current date/time, etc. Since we cannot programmatically interface with the PDF print utility, the easiest way to control the name of the generated file would be to set the file name in InfoPath and allow the utility to append a date/time stamp.
I have tried setting the form caption as described in the forum thread here and setting the Save As file name as described in the forum thread here, but regardless, the PDF print utility still uses the default form name (Form1, Form2, etc.). Is there another way to set the form name in code?
Thanks in advance for your help!

Have you considered using an InfoPath PDF Converter that you have more control over via a Web Services API?
Have a look at the PDF Conversion Services as well as the PDF Converter for SharePoint. It deals quite well with InfoPath.
Some additional links
Converting using a Web Service call
Converting InfoPath files from a workflow.
Note that I have worked on this product, so I am obviously biased. It works great though.

Related

Template-based PDF renderer for flutter web

I am writing a Flutter web application that needs to have a customizable template for printing reports: inside the template there will be some placeholders that must be replaced with data at the moment of printing. The "printing" itself will be done by having the user download and open a PDF file, then print it through the browser, the OS or anything else, but that's beyond the scope, at the moment.
The default template would be something like this, where <BUYER_DATA> and <TRANSACTION_DATA> will be replaced with the data of the transaction the user is printing, along with some other "technical" tags (i.e., the page number and the pages count):
Header with site name
727 Chester Rd New Trafford, Stretford
Manchester
<BUYER_DATA>
01-12-2022 14:40
<TRANSACTION_DATA>
AppName - TM 2022
Page <PAGE_NO> of <PAGES_COUNT>
The user is allowed to edit this template in any aspect (boldness, size, colors, etc), provided that the tags related to the data are not removed from it.
So, to achieve this, I added a WYSIWYG html editor inside a page in order to save the template as an HTML-formatted string. And this works fine: only then I realized that the well-known flutter printing library doesn't support conversion from HTML directly to PDF on web, and all my plans began to crumble.
I then tried to discover if there's some other way to achieve the same by replacing the HTML template with something else, like markdown, but it seems that there's nothing that could help me.
The question is: anybody knows of a package capable of converting from HTML, markdown or such, directly into PDF?
I just need to know so I can stop googling around and decide to write my own parser for the HTML and convert it into a series of Widgets of the before-mentioned printing package.

What converts a .PDF into raw PHP $pdf(..) commands which FPDF can use to create that PDF? Then my PHP can manipulate these $pdf values

I'm asking here because when I tried googling for this information I just got ever more endless irrelavent pages of confusing junk (but contain my search terms hidden somewhere on the page taken out of context). This utility must exist because I even got a fake discussion forum site with fake users each 'agreeing' their willingness to enter their creditcard numbers in a 'software download link' which one of these faked users 'posted' in response to a 'question'. Clearly nothing more than a creditcard number harvesting site to intercept people like me googling for it.
So I've already designed the PDF layout with MS Word, I exported as PDF easy enough. Next step run this PDF through some script app or program (whatever is called) to generate the $pdf(..) items, so that FPDF can recreate that PDF. My PHP to alter odd text embedded in the $pdf(..) strings. Other than that I'm no more interested in what these $pdf(..) are and how they're written than I would be with any other raw printer control codes.
All I want to know is simple: What converts a .PDF into the $pdf(..) list, for FPDF to recreate that PDF again.

How can i browse file without uploading in GXT?

i'm beginner with GXT and i'm wondering if there is a way to parse a file and extract some informations without uploading it.
i created a formpanel that contains an uploadFile form but i don't know waht's next, how to get the complete path of the file so i can read/write with java io or how to retrieve the file or is there an alternatif solution, thank you.
Best Regards.
You can do it in some modern browsers using bleeding edge HTML5 apis for which you would need to use GWT JSNI code. There are no api's from GWT team as is.
HTML5 FileReader
FileReader includes four options for reading a file, asynchronously:
FileReader.readAsBinaryString(Blob|File) - The result property will contain the file/blob's data as a binary string.
FileReader.readAsText(Blob|File, opt_encoding) - The result property will contain the file/blob's data as a text string.
FileReader.readAsDataURL(Blob|File) - The result property will contain the file/blob's data encoded as a data URL.
FileReader.readAsArrayBuffer(Blob|File) - The result property will contain the file/blob's data as an ArrayBuffer object.
Example of GWT wrapper over these -
https://github.com/bradrydzewski/gwt-filesystem
You can read about it more from here - How to retrieve file from GWT FileUpload component?
IMHO you cannot read it .
Due to security reasons javascript(gwt) doesn't have access to the system drives files.
http://en.wikipedia.org/wiki/JavaScript#Security
see Opening a file in local file system in javascript
In order to get the file you need to make a server call.
Instead you can do your validation server side and throw proper messages to user.
P.S : i am not considering modern browser concept.What happens if someone opened in other than so called modern browsers?? Will the programm runs same?? Its always better to do server side validation..

User Fill in for Adobe forms

I am using Adobe life cycle designer to create docs in my application....I have all my documents in word and I use the export to option in Adobe Life cycle designer and i get the document converted and now I need to have a user fill in the exported document..so can some one please suggest me how this would go and we use the java script behind....
You could have them fill the form in Adobe land, then use the scripting method exportData to get the form data as XML, then inject that XML into your Word docx as a custom xml part.
From there, Word will use the XML in any content controls bound to it.

Does Orbeon Form support the Thai language?

I am new to Orbeon Form and would like to use it. However, I had tried the Form examples on Orbeon Form Web Site and input some of data in Thai Language. Yes, It can be input data in the fields with “Thai Language”. But when I try to generate “PDF”. The Thai Language Data cannot be displayed.
Can Orbeon X-Forms Support “Thai Language” for inputting Data in the Fields ?
Do I need to use “Professional version” in order to get “Thai Language” to work and display on PDF generation ?
Can “Orbeon X-Form” be able to save Data Locally at the workstation (in case the forms are complicated to fill-in, and need several input time to finish?
This is probably due to the fact that the PDF is lacking an adequate font. Since September 2011 builds, there are properties to specify font embedding, for example:
<property as="xs:string"
name="oxf.fr.pdf.font.path.vera"
value="/path/to/DejaVuSans.ttf"/
For more information, see the documentation. Embedding a specific font with Thai characters might do the trick, although to be fair I haven't tried Thai specifically.
This should work equally well with both Orbeon Forms CE and PE.
You can do this by adding the "Save locally" button to your forms, which is done by setting a property in your properties-local.xml. This will enable users to save an HTML file on their local machine. The HTML file contains all the information they entered so far: when they reopen it, they are taken back to the form on your side, with the data they entered so far "pre-filled".
You can go through this link for internationlization of Orbeon Forms
http://wiki.orbeon.com/forms/how-to/logic/i18n
There is an example given too with multiple languages reflecting on a same form.