QlikView Text Object Formatting - qlikview

I am unable to format the text in a text object. For example, I need headers in bold, while the body of the text could be normal. Can I get any hints on this?
I know this can be achieved via extension objects, but I do not have any experience creating them.

This is not currently possible in QlikView 11. It has been an open development request for quite some time.
You have two options:
Use multiple text objects and lay them over each other (i.e. make the topmost one bold and its background transparent).
Use an extension object, however, this then restricts you to AJAX/WebView for your document. There is an existing extension (written by Stefan Walther) that has this capability here (git repo).

Related

Multirow PDFAnnotationTextWidget in Cocoa

I am trying to create an editable pdf annotation in pdfkit which is multirow. The user does not need to be able to create new rows, but I want the text to be displayed over the entire bounding box (i.e. on several lines).
However it seems that it uses a standard single line NSTextField when it is in editing mode. If I just could access that object I could change it to multiline but it seems that PDFAnnotationTextWidget does not expose this object.
https://developer.apple.com/library/mac/documentation/graphicsimaging/Reference/QuartzFramework/Classes/PDFAnnotationTextWidget_Class/Reference/Reference.html
Any ideas?
The only example I found is the example project for PDFKit from 2006, but it also only support single line annotations.
https://developer.apple.com/library/mac/samplecode/PDFAnnotationEditor/Introduction/Intro.html
If not possible, is there a way to create custom PDFKit annotations, and in that case, how?
It seems that there is no public method to access that NSTextField.
You can access it only swizzling some methods, like I did in this example (please note: the code has a lot of warnings because it's old)
In my example you can write multiple lines in the NSTextField, but when you exit editing mode all goes on a single line: there is a reason why Apple used a single line text field for Widget annotations, AFAIK Widget annotations in PDF supports only single line, but this is a limitation on the PDF annotations and not in the Apple SDK.
If you save the document after the annotation is added, you can access it from any other pdf editor...and in that case you will see only a single line (that is not an NSTextField but the own implementation of the pdf reader).
If you want to permit to the user to write text on multiple lines, and to visualize it over the PDF (but without the possibility for the other pdf readers to change your annotations), you have to subclass PDFAnnotation and create your own class.
In this case, have a look a the MyStampAnnotation file. You can create a similar class, inheriting from PDFAnnotation. When the user clicks on the annotation (in editing mode), add your own textfield, then write the text directly on the document using something like CGContextShowTextAtPoint in the drawWithBox: method

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.

Creating RTF text for clipboard and sharing DataPackage in WinRT

I'm sure this is just a google search away, but I can't find the right search terms to find what I'm looking for.
I've created a DataPackage that has both HTML annd plain text content. I've used this in my copy and my sharing code and it works fine. I now want to create RTF output as some apps don't seem to accept HTML clipboard content.
I'm looking for a good guide to making RTF text that can be added to the DataPackage. I just need simple formatting including changing the font family, font size, font weight and adding newlines. The data comes from a list of objects taht I want to serialise as RTF, not from a text control on the screen.
WordPad outputs fairly clean RTF and some other text editors do as well. If that's not enough, you can download the RTF Specification 1.9.1 although like any specification that's probably overkill for what you're doing.
You can also use the SaveToStream method on the Document property of a RichEditBox from a Metro style app to share out as well.

Modify character spacing in a PDF form field

I'm trying to build a web app to programmatically fill out a PDF form. I am going to configure my form first in Adobe Acrobat, then write a Java app with iText to fill out all the form fields via user input from the web. The base form I need to fill out comes from the US government. They created form fields with extremely large kerning (character spacing) values I need to change. However, there appears to be no way to modify this value in the Acrobat UI.
Does anyone know how to manipulate character spacing on form fields in Acrobat 8.0 for Windows? I could try to use iText to programmatically manipulate the kerning of the original document, but this would be much more tedious.
I believe I figured this out: kerning is called "combing" in acrobat, and each of the form fields have been "combed". The strange thing is this option isn't checked when I view the properties of the form field, but "combing" is the behaviour I was attempting to replicate.