473,605 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Marking PDF links

I seem to recall reading about a feature so that you could apply
different styles to different kinds of link.

e.g. local and offsite or to automatically put a logo beside some
domain links.

I would like to add an icon to pdf links.

I'm after something of the form a:link("*.pdf) { properties ... }

Does anyone know the names of the keywords or the syntax, or if this
is even possible?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 22 '06 #1
15 2124
Roedy Green wrote:
I seem to recall reading about a feature so that you could apply
different styles to different kinds of link.

e.g. local and offsite or to automatically put a logo beside some
domain links.


http://www.w3.org/TR/css3-selectors/...ute-substrings

Note that this is a working draft, not a final spec. There are some
experimental implementions in the wild, but everything is still subject to
change.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jan 22 '06 #2
David Dorward <do*****@yahoo. com> wrote:
Roedy Green wrote:
I seem to recall reading about a feature so that you could apply
different styles to different kinds of link.

e.g. local and offsite or to automatically put a logo beside some
domain links.


http://www.w3.org/TR/css3-selectors/...ute-substrings

Note that this is a working draft, not a final spec. There are some
experimental implementions in the wild, but everything is still subject to
change.


If you use type="applicati on/pdf" for links to PDF resources, you could use
attribute selectors in CSS for them.

That would be an exercise in futility, though. It is useful, and often
essential, to indicate PDF links as PDF links, since following such a link
may confuse the user, cause a considerable delay, result in a blank window,
crash the browser, give the user data that he cannot use because PDF is so
inaccessible a format (despite all the Adobe marketese), or simply fail to do
anything useful due to lack of any PDF viewer on the user's system. However,
many of these points are equally relevant or more relevant in browsing
situations where style sheets are not in use (or the intended visual
indication fails miserably, e.g. because it relies on colors and the user is
blind).

Thus, the best approach is something like
"There are more details on this in the (PDF) document Foo Bar."

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jan 22 '06 #3
On Sun, 22 Jan 2006 11:33:26 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tu t.fi> wrote, quoted or indirectly quoted someone who
said :
That would be an exercise in futility, though. It is useful, and often
essential, to indicate PDF links as PDF links, since following such a link
may confuse the user, cause a considerable delay, result in a blank window,
crash the browser, give the user data that he cannot use because PDF is so
inaccessible a format (despite all the Adobe marketese), or simply fail to do
anything useful due to lack of any PDF viewer on the user's system.


However, if others have elected to provide their papers only in PDF
format, you have no choice if you want to link to them. The best I
figured I could do is warn people a link was to a PDF document.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 22 '06 #4
Roedy Green wrote:
I seem to recall reading about a feature so that you could apply
different styles to different kinds of link.

I would like to add an icon to pdf links.

CSS:
a .pdf {
background: #fff url(pdf-image-path) left center no-repeat;
padding-left: width-of-image-px;
}

HTML:
<a href="http://..." class="pdf">wha tever</a>

The image would have to be fairly small (< 16px height) to not interfere
with other inline text. Which would likely make the PDF logo unrecognizable.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 22 '06 #5
On Sun, 22 Jan 2006 11:33:26 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tu t.fi> wrote, quoted or indirectly quoted someone who
said :
That would be an exercise in futility, though. It is useful, and often
essential, to indicate PDF links as PDF links, since following such a link
may confuse the user, cause a considerable delay, result in a blank window,
crash the browser, give the user data that he cannot use because PDF is so
inaccessible a format (despite all the Adobe marketese), or simply fail to do
anything useful due to lack of any PDF viewer on the user's system. However,
many of these points are equally relevant or more relevant in browsing
situations where style sheets are not in use (or the intended visual
indication fails miserably, e.g. because it relies on colors and the user is
blind).

what I have done in the meantime looks like this:

<a href="http://www.cs.brown.ed u/courses/cs161/papers/j-nio-ltr.pdf"
class="pdf">nio tutorial in PDF</a>
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 22 '06 #6
Roedy Green wrote:
On Sun, 22 Jan 2006 11:33:26 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tu t.fi> wrote, quoted or indirectly quoted someone who
said :

That would be an exercise in futility, though.
(snip)

what I have done in the meantime looks like this:

<a href="http://www.cs.brown.ed u/courses/cs161/papers/j-nio-ltr.pdf"
class="pdf">nio tutorial in PDF</a>


Roedy,

Actually, the SOURCE looks like this. Since the newsgroup doesn't have
access to your stylesheet, we have no idea what the RESULT looks like.

In any case, IMO:
- Yes, you should identify links to PDFs (or any filetype other than
(X)HTML.
- You should also show its size, since many such external resources
are huge. At the least, this will allow the user to know in advance
that linking to this resource might be a good time to take a bathroom
break...

(Yes, in this case DeveloperWorks could update the document and change
its size, but you'd probably still be in the ballpark.)

Chris Beall
Jan 22 '06 #7
In article <87************ *************** *****@4ax.com>,
Roedy Green <my************ *************** ***@munged.inva lid> wrote:
I seem to recall reading about a feature so that you could apply
different styles to different kinds of link.

e.g. local and offsite or to automatically put a logo beside some
domain links.

I would like to add an icon to pdf links.


Have a look at
<http://www.euronet.nl/~tekelenb/WWW/userfriendlierh yperlinks/>

--
Sander Tekelenburg, <http://www.euronet.nl/%7Etekelenb/>
Jan 23 '06 #8
On Sun, 22 Jan 2006 21:11:40 GMT, Chris Beall
<Ch*********@pr odigy.net> wrote, quoted or indirectly quoted someone
who said :
(Yes, in this case DeveloperWorks could update the document and change
its size, but you'd probably still be in the ballpark.)


I generate much of my code with HTML static macros expanded prior to
upload. So if I really wanted I could check the file sizes. I do to
some extent for local files.

see http://mindprod.com/jgloss/htmlstaticmacros.html

the style looks like this:

..pdf, a.pdf:link, a.pdf:visited, a.pdf:active
/* download a pdf file */{
background: url(images/pdf.png) transparent no-repeat scroll
right;
/* top right bottom left */
padding: 3px 35px 3px 2px;
}

The problem was not the style. It was trying to automatically hook it
up to the .pdf extension.

You can see it in action at http://mindprod.com/jgloss/nio.html
near the bottom.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 23 '06 #9
On Mon, 23 Jan 2006 01:01:48 +0100, Sander Tekelenburg
<us**@domain.in valid> wrote, quoted or indirectly quoted someone who
said :
Have a look at
<http://www.euronet.nl/~tekelenb/WWW/userfriendlierh yperlinks/>


I'm puzzled how you could select by MIME type. You don't normally find
that out the MIME type until you probe the server. But you don't
normally do that until you click a link.

Does the browser probe all the links on page??? Surely not. Or does it
make some guess at the MIME type from the extension.? That guess is
probably wrong as every server uses a different table of extensions to
MIME.

Severs would have to divulge their lists.
..
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 23 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1249
by: Mad_Cat_SCP | last post by:
I did a very basic calendar in php, and know I want to mark some days. For example: -exam days, semesters, etc. What is the best way to do this? I want to click a link, button, checkbox,etc and marking days to a database, either single or start and end days. Best regards, Mad_Cat
3
1919
by: Spartanicus | last post by:
How to get help from this group, and how to construct a minimised test case: http://www.spartanicus.utvinternet.ie/help_us_help_you.htm -- Spartanicus
3
1973
by: Damien | last post by:
Okay, most peoples answer to this may be "Gaaah. Why would you do this?", or the like, but here's the question anyway: Are there any stability issues if I mark one of my user tables as a system table (by switching xtype in sysobjects from 'S' to 'U')? I'm not doing this as "a cleved bit of security" or some such - my actual reason for doing this is so that some of my automatic generation tools do not process this particular table, and...
17
12209
by: Mark Tranchant | last post by:
On some of my pages, for example: http://tranchant.plus.com/guitar/chord-tutorial/music-theory ....I refer to musical note names a lot in the text, such as A, F# and Eb. Whilst cycling in to work this morning, it suddenly struck me that a screen reader or speech browser would have a hard time with this. I guess the user would end up with "F-pound" (for US speech browsers) and "Ebb" or something.
4
4505
by: sicapitan | last post by:
I have this code snippet: updateProps snippet: if (mycheckbox.checked == '1') ? $('mycheckbox').checked = true : $('mycheckbox').checked = false; content = $('mydiv').innerHTML;
9
23234
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
How do I mark a method or class in my library as deprecated, so that when it is used by some other application, the compiler will issue a warning?
0
2694
by: Nokao | last post by:
I'm having a lot of severe errors in my db2diag.log, (DB2 v9.1.0.0). Googling I don't fin any information :( What can I do? I attach the first reports...: 2007-11-19-17.50.26.379948+060 I1388E497 LEVEL: Severe PID : 7097 TID : 47556548689552PROC : db2agent (MYDATABASE) INSTANCE: db2inst1 NODE : 000 DB : MYDATABASE
1
525
by: Hvid Hat | last post by:
Hello How should I go about marking certain words in a text? I've got a list of words: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Mark.xsl"?> <Words> <Word> <Acronym>XML</Acronym>
16
4035
by: Pie Squared | last post by:
I'm not completely sure that this is the right place to ask, but I'm doing it in C, so I'm asking, but if I'm wrong, then please don't hesitate to correct me and tell me where to post this. What I want to do is get an executable and writable page of memory, so that I can (say) write machine code to it and then switch %eip (the instruction pointer on x86) to that page so that it will execute that code, or something similar. I'm...
0
8425
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5445
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3912
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1271
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.