If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Show HTML content in PDF

Started by Yasser, 12 Jan 2017 10:54:36 AM

Previous topic - Next topic

Yasser

Hello,

I have a HTML code saved in the database and I want to display it in the report as export it as pdf, The problem is that the "Rich Text Item" is not supporting most of the tags and styles, I've tried many solutions with no luck, the problem is that the HTML code is dynamic, huge and complected, Also there is a limit i think with 35k characters, I was thinking even in finding a way to save the content result as image and then embeded the image in the report but when the image have a big height it not break the page and make problems.

Anyone have suggested solutions ? or even to increase the max characters of the BLOB data item in the FWM?

Thanks, 

CognosPaul

I think you're out of luck. Rich Text Items are difficult to work with, and even if you did modify the internals to permit non-standard objects, the PDF writer simply does not work with complex objects. My current client has found a open source writer which allows them to feed it HTML and spit out a PDF. It won't work with scheduled reports, but depending on your requirements it might work.

Yasser

Quote from: CognosPaul on 12 Jan 2017 03:54:32 PM
I think you're out of luck. Rich Text Items are difficult to work with, and even if you did modify the internals to permit non-standard objects, the PDF writer simply does not work with complex objects. My current client has found a open source writer which allows them to feed it HTML and spit out a PDF. It won't work with scheduled reports, but depending on your requirements it might work.

The report I'm creating is dynamic, I'm thinking in saving it in the database as image and show the image in the pdf normally, But the problem if the image is taller that the pdf page height it not break.

Also I was thinking in saving it as PDF and include a pdf inside the report in embedded tag, but it is not working in the Rich Text Item 

CognosPaul

Cognos can build remarkably complex outputs in PDF. While you can't embed HTML directly in the report, I've often found ways to recreate the client requirements using the standard RS objects. At the very very worst I've found it possible to make RAVE graphs to replicate the requirements with a fair degree of accuracy.

If that's not possible, can you make a series of images that can be embedded? I've had one report in which images were generated and dynamically added to the report through images in a list.

Yasser

Quote from: CognosPaul on 15 Jan 2017 02:49:25 PM
Cognos can build remarkably complex outputs in PDF. While you can't embed HTML directly in the report, I've often found ways to recreate the client requirements using the standard RS objects. At the very very worst I've found it possible to make RAVE graphs to replicate the requirements with a fair degree of accuracy.

If that's not possible, can you make a series of images that can be embedded? I've had one report in which images were generated and dynamically added to the report through images in a list.

Creating a series of images is a brilliant workaround, I will apply and let you know the results.

Thanks again Paul  :)