Joomla: Raw Output With Title And Description Possible? - joomla1.7

I have a simple question. Is it possible to set a Title and a Description when displaying RAW output? (format=raw)
Currently I'm getting empty <head> tags.

Simple answer: no.
Raw output only displays the component output of a page, nothing else.
Try using this instead tmpl=component

Related

scrapy xpath extract text after element is assigned

I have such html
<h1 id="1"><i>2</i>sample contents</h1>
I know by using the following work to get only text perfectly without html
response.xpath('//*[#id="1"]/text()').get() # sample contents
response.xpath('//*[#id="1"]/text()').extract_first() # sample contents
but if I assign into a variable then want to get only the text without html after?
For example
header = response.xpath('//*[#id="1"]')
# the below will get text WITH html tags
header.get()
header.extract_first()
What I want is if i assigned to header and I want to get text only, how am I able to do that?
Thanks in advance for any suggestions and help.
EDIT:
By testing Moein's answer, somehow what I get in return is "\r\n \r\n " spacings instead
You can continue your XPath address by calling xpath on header variable:
header.xpath('./text()').get()

Node.JS HTML to PDF

I want to convert the HTML to PDF for which I am using this package (https://www.npmjs.com/package/html-pdf).
But in this HTML I am also getting tables and that tables can come in any position in HTML.
So I want to copy the table thead to another page if the table in the HTML exceeds more than 1 page.
Can you please help me on this.
Thanks in advance
You're going to have to modify the CSS of the page to properly handle a printable view.
See also: Repeat table headers in print mode
Try to use Puppeteer to create PDF from HTML
Example from here https://github.com/chuongtrh/html_to_pdf
Or https://github.com/GoogleChrome/puppeteer

WKHTMLTOPDF Dynamic Header on every page

I am trying to produce a PDF file using WKHTMLTOPDF library in NODE for a large HTML file. I need to be able to stuff in some content in the Header and Footer on every page. But the content on the header changes on every page for e.g, have custom numbering in a format like BX008761. The number should increment on every page.
First page will be BX008761, second page BX008762, third BX008763 so on..
I could find a thread which is related..
WKHTMLTOPDF -- Is possible to display dynamic headers?
the above thread states:
"you can feed --header-html almost anything :) Try the following to see my point:
wkhtmltopdf.exe --margin-top 30mm --header-html isitchristmas.com google.fi x.pdf
So isitchristmas.com could be www.yoursite.com/magical/ponies.php"
does the source value provided for --header-html option be called for every page of the PDF rendered or it is called just once for every PDF..?
Appreciate your support.Thank you.
EDIT : I have tried a sample program and confirmed that it will process the value provided for --header-html option on every page rendered with in PDF. I am using a remote service to return the HTML string as a response to the url.
Now it is displaying the html string as is, instead of decoding it.
when the service returns below string:
<html> <body> <span style="color:red" > 123 :: 0 :: 3000025 :: 634943551338828720</span> <body> <html>
then the header on every page is also same as above instead of displaying the text in red color. how do i make the wkhtmltohtml understand that the content it received from service need to be decoded.
appreciate if any one can suggest a workaround.
Thank you.
EDIT : I have used another work around to return a HTML page for the header content. I used essentially a HTTPHandler in asp.net to return a valid response and the issue looks to have addressed the core issue of having a dynamic header on every page.

On codaset, in a ticket description: is it possible to render raw text instead of markdown processed markup?

Well, everything is in the title ;-)
Thanks
Fro_oo
Codaset twitter answer :
All descriptions are rendered via Markdown by default, and that cannot be disabled.

Greasemonkey script not setting innerHTML properly

My grease monkey script is the following:
document.getElementsByTagName('html')[0].innerHTML = "<b>asdfdsfa</b>";
alert( document.getElementsByTagName('html')[0].innerHTML );
When I run the script, the alert says:
<html>b<asdfdsfa</b<
And the text that I see is
<html><b>asdfsda</b>
Does anyone know what I have to do to have the correct stuff displayed (ie. bolded "asdfsda")
Thanks
What is the doctype of the page you are changing?
Also, have you looked at DOM methods?
e.g. document.createElement('B');
You have to type .textContent instead of .innerHTML if you don't want to view the ascii code :) have a nice time!

Resources