Cognos: Read HTML code in PDF - html

Is it possible to use HTML format code in PDF?
For example, when the field is <b>Test<b> the PDF shows test in bold?
Like putting a setting to a text item that it should read the text as 'HTML'?
Thanks!

No, HTML encoded formatting will not display the way you want in PDF.
You must design your Cognos reports in Report Studio. Formatting applied through Report Studio will display correctly in HTML or PDF versions of your report.

Rich Text Item will almost do what you want.
This control will show on PDF and you can also load it from a database. But it only supports basic tags.
<b>TEST</b> is not valid for this control, However the following link shows how you might be able to approximate this.
http://pic.dhe.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cr_rptstd.10.1.0.doc%2Fug_cr_rptstd_id23310rich_text_item_supported_elements.html

Related

jQuery image import to Crystal Report

I am trying to find a way how to import image from html to Crystal Reports. What I found is I need to set a code to download and save the image to a database and then add it to Crystal Report.
In other words, I need to find a way to add image dynamically to the Crystal Reports from HTML using id, rather than save it to a database.
Do you mean save the HTML page as an image and display the result in Crystal? There is a User Function Library (UFL) that provides that functionality. See list of UFLs here.
If you mean an image file referenced by an HTML page, then it's just a file (the fact that it is also used in an HTML page is irrelevant. You can simply use the path to that file.
Consider providing more details...

Using IcePDF or PDFBox to generate HTML page from PDF

I want to use IcePDF or PDFBox to extract content from PDF. But I don't now the way to continue generating HTML web pages from the text and images extracted.
You can convert pdf to html with PDFBox. Try this link.
By adding -html as parameter when you extract text, you will get html of the pdf. But it will not contain any image, graphics and other details. It will be only the text extracted from the pdf in html format.
If you want to create the exact look and feel of the pdf, there is no single step method in PDFBox. In my knowledge no library provides this facility to create exact html of the pdf. But using PDFBox you can extract images, text and its details. Using these details you have to create a logic to produce the html. We have done a project to convert pdf to html for azzist.com. We have accomplished the conversion using PDFBox. In azzist we are converting the resume to html format. (Still some font issues are there).
Scribd, google, dropbox, zoho etc have accomplished this conversion in a better way. You can have a look at any of these sites to check how they have accomplished this. (You will not get the logic. You have to find it out).

Display/Render RTF doc in browser display using html textarea or something similar

My web application has an feature wherein preformatted RTF documents are used as templates and the user can select the source of data and then merge with the RTF documents templates to create merged RTF files. The RTF templates have placeholders which get replaced with user selected content. The final doc can either be saved or opened directly if word/wordpad is available on the local users machine.
Now, I have a requirement to display the merged document to the user for confirmation. The user may either print or save the document to the system directly. The display should not be word/wordpad application but should be within the application itself, using textarea or something similar to render the document. Can you please let me know if its possible to render the RTF document in textarea or not. Along with the displayed content, there should be options to print and save the document.If I have to convert the RTF to Html and then display the html content in textarea , please let me know how i can do the conversion and then display the html in the page.
That's a very difficult requirement. First of all, let's dismiss the idea about a <textarea>, because it does not support any formatting at all. All the WYSIWYG editors you've seen out there are based on <iframe>s.
Secondly, no browser can directly display a RTF. You can embed it as an <object>, and some might show it (IE probably will), but I can't say which ones won't. Portable devices almost certainly won't. But you should test this though, maybe it works well enough after all.
Failing that, HTML conversion is also out of question, because RTF has very very many features that cannot be emulated in HTML. There are some converters out there (google), but but they will all come with serious limitations. If you want full support, you will have to do your own rendering via Canvas or Flash or something.
To this end I'd suggest checking out Google Docs. They've gone through all of this hassle and have a rather feature-full engine for displaying most possible documents. I think it was also possible to embed them in your own webapges, though I've never checked it out myself.
Use a <PRE> tag to Display/Render RTF doc in browser.

Problems in generating HTML with JasperReports

I am using jasper report with my application and generating the reports in pdf formats, which are coming up fine. We want the user to be able to view those reports in html also with in the application, but generating HTML from jasper contains inline CSS for its individual element which we do not want. (We want to apply our own CSS so that look and feel of application remains same.). If any body has any ideas how it can be done, please help.
Also we do not want large number of records in a single page in html, so any ideas on how we can implement pagination in such a scenario.
I don't think so you can separate the CSSs from the HTML which is generated by the iReport.
To check for some more options please open the export options which are under
Tools->> Options ->> Export Options.

what would I have to do to get the new HTML Editor ajax control to work as a sharepoint content editor webpart?

Microsoft have just released a few new ajax controls including an ajaxed up HTML editor control.
http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-50-cs.aspx
I would like to try this in Sharepoint (as the built in Sharepoint one is awful (no cross browser at all and flaky on IE) I tried the Telerik free one but it was not very stable.
I guess that getting the control up on a page won't be too hard, but how do I make sure the resulting HTML is stored in the Sharepoint way(tm)?
Thanks
If you intend to replace the standard SharePoint rich text editor, you would likely find it much easier to use jQuery than the ajax control toolkit. The MS ajax controls have a server component - you may be able to get it into a custom column type, but it's going to be a lot easier if you just replace the textbox with something better clientside.
The standard control works in a similar way - a standard textbox containing html is created on the server, and javascript is used to hide that and connect it to the rich text editor.
There is really nothing you need to do to format the HTML for SharePoint. If you are working with a field control you can expect that SharePoint will strip out a lot of the HTML from your control.