I have just installed this module and the e-mail and printer friendly pieces work fine. My only issue there is that it looks like I should add an extra blank line to the top of every page to keep the prompts from overlaying the text (using pixture-reloaded and Drupal 6.10). The text wraps OK, but it would be nicer to have the links just above the text, not in the corner of it, especially since I am getting text links, not little icons.

But, I am getting nowhere with the PDF version. No doubt, if one knows more, one can fill in some sketchy bits in the documentation, but I'm not experienced enough with PHP and such to do that. A find on a fonts directory finds only the one in the dompdf directory. A find on ttf2* finds nothing. If I try the load_fonts.php page, I get
#!/usr/bin/php Unable to locate the ttf2afm / ttf2pt1 executable (checked /usr/bin/ttf2pt1).
... well, I agree with it, but I'm not seeing any instructions on what to do about it. My web host is Westhost and there is nothing on their menu of options for software to install that appears to relate to this. Do I just google about, find it, and install it ... I might handle that, but if it is expected, then I would have thought it would say so.

Is this a dompdf question instead?

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

If you change the CSS of the corner links a bit, you can increase the distance and the placement of those links.

Regarding the whole font issue.. The ttf2afm is usually installed with pdfTeX, which is usually not installed in webservers. You can try to download and install ttf2pt1, but I have to say I have no idea why dompdf is complaining to you about this. Are you using Truetype fonts in your site with no fallback to a default font?

I would advise also to not use dompdf, and instead use the better supported TCPDF.

And you're right, this whole font issue is a dompdf question.

João

tamhas’s picture

Changing the CSS of the corner links may or may not be something I know about doing ... but I can try to look.

I have heard from the web hosting company that ttftafm is not installed by default but that I can try to install it myself if I want to. Or, they would help me for a fee. :(

When I looked at the comparison of the two options, it seemed to me to be a bit of a devil's choice. Either way I was going to have to compromise. I can look at this again, but first I have to check with the others involved to see how much they care about having PDF. Much of our content already has a PDF attached for download which is clearly going to be better than anything automatically generated from the web page.

Oh, and as to the truetype fonts and no fallback ... I certainly am not doing this consciously. All the content not in an attachment is just text typed into a node.

Is there a setting somewhere that gives me the icons instead of text links?

jcnventura’s picture

You have to expand the 'Advanced link options' to see the icon option.

You'll see that it's quite easy to edit CSS. Just Google for "css w3schools" for a nice reference site.

If you don't know how to do it, I recommend against trying to install ttf2afm, and you're right, if you already have the PDFs, there's no point in generating them on-the-fly (makes the site slower, etc.).

João

tamhas’s picture

OK, found the option ... only I find the icons obscure so I went back to text! Oh well.

tamhas’s picture

Well, I poked around in a whole bunch of .css files and I can't say that anything leapt forward as a way to change the link placement. The closest I came was printlinks-rtl.css which I can imagine might alter the border around the text links, but that isn't really the problem since one would prefer the links to be above the actual content box or for the contents of the content box to be shoved down. This is particularly noticeable in a content box in which there is an image at the top right aligned, since now the image is shoved over to the middle of the box and the text to the left in a fairly narrow area compared with before. I have done some minor mods to .css files elsewhere, but here I don't think I have quite a clue about what to fiddle with.

jcnventura’s picture

Actually, everything you'd need to edit is in the printlinks.css file..

It seems your knowledge of CSS is much lower than what I thought, so I would advise you to replace the files with the new 1.4 release and ask someone who how to edit CSS files to do it for you. I think that by deleting all lines in the .print-link class you'll be much closer to what you want.

João

tamhas’s picture

I'll upgrade and then take a look. My knowledge of CSS is nearly zero, but I have been able to puzzle out and modify a few things successfully, so with that hint I try fiddling a bit. Thanks.

tamhas’s picture

Well, I am possibly half-way there. Commenting all of .print-link got me the links above the text, but smushed together. Restoring the margin fixed that, but I really rather like them on the right. Restoring the float put them back over the top of the text again. I fiddled with the value in bottom, then top and got the links themselves to move up, but it is still wrapping the text in the main body as if they were still in place. Right now I have:

.print-link {
position:relative;
top: -3.5em;
float:right;
margin-left: 1em;
clear:right
}

Visually, I like that since it puts both links quad right, one above the other, but I am still getting the text wrap (or moved images) in the main body as if they were not moved above. Hints?

jcnventura’s picture

The moved images are caused by the float.. Delete that and try using "text-align: right;" instead.

tamhas’s picture

Well, not quite the right effect. text-align:right seems to apply only within each link, but the link itself is aligned to the left. Using text-align *does* put the links above the body of the text by moving the text down, which is good, but it loses the one link above the other, which I liked and it doesn't align the links at the right of the column, which I really like.

jcnventura’s picture

You should start fiddling around with some floats and clears for the following classes:

span.print_html
span.print_mail
span.print_pdf

João

jcnventura’s picture

Title: Missing information or code? » CSS to display icons above the content
Status: Postponed (maintainer needs more info) » Active

Hi,

With all this talk, I decided to try it for myself and I actually prefer to have it above the content also. I discovered that no matter how much you fiddle with the CSS, there's no way to make it come out right, so I did a couple of changes that will make it possible to do that. I haven't yet committed the code, but I will soon.

I will change the status to fixed when I do.

João

tamhas’s picture

Great! I was just about to dive into this again tonight, but ***WAY BETTER*** to have a supported implementation. The few other places I have patched the css are annoying every time there is an update and I have to go patch it again.

jcnventura’s picture

Status: Active » Fixed

Just committed some code that fixes this. It should be available in the latest dev in a few hours.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dvkd’s picture

Hi tamhas,

i could get only the printer image at content top corner, can u please tell me how to get all the three icon printer/mail/pdf at content top corner

Thanks in advance