footer-html and footer-right should be shown together - wkhtmltopdf - wkhtmltopdf

I want a footer which is defined in the html page and page number in the footer-right.
Footer-html and footer-right both are shown. But footer-right is in invisible font.
Is there anything like, when footer-html is shown, other footer attributes are not taken into consideration?

Related

Set minimal pages count in pdf using flying saucer

Is there any way to set minimal count of pages to pdf? So my current need looks like:
I have an header on second page that should be shown
First page has content that can overflow to second page
It is not acceptable to have 3 pages
So I need 2 pages in both cases:
First page fits to single page (so I should create second page manually)
First page overflows (at create second page by its content)
Single workaround that I found - overflow by empty (<br/>s) content. But I wanna do it with css.
I've tried to use #page:first but it wouldn't work in common css manner (like #page:first .break-page{...})
I've tried to use #page:first {break-page-after:always} - it wouldn't work...

Page margin from second page in wkhtmltopdf?

First page
In my pdf the header on the first page should have no offset. So the margin from the top is zero.
Second and following pages
I want to set a top margin for the second page and the following pages.
So for this i have created header which is hide on first page but after showing header body content get cut.
I have the same problem while putting header and footer.
I just set footer-spacing and header-spacing in the options before generate PDF.
That works fine for me.

Change footer image based on current bookmark or page number (XSL FO)

I want to change the footer image dynamically, based on a current bookmark in the page and current page number in XSL FO.
Currently I am using the code below to print the static image, but I have four images which should be dynamically changed in the common footer region.
<fo:external-graphic src="images/Icon.png" content-height="27mm" content-width="20mm" />

Content attribute in CSS to show image icon

While creating and learning bootstrap page. I came across the content attribute of css I read few articles and I got how it works. But following code snippet shows me an image icon but the content attribute value really isn't the image url but a code. I'm not clear as how we can show the image without the url and where is the image coming from?
.test.glass i:before {
content: "\e001";
}
Following is the html element to show an image icon using above css:
<span class="test glass"><i></i></span>
But what is "\e001" is that an image code or something else?
they are utf8 codes. there are plenty of sites describing the glyphs for different standard fonts but you can also define your own font set with whatever images you choose as whatever character.
if you use a webfont, from fontello for example but are plenty of sites like that one, you can define what image to use as character \e0001 and whenever you want to use that image, you must make sure you use that font-face for the element and use the utf8 code to display the image. in html it would be someting like <span class="iconfont"></span>. if you add the image with css then is like in your example.

Resizing/Scaling images in a view by setting custom CSS width

Problem
I'm doing some maintenance and changes on a Drupal site, but I'm not an expert. My problem is the following. I have a view that produces an HTML table by fetching some field values and putting them into the table columns. One of these field is an image. Unfortunately each image has a different size (images are uploaded by users), and so the overall table looks ugly. I would like to resize/scale images so that they all have the same width. I know I can use CSS to set the image width to a fixed value, and let the height adjust accordingly:
<img src="..." style="width:70px"/>
Unfortunately I don't know how to make Drupal output this custom HTML when processing my view. Currently the produced HTML looks like this:
<img
class="imagefield imagefield-field_imgsmall"
width="100"
height="39"
alt=""
src="http://www.mysite.org/sites/default/files/foobar.png?1292948397">
and I guess this is produced by one of the view's fields (namely field_imgsmall).
First question is: what is that number after the ? in the src URL? And where does it come from? (Each image has a different number in the corresponding src URL)
What I've tried
I've noticed that in the "edit view" mode, when selecting a field, I can check the option Rewrite the output of this field, and there I can mix HTML and substitution patterns. However, I've seen that one of the substitution patterns that's available to me ([field_imgsmall_fid]) is actually producing the entire HTML above ... so I can't customize it.
What can I do? Am I going in a totally wrong direction?
You should look into the imagecache module, which allows you to resize images (and cache the results, so the resizing process rarely happens).
Here's a walkthrough:
http://2bits.com/articles/drupal-using-imagecache-with-views-and-cck-imagefields.html

Resources