birt tool dynamic text with dynamic HTML having embedded image not showing in pdf - html

I am trying to display HTML content in PDF using eclipse Birt. Birt has Dynamic text(HTML format) pallets where we can display clob data. Here one of my HTML content is embedded image base64. While viewing in PDF the embeded html image is not displaying instead showing error msg "The resource content not found".
Birt expert please comment - On how to show Clob data embeded image dynamic HTML !

This is not going to work out of the box. BIRT HTML content is only meant for text formatting. Neither images nor HTML tables are supported (well, HTML tables actually are working to a minimal extent).
The best solution I can think of is: Parse the HTML yourself and extract the images yourself. But be warned, that's going to be tricky!
You would create two scripted DataSets, one for the text and one for the images.
Both DataSets would receive the HTML as input parameter.
The first one would just replace embedded images with a text like "see image #N" and return exactly one row.
The second one would extract the embedded images and return the image number, its URL and embedded data.
You could then use a List item in the layout to render the images after the text.
The script code will be complicated...

Related

Is it possible to display html file in .ipynb file without showing its code?

I want to display html file in .ipynb notebook, but I could not find proper way to do it.
I found ways where you can display html from running its code with cell type "code", but I want to display it with cell type "markdown" so its code will not be visible. Is there any way to do so?
I use the voila package to generate my html pages and I mix code cells and markdown cells for the text. The html pages contain only graphs, tables and comments but no code.
example

Make text on pdf file fit the placeholder on the paper when printing

I have a paper doc here i need to make a blank pdf file containing only the data of the place holder so that i put the paper on the printer and when i print my generated pdf report the data will fit exactly the paper, i can just make it from scratch the paper template and the data and print everything at once from the pdf file but i am not allowed to do it (long story) i just need a good approche i absolutely have no idea how to do it, my intial idea is to use html css since i am generating this pdf report from odoo's q-web repor
i have tried to make everything to pdf it worked but now its requested to get only the data on the pdf file without the page layout
I just did it by adding a background image in the qweb report using this property t-attf-style="background-image:url()" and placed the info in their respective text holder, after that, I just removed the background image and got my result

How do you extract data from a website's HTML code when its source code doesn't contain any text that appears on the site?

I'm trying to extract data from a particular site but when I read through the html code it contains none of the text that appears on the webpage. And all the webpages have the same code as the home page. I was wondering if it is possible to 'hide' data on your webpage somehow, and how I might be able to find it.
Thanks!

Convert rendered HTML 5 display (visible and invisible) to image when using HTML 5 canvas

Is there source code (or a browser plugin) to convert the contents of an HTML 5 web page to an image file? This would not just include the visible contents, but the hidden contents as well (assuming there were scroll bars in the page). If there isn't, any advice on how to approach this particular functionality would be appreciated, and I can look into it.
I found this...
html to jpg with c#
However...
I think they just had text in the page, so it doesn't have any dynamic images on the page. My page specifically uses the HTML 5 canvas functionality to draw images. So that must be part of the image file.
It looks like you should be able to do it using javascript with this technique:
http://www.html5canvastutorials.com/advanced/html5-canvas-save-drawing-as-an-image/
Make sure to take note of the following caveat however:
Note: The toDataURL() method requires that any images drawn onto the canvas are hosted on a web server with the same domain as the code executing it. If this condition is not met, a SECURITY_ERR exception is thrown.
EDIT: You may also want to check out these related questions:
Save HTML5 canvas contents, including dragged-upon images
How to save a HTML5 Canvas as Image on a server

Open source program that can reference a converted image to the html

I would like to know if there is a program that can reference a converted image file to the actual html?
What I mean is that normally when you save a html page, there will be image saved in the folder together with the html. Suppose that I need to convert the image to some other type (example from gif to jpg), then the actual html saved that contains that image will be lost since the image has been converted. I wanted to view the same html page with the image converted and the html page will still display the same image. As such, back to the question, i wonder if such program exists?
I have tried to google it but I have found no such program exists.
What's wrong with just changing the relevant src attribute in the html file?