我想在下载pdf
时添加水印function PrintPanel() {
var panel = document.getElementById("Result");
var printWindow = window.open('', '', 'height=auto,width=auto,scrollbars=1,landscape=1');
printWindow.document.write('<html><head><title></title></head>');
printWindow.document.write('<body>');
printWindow.document.write(panel.innerHTML);
window.setTimeout("javascript:setLandScape();", 2000);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}
答案 0 :(得分:1)
您可以在从顶部开始的绝对位置重复添加水印元素然后打印。试试这个:
<!DOCTYPE html>
<html>
<head>
<script>
function PrintPanel() {
var panel = document.getElementById("longPanel");
var printWindow = window.open('', '', 'height=auto,width=auto,scrollbars=1,landscape=1');
printWindow.document.write('<html><head><title></title></head>');
printWindow.document.write('<body>');
var pHeight = panel.clientHeight;
var windowHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var noOfWatermark = pHeight/windowHeight;
for(var i=0;i<noOfWatermark;i++){
printWindow.document.write('<div style="opacity: 0.5;color: BLACK;position: absolute;top: '+windowHeight*i+'px;right: 0;">Sample Watermark</div>');
}
printWindow.document.write(panel.innerHTML);
window.setTimeout("javascript:setLandScape();", 500);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}
</script>
</head>
<body>
<div id="longPanel">
<p id="panel">
<pre>
But much earlier, the night before Luke had gone to London for six months, before the band was named and when Gabe and Eric had been playing solo shows together, sharing a set,
backing each other up; back before all this Luke came to Boston to talk about what they'd accomplish over the next few months, how to deal with Gabe, that he needed guidance
and most of all an editor, someone to tell him when an idea didn't work, to point out the line between good stupid and bad stupid. This meeting was conducted at the first bar,
outside on the patio, smoking and drinking, nearly-naked college kids celebrating around them, and they slouched at a table right in the middle of the floor, speaking slowly and
with long pauses. Business concluded, they made their way to the second bar, where Eric instigated an arm-wrestling competition with a hipster in a drum major shirt, a Boston hipster,
a sorry imitation of the New York standard. They were drinking Mojo, a microbrew from Colorado famous for inducing blackouts and raising bad blood. Eric was smoking outside and just
started talking to the hipster, asking him where he got his hair cut, really pestering him about it which okay was pretty obnoxious, suggesting salons and even specific stylists by name,
the guy denying that he got his hair cut anywhere, like it just stays that length all the time, even the deliberately shaggy parts over his ears. But then Eric got distracted
by this other guy, a friendly guy with a shaved head and a thick neck who was talking about the difference between a punch you see coming and a punch you don't,
how when you're going to take a punch you shouldn't tense your muscles, just let the blow bounce off you, your muscle and in Eric's case fat absorbing the shock of the blow.
Eric asked him to demonstrate, and the guy said no way am I going to hit you man, and Eric, with the love of the world, told him well obviously don't really hit me, I'm a pussy
that's only ever been in one real fight. Pull the punch, Eric said, but hit me once in one arm and I'll tense it up, hit me in the other and I'll keep loose. So the guy hit
him in the loose arm and yeah that really wasn't that bad at all, then in the tense arm and Eric rubbed his arm and said yeah you were absolutely right man that hurts.
Then he went back in the bar and was waiting for a drink, Luke talking to Sasha, the Montenegrin expatriate, Sasha saying that the reason he gets so many girls is because
he knows which shoes to buy, denies up and down that it has anything to do with his accent because that would be an insult to his inborn ability to choose the right shoes
and get girls. Eric got his drink and turned, taking a sip and wiping the bottom of the glass with a cocktail napkin, and there was hipster drum major guy again, with the
bad attitude and the hair, puffing his chest which looked all the more ridiculous because of the brass buttons and epaulets on his shirt, and now the guy's hackles were raised,
like you could see him just standing there and bristling, and he asked Eric if he wanted to fight, and Eric said no but I would like to arm-wrestle. Eric has done this before,
has challenged people to an arm-wrestling contest in bars, because it is a way of resolving conflict peacefully, because he will probably lose, but graciously, leaving his opponents
zero options in terms of impressing people and getting girls. But he also wanted to win if he could, and he'd developed a strategy: do not try to force the opponent to the table,
but merely hold him, wearing him down, relaxing the white muscle fibers that provide quick action, waiting until the guy is tired and then finishing him in one stroke.
He did this with the hipster but let his arm drop to forty-five degrees and held the guy there, let the hipster think he's winning, started making bored faces, yawning.
The hipster was angry, wanted a rematch, so they went again, and this time Eric let his arm fall to ten degrees and just held it there, thirty-five degrees more insulting,
and suddenly the hipster stood up and announced head won, which Eric at this point was drunk and belligerent enough to contest. When he stood up to tell the guy that he hadn't won,
to explain it all to everyone, he saw that the place was suddenly full of arm-wrestlers, people paired up and facing off across the narrow tables, guys with beers and one hand in their pockets,
smiling, cheering, making jokes about placing bets. They left the bar, Luke and Eric, heading back to the apartment where Linda was probably asleep which meant they could smoke indoors.
They got in a cab, Eric swaying across the seat as they turned corners, now extremely drunk, memory-loss drunk, almost never happens. He managed to tell the cabbie where to go and
when they pulled up to the apartment he apparently paid the man, I mean the money disappeared, and then he got out of the car but he stumbled a little getting out,
dropped some money on the ground, and when he picked up the money it was covered in blood. He looked at his hand, still standing in the middle of Cambridge Street,
and the pinky finger on his guitar hand was bleeding, brown stains on his jeans. He couldn't move the finger. How the did that happen he thought as he followed Luke inside,
Luke taking care of everything all of a sudden. (Alison was in Providence, waiting for her boyfriend to get home from his classes at Johnson-Wales, one of the premiere
culinary academies in the nation, drinking a Miller High-Life and listening to music, increasingly annoyed.) They went in the back door and Eric leaned against the white frame,
leaving a streak of blood, Linda suddenly awake in a bathrobe and asking them both what happened, but they were both far too drunk to explain anything, and in any case neither of them actually
knew what had happened. Linda cleaned the wound while Eric stood at the kitchen sink, trying not to pass out. She wrapped the finger in gauze. The next day Eric woke up early
even though he didn't have to work, re-wrapped his hand and Gabe arrived, ready to play, and they got their outfits and got ready and played a show, Eric on the guitar
with three fingers, white bandages hanging from his wrist.
McBeaner!!!!
Once there was a very normal guy named Smenen that lived a very normal life style. He lived with his parents even though he was old enough to get his own place and drink.
He was more of a laid back guy. Till one day his mom got tired of his attitude and that he wasn’t providing money to the house. It wasn’t only with his mom that he had problems with,
but with people from the streets that he owed money to because he used a lot of drugs. He smoked weed on a daily bases. Due too the poor community he lived in. One day he experiences a drive by,
by a much known guy to the police department. Luckily he didn’t get hurt but like any mother would do, she sent him with his cousin Poncho in the East Bay in the City of Hayward.
Once he got to the airport his cousin was there to pick him up. He was in a 1985 Monte Carlo Super Sport . It was a shiny black that shined so much that it could blind you from the reflection,
As Smenen saw Poncho pull up to where he was waiting he greeted him with a handshake and a hug. He quickly noticed that they were very different; he noticed that Poncho was very neat.
And he dressed baggy. So when they were driving back to Ponchos place he noticed that his neighborhood was a very friendly one. When they got out the car this pretty Latina girl came up
to where the cousins were and surprised poncho and got him from the back. Hugging poncho she looked happy while smenen was staring at her with his mouth open he said DAM!
She looked at him and said “are you smenen?” and he replied “yes” she Looked at Poncho and said “babe omg I didn’t know your cousin was coming.” Then Poncho said “oh yea sorry it was sudden
, he had problems at his hometown but were going to change his ways huh smenen?” Poncho said looking at him. And Smenen looking down answered “hum yea I guess” They got too the front door
of the apartment and opened he door. Smenen eyes got huge. He hadn’t seen a place so neat in his life. Poncho showed him to his room. The next day Smenen woke up and walked all over the
apartment and couldn’t find anybody so he went to take a walk to the park and relax. Smenen had never really just sat down and looked at the sky or listened carefully to the sound and the
view of the world. He liked it, the smell of the fresh air in the morning and the green grass and the little kids playing in it. It reminded him of the days. Well when he had a family.
He had a family, a wife and a son. But a bad day in the hood made him lose everything. Some people started fighting in front of the apartment complex where he lived and fired shots went
threw the walls hitting his wife and son. When that flash back went threw his mind tear drops fell from his cheek to the floor. So this little girl went up to him and said
“sir why are you crying?” before he answered the little girls mom came running saying sorry for my little girl bothering you. He replied saying “no she wasn’t bothering me
at all hah ashes just concerned why I was crying” The mom was a mid height women with dark curly hair, shiny white teeth and big lips that looked as red as a cherry.
He immediately said “hey watz gewd?” she blushed and said “nothing” while looking down and playing with her hair. Her cheeks blushed a bright red. He said “so does your little girl
have a father?” “No he left us” she said. So he smiled and said “have you had lunch?” So they started talking for a while. It’s been a month since they have been talking as best friends
. He wanted to move a step forward in their relation ship bit he didn’t know if she liked him like that. He would ask poncho and his girlfriend if he should get with her or if
she might like him? They both said it’s obvious that both of us like each other. I mean why not get together, were both nice people. So he went to her house, as soon as he opened
the door the little girl jumped and hugged him and called him daddy the mom and him stared at each other with an awkward look. He walked towards her and told her “hi i just came
to ask u a question that I wanted to tell you
The Paragraph V. The Long Sentence
16. De Quincey, the essayist, once said that the German sentence is like a carryall - always room for one more. That used to be true of the English sentence. Originally,
to be sure, our sentence was short, but under the influence of Latin studies it grew heavy and unwieldy. From sixteenth century writers it is possible to quote sentences of
five or six hundred words. Such a sentence would fill two pages of this book.
When newspapers came to the front, the English sentence began to drop a part of its words. Yet one of the best journalists of the eighteenth century, Daniel Defoe, who wrote
Robinson Crusoe, is not above writing an occasional sentence of great length. Here is a business sentence from Defoe:
One office for lone of money for customs of goods, which by a plain method might be so ordered that the merchant might with ease pay the highest customs down, and so, by allowing
the bank four per cent advance, be first to secure the £10 per cent which the king allows for prompt payment at the custom house, and be also freed from the troublesome work of
finding bondsmen and securities for the money - which has exposed many a man to the tyranny of extents, either for himself or his friend, to his utter ruin, who under a more
moderate prosecution had been able to pay all his debts, and by this method has been torn to pieces and disabled from making any tolerable proposal to his creditors.
Here are a hundred and twenty-nine words in one sentence. The book from which it is taken, "An Essay upon Projects," averages more than sixty words to the sentence.
How long is the average sentence today! It depends on the man, but in even the most literary prose it will not average more than thirty words. The average sentence
of Macaulay's England is 23.43. Emerson's average sentence is less than that.
But do business men never write long sentences! Alas! many are only too prone to this form of amusement. Amusement it is, for there is a curious pleasure in seeing how many
words may be packed into one package. In Dean van Benthuy-sen's excellent brochure on English in Commercial Correspond* ence - published by the LaSalle Extension University
- the following is quoted:
I am in receipt of your letter of the 9th instant, relating in part to the stenographer and type-writer examinations next spring and also the question of local appointments
in connection with the conducting of Civil Service examinations, concerning the latter of which I would say that with the exception of the route examinations which are conducted
by the various district secretaries, the examinations are held by employees of the post offices at the different places of examination, who have been specially designated for
such purpose under a provision of the Civil Service rules.
The youth who got that must have felt as if he were perusing a railroad time-table. Good mental exercise! Never, never use that argument. To cause your reader or correspondent
unnecessary mental labor is the greatest of all blunders in business English. The more patience he spends in getting at your thought, the less he will have for your proposition.
Let us turn that alleged sentence into a paragraph. There are several versions that might be made. Here is one. [Note that while the indention, or blank space at the beginning
of the first line, is a mere trifle in the printed line, it should be at least an inch deep in written manuscript.] -
I have your inquiry of June ninth. You ask first about the stenographer and type-writer examinations next spring. [Here let him answer that inquiry.] You inquire also as to local
appointments in connection with the conducting of Civil Service examinations. The route examinations are conducted by the various district secretaries. The others are held at the
different places of examination by post-office employees who have been specially designated for such purpose under the Civil Service rules.
The single sentence has ninety-four words; the corresponding paragraph has only seventy, although it contains five sentences. Yet if the paragraph isn't easier to grasp than the
sentence - well, our theory is all wrong.
The paragraph gives the writer room. It allows him to take breath. He can proceed in a leisurely manner to make one point and then another. And precisely as these are advantages
to the writer, they are advantages to the reader.
17. Another thing. This great modern invention, the paragraph, permits the writer to emphasize the important thought. Suppose that the paragraph is to deal with a group of
details which are all of the same sort, but one of which is the most important. He can run a group of details together in one sentence, using semicolons if necessary, and save a
short strong sentence for the one detail that deserves it.
Note how the emphasis is distributed in the following excellent paragraph:
There is always one by which the rest are measured In the magazine world, that one has always been and is today THE CENTURY. Ask writers where their best productions are first offered;
ask editors which magazine they would rather conduct; ask public men where articles carry most influence; ask artists where they would prefer to be represented; ask the public what
magazine is the first choice among people of real influence, and the answer to each question is the same: THE CENTURY.
18. In the business English of our time the paragraph tends to be short. This is due to the influence of advertising. That white space before and after a paragraph calls attention
to the text and relieves the tired eye from attempting too much at once. So arises what we call the single-sentence paragraph. You find it in trade-journals, and in the editorials
of a certain class of newspapers. Here is a specimen, written by the well-known advertising agent, Mr. John Kennedy:
More than six years ago I had the good fortune to prepare a series of advertisements for a very able Advertiser in the west
"It may also be objected that my opening remark about the appealing character of Pyrrhonism is wrong or surprising, given that it is not possible for anyone to think that the stance
I have presented is attractive and worth adopting. For instance, not only does the Skeptic not promise that the suspensive attitude will certainly make possible the attainment of ataraxia,
but he does not even regard this as an aim that is intrinsic to his philosophy. To this objection, I would first reply that the appeal of Skepticism seems to lie in the sort of radical
changes that this philosophy may entail in a person’s life. For, if adopted, the cautious Pyrrhonean attitude will prevent one from making rash judgments about any topic that one has not
examined or found final answers to, which in turn will prevent one from acting hastily. Another profound change consists in the fact that, even if at some point the Skeptic broke some
of the most important moral rules of the society to which he belongs, he would perhaps experience some kind of discomfort, but he would not believe that he has done something objectively wrong.
This would free him from the shame and remorse that those who believe that such an action is morally incorrect would experience in the same situation. In sum, the Pyrrhonean philosophy would produce,
if adopted, profound changes in a person’s thoughts, feelings, and actions; changes that at first glance seem to be beneficial. But secondly, I think that whether or not Pyrrhonism is an appealing
philosophy cannot in the end be determined a priori. For it depends on whether one values such attitudes as caution, open-mindedness, and intellectual modesty; or, if one does,
on whether these attitudes are preferred to, for example, the sense of assurance that one may experience when espousing philosophic systems or religious beliefs.
This is why my opening comment was just that Pyrrhonism may still be found attractive and worth adopting."
</pre>
</p>
</div>
<button onclick="PrintPanel()">Print this page</button>
</body>
</html>
&#13;
PS:通过网络从随机网站获取的文字