How to change the PDF template regarding the language? - pdf

In our forms we use a PDF template to print out the data. Works great. As we will have our forms available in 4 languages in orbeon, we would like to have 4 different PDF templates. The same template but in other languages, with orbeon choosing the right one depending on the currently chosen language.
How to achieve this ?
I use FormBuilder and the "Attach template" functionality.

Unfortunately, this isn't currently supported out-of-the-box by Orbeon Forms. See RFE #246.

Related

which library should i use in UWP to create PDF editor tools?

I am going to create pdf editor tools in uwp using c#. I am not understanding which library i should use ? i only write code to select pdf . but I am not able to edit pdf? and more over I also want to create a pdf editor tool which contain text Highlighter, editor, swigal,strikeout.
Well, the standard library for dealing with PDFs in the UWP platform is:
Windows.Data.PDF
Of course, this namespace doesn't give you a practical PDF viewer… you will have to arrange it by yourself.
Microsoft has created a UWP sample that demonstrates how to create a PDF viewer and how to deal with theese docs easily.
More infos here:
Microsoft Docs - Windows.Data.PDF

Adding word control to asp page?

Is it possible to add a Microsoft Office Word control to an aspx page? I want to be able to modify a load and modify a word document from a web page... I'm just not sure if this is possible?
I know there are AJAX controls out there that allow you to perform something somewhat similar, but I would like to use a Microsoft product if possible.
I am using Visual Studio 2010 and VB.NET to try and accomplish this.
You can use RadEditor for ASP.NET AJAX in your ASPX pages to import DOCX or RTF files, edit their contents in your browser and save them to DOCX,RFT or PDF format. The following examples show how to do that:
Import and Export to DOCX
Import and Export to RTF
Use Ms Word vía ActiveX in ASP.NET it's a bad bad idea. It's possible, but currently, this way is not supported by Microsoft, in fact (http://support.microsoft.com/default.aspx/kb/257757).
You will have troubles with performance, scalabity, user's word versions.... And you will have a lot out-controlled winword.exe processes, and so on.
For this reasons, I use a Silverlight Rich Edit Control, from Devxpress. I had a license already, so I didn't try other solutions, like Telerik's Richtextbox, or Google Docs.
Embed editable MS Word document on web page
Edit: I remembered that another way it's using WebDav. I mean, force to client MS Word to open a word doc in a WebDav location. Maybe you can consider it.
How to create a HTML link which forces MS Word to edit document on webdav server
This is the addin for IE:
http://www.microsoft.com/es-es/download/details.aspx?id=15123
Yes, from the reference i got, it look possible.
Follow this link : Click Here

How do I style a word document exported from a webpage in VB.Net

I'm trying to export text retrieved from a database into a word document in VB.Net and while I have a working example, I need to figure out how to style some sections of the document appropriately.
I have found a few working examples from MS Online resources (such as this one), which I've found can cover some basics:
para.Range.Text = "Quad Chart"
para.Range.Style = "Heading 1"
para.Range.Bold.Font = True
But it doesn't cover even some of the simplest of formatting such as:
How you align the text (left, right, center)?
How you specify letting?
How do you start a list style?
What I'm trying to find is either a straight answer to these or (even better), a definitive list of the commands that would allow most any formatting.
Also, I would prefer not using Spire, which seems to be a common answer.
Thanks!
The VBA object model describes all the classes, their methods and properties that you can use for the marking up of content.
Your suggestion to use styles is strongly recommended as a way of separating your code from the presentation. Create a document template (.dot or .dotx, depending on Word version) and attach this to your documents. Then, when the document is opened, it will inherit layout and presentation from the template and be correctly rendered.
The list creation is a little intricate as you will need to restart the list if you are using numbering.
If you are interested in a completely different approach, you can look at Applying an XSLT Transform in the Microsoft Office Word 2003 XML Software Development Kit. This describes how to generate XML documents and using XSL transforms to describe the presentation. More general, but definitely more complex to set up.
Your preferred approach will depend on whether you want to generate native documents with a template, or to require your users to install the transform using the tools in the SDK.
So, you have a few examples. Office VBA is a cut down version of VB6, so why not record some macros in Word, open the VB editor and look at what it does. It's also the easiest way to navigate the help on the Word object model.

How to create switchable multi-language pdf form?

I want to create a pdf form for two language (Chinese/English) UI, and there's a button(s) or somethings on the form for language switch, is there anyway can make it? and how to do?
thanks!
Thanks for all reply!
Actually I got a sample like this,
PDF Sample
there're two checkbox on the top-left of the form, one is for English UI, the other is Chinese, I just want to know how to make PDF like that sample? (and I don't see any layers on the sample...)
thx
mkl's comment (which he should turn into a full answer, really) already hinted at the option to use different page templates residing in the same file.
Another option you could explore is this:
put the two language versions into 2 different layers (or 'optional content groups' in PDF parlance)
make the visibility of the two layers toggeable
let the user activate that layer which he/she needs.
Layer activation can be handled through normal Acrobat Reader user interface elements.
The layer switching can be made accessible via a "button" on the PDF page too -- but that requires additional JavaScript to be embedded in the PDF (something many people are not particularly keen about).
As Kurt proposed, I make my comment on Frank's answer an answer in its own right:
Actually there is a pdf feature seldomly used nowerdays, page
templates. Thus, those two forms can reside in the same file in
different page templates, and based on some initially present buttons
("English version", ...) the desired form is spawned.
Unfortunately I don't know how to create page templates using some easy-to-use tool, I only came a cross them in the context of integrated PDF signatures (depending on the signature type, page template instantiation is a document change not breaking the signature) and tested them with low-level tools.
Essentially page templates are PDF objects just like page dictionaries of the normal pages, they are not XFA stuff. They merely are not referenced in the pages tree but instead in the name tree.
There is a JavaScript command which creates a visible page based on such a template --- I don't know which anymore; I may be able to find out when I'm back in office next week. This command would have to be bound to the inital language selection button in the file.
The problem will be in switching the static text - PDF does not allow this.
If I were you, I would split the document into two identical forms in the respective languages. You can use bookmarks and links on the first page to navigate to the right part of the document.
Note that it is possible to assign the same field names to the Enlgish/Chinese versions of your fields. This will make it easier to process the submitted form data because the process path would be independent of the chosen language. It will also simplify any JavaScript (validation, summing, etc.) you plan to add.

Auto populate data in pdfs

I am developing a Java Desktop Application for Windows 7.
I want to auto-populate data into pdf file with specific format. For instance, if I select a particular product in the application then click on "Generate Report" button, it should fill the respective space in the pdf with the selected product.
Would like to understand different ways to achieve the same.
After researching on the topic found useful utilities like iText and pdfbox. iText not free for commercial use whereas pdfbox is opensource project from Apache.