How do I disable the titlepage when generating a PDF via DocBook and FOP? - apache-fop

Not that it is all that entirely practicle, I have a particular customer that is wanting to turn off the title pages in their PDFs that are getting generated. I looked and looked through the DocBook FOP parameters and documentation and couldn't find a way to disable the titlepage. I found ways to customize however.

Use a PDF filter and strip away the first page?

I ended up changing the document type from a book to an article. This removed the title page and everything else not needed.

I've just started looking into docbook and this is also what I'm trying to do at the moment. As far as I've read it is suggested to create a custom titlepage xsl (which could be genereted from your own titlepage.xml file - sample could be found under docbook-xsl-ns-1.76.1\template)
It's explained here : http://www.sagehill.net/docbookxsl/HTMLTitlePage.html

You simply have to add this to your stylesheet:
<xsl:template name="book.titlepage.recto"/>
<xsl:template name="book.titlepage.before.verso"/>

Related

Strike through page header in DokuWiki

I am looking for a way to strike through page header in DokuWiki. I checked on Dokuwiki page but couldn't find it. Can anyone please help me with it.
Another alternative would be to use an external tool like http://manytools.org/facebook-twitter/strikethrough-text/ to generate UTF-8 text that is already stricken through and then to copy&paste it into DokuWiki as your headline.
One advantage is that then also your links will display the headline as stricken through.
Also, you don't have to meddle with custom CSS or additional plugins.
it's a limitation of how headlines work in DokuWiki
See explanation here.

What API does facebook use for displaying the full Wikipedia articles?

I couldn't find any api that return the article in a usable HTML form. Most of them return extracts which have very poor HTML formatting which makes them useless for anything.
There is no way to tell what Facebook did exactly, but the easiest way to grab the HTML contents of an article is by using the render action, i.e. by appending action=render to the URL:
https://en.wikipedia.org/wiki/Cooking?action=render
This produces the exact same HTML you can see on Wikipedia, but omits the non-content part (sidebar etc). If you need to reproduce the layout of an article more faithfully, you need to reuse parts of Wikipedia's CSS, and there is no easy way to do that.
Since just a few days there is a REST API for getting the html. It is available at https://rest.wikimedia.org/
Since it is so new, Facebook is probably not using it (yet) but if you want to get it for yourself I suggest you start exploring there.

How to define custom wicket tag

I could not find a wicket tag like wicket:include? Can anyone suggest me anything? I want to include/inject raw source into html files? If there is no such utility, any suggestions to develop it?
update
i am looking for sth like jsp:include. this inclusion is expected to be handled on the server side.
To do this, you'll need to implement your own IComponentResolver.
This blog article shows an example somewhat resembling what you're after.
Is it raw markup that you want to include, or Wicket content?
If it's raw markup, even a simple Label can do that for you. If you call setEscapeModelStrings( false), the string value of the model will be copied straight in the markup. (Watch out for potential XSS attacks though.)
"Including" Wicket markup is done via Panels (or occasionally Fragments)
Update: If you add more detail about the actual problem you need to solve, there's a good chance that we can find a more "wickety" solution, after all, JSP and Wicket are two different worlds and the mindset of one doesn't work very well in the other.

how to generate pdf in GXT/GWT?

i am using GWT/EXTGWT. on click of submit button i get list of records from db. i need to export them to pdf. please suggest me how to do this?
if data to be exported is more then that should be exported to multiple pages.
Thanks!
There's little in context of GWT here, apart from the fact that you have a GWT based application. What you are really looking for is a tool that generates PDF, given data.
There are hosts of them available :
iText
jPDF Writer...
Obviously, iText has been the most widely known and successful one! Here's a good tutorial - http://www.vogella.de/articles/JavaPDF/article.html
Try some tools like itext pdf generator Searching online will give you many more options.

Tool to diff webpage semantic structure rather than content

Does anyone know of any tools that allow diff'ing between two web pages semantic markup rather than content?
Cheers.
No, but you might have more success if you break it down into two steps:
Remove content
Diff
You could try using Pretty Diff tool. It would require a minor customization to the markup beautification component so that content components are set to empty strings.
Look at http://prettydiff.com/markup_beauty.js
Change lines 554, 557, and 560 to:
build.push("know text");
These change would actually need to occur in the larger prettydiff.com/prettydiff.js, but now you know where to look. Once done you can run all this off your local.
All you will need is:
HTML of http://prettydiff.com/
prettydiff.com/diffview.css
prettydiff.com/pd.js - this is the DOM interface between the application and the HTML
prettydiff.com/prettydiff.js - this is the actual application code.
I may write this concept of ignoring content into the tool as an option.