I am currently using perl HTML::Strip to extract text from my HTML file, however i have run into a minor problem with HTML specific spaces ie the " ". For some reason HTML::Strip->parse() doesnt seem to work in this instance. I know i can run the replace command later on. But i was checking to see if there another way i can accomplish this by tweaking the new() constructor? Thanks in advance
Perl Code:
my $hs = HTML::Strip->new();
my $line = join('',#htmlSource);
my $clean_text = $hs->parse( $line );
push #processedLines, grep { /\S/ } split (/\n/,$clean_text);
foreach my $f ( #processedLines ) {
print "$f\n";
}
Sample Output:
CBD_UnitTest
MtrTempEst
MtrTempEst_Init1 (C1-Coverage: 100.00 %, 1 out of 1 Testcases passed)
LeadLagFilt (C1-Coverage: 100.00 %, 1 out of 1 Testcases failed)
AssMechFiltInit (C1-Coverage: 100.00 %, 1 out of 1 Testcases passed)
Sample Dataset:
<table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="100%" cellspacing="0" cellpadding="1" bgcolor="white" border="0">
<tr bgcolor="#dcdcdc">
<td width="1%" bgcolor="white">
<img border="0" src="pictures/batch_module_notok.jpg"/>
</td>
<td colspan="3" width="1%">
<font face="tahoma" size="-2" color="black">
CBD_UnitTest
</font>
</td>
<td width="1%">
</td>
<td width="1%">
</td>
<td width="1%">
<img border="0" src="pictures/batch_check_notok.gif"/>
</td>
</tr>
<tr bgcolor="white">
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
<img border="0" src="pictures/batch_module_notok.jpg"/>
</td>
<td colspan="2">
<font face="tahoma" size="-2" color="black">
MtrTempEst
</font>
</td>
<td width="1%">
</td>
<td width="1%">
</td>
<td width="1%">
<img border="0" src="pictures/batch_check_notok.gif"/>
</td>
</tr>
<tr bgcolor="#dcdcdc">
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
<img border="0" src="pictures/batch_ok.jpg"/>
</td>
<td>
<a href="#CBD_UnitTest:MtrTempEst:ts_MtrTempEst_Init1"><font face="tahoma" size="-2" color="black">
MtrTempEst_Init1 (C1-Coverage: 100.00 %, 1 out of 1 Testcases passed)
</font></a>
</td>
<td width="1%">
</td>
<td width="1%">
</td>
<td width="1%">
<img border="0" src="pictures/batch_check_ok.gif"/>
</td>
</tr>
<tr bgcolor="#FF0000">
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
<img border="0" src="pictures/batch_notok.jpg"/>
</td>
<td>
<a href="#CBD_UnitTest:MtrTempEst:ts_LeadLagFilt"><font face="tahoma" size="-2" color="white">
<b>LeadLagFilt (C1-Coverage: 100.00 %, 1 out of 1 Testcases failed)</b>
</font></a>
</td>
<td width="1%">
<a name="LeadLagFilt_0"></a>
</td>
<td width="1%">
</td>
<td width="1%">
<img border="0" src="pictures/batch_check_notok.gif"/>
</td>
</tr>
<tr bgcolor="#dcdcdc">
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
</td>
<td width="1%" bgcolor="white">
<img border="0" src="pictures/batch_ok.jpg"/>
</td>
<td>
<a href="#CBD_UnitTest:MtrTempEst:ts_AssMechFiltInit"><font face="tahoma" size="-2" color="black">
AssMechFiltInit (C1-Coverage: 100.00 %, 1 out of 1 Testcases passed)
</font></a>
</td>
<td width="1%">
</td>
<td width="1%">
</td>
<td width="1%">
<img border="0" src="pictures/batch_check_ok.gif"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
Have you installed HTML::Entities?
The docs for HTML::Strip state:
"HTML::Strip will only attempt decoding of HTML entities if HTML::Entities is installed."
Figured out the answer from the link to HTML::Entities above. Thx #edibleEnergy
use HTML::Strip;
use HTML::Entities;
my $hs = HTML::Strip->new();
my $line = join('',#htmlSource);
_decode_entities($line, { nbsp => "" }, 1);
my $clean_text = $hs->parse( $line );
push #processedLines, grep { /\S/ } split (/\n/,$clean_text);
foreach my $f ( #processedLines ) {
print "$f\n";
}
I understand that we could just use the simple replace here (ie s/\ //g) But the above example works for instance with or without the ";" at the end. Please check the link provided in the #edibleEnergy's answer.
Related
I have an old program (15 years old?) that generates HTML attachments to emails. Basically, contract details get attached, along with signatures. The company wants to now send PDF attachments instead.
I tried to open the HTML attachments programmatically in MS Word, then SaveAs type 17 (PDF). Issue is, my embedded background images -- those important signatures -- do not open in Word.
Any have any better ideas, or workarounds?
I tried to open HTML like this in Word:
<HTML>
<HEAD>
<STYLE TYPE="TEXT/CSS">
.VERYSMALL {FONT-FAMILY:Arial; FONT-SIZE:7pt; FONT-WEIGHT:BOLD}
.SMALL {FONT-FAMILY:Arial; FONT-SIZE:8pt}
.REGULAR {FONT-FAMILY:Courier New; FONT-SIZE:10pt}
.HUGE {FONT-FAMILY:Courier New; FONT-SIZE:12pt; FONT-WEIGHT:BOLD}
#media print {
.no-print, .no-print * { display: none !important; } }
</STYLE>
</HEAD>
<BODY class=REGULAR>
<TABLE width=660>
<TR><TD> </TD></TR>
</TABLE>
<TABLE border=0 width=660>
<TR><TD align=center width=20% class=VERYSMALL>
</TD>
<TD width=60% align=center class=HUGE>XYZ & CO., INC.
</TD>
<TD align=center width=20% class=VERYSMALL>
</TD></TR>
<TR><TD align=center width=20% class=VERYSMALL>
TELEPHONE
</TD>
<TD width=60% align=center class=SMALL>
500 MAIN ST, NY 10001
</TD>
<TD align=center width=20% class=VERYSMALL>
TELEX
</TD></TR>
<TR><TD align=center width=20% class=VERYSMALL>
(555) 555-5555
</TD>
<TD align=center width=60%>
</TD>
<TD align=center width=20% class=VERYSMALL>
</TD></TR>
<TR><TD align=center width=20% class=VERYSMALL>
FAX
</TD>
<TD align=center width=60% class=VERYSMALL>
</TD>
<TD align=center width=20% class=VERYSMALL>
</TD></TR>
<TR><TD align=center width=20% class=VERYSMALL>
(555) 555-5555
</TD>
<TD align=center width=60% class=VERYSMALL>
</TD>
<TD align=center width=20% class=VERYSMALL>
</TD></TR>
</TABLE>
<BR>
<TABLE width=660 class=REGULAR>
<TR>
<TD width=100> </TD>
<TD width=55> </TD>
<TD width=195> </TD>
<TD width=20> </TD>
<TD width=50> </TD>
<TD width=80> </TD>
<TD width=80> </TD>
<TD width=80> </TD>
</TR>
<TR>
<TD colspan=2 valign=top align=Left>Contract Number:</TD>
<TD valign=top>96549</TD>
<TD valign=top align=Right colspan=2> </TD>
<TD valign=top colspan=3> </TD>
</TR>
<TR>
<TD colspan=2 valign=top align=Left>Contract Date:</TD>
<TD valign=top>October 12, 2022</TD>
<TD valign=top colspan=5> </TD>
</TR>
<TR>
<TD colspan=8> </TD>
</TR>
<TR>
<TD align=left valign=top>SELLER:</TD>
<TD valign=top colspan=7>ABC Co<BR>
A One Business Center<BR>
La Piece 3<BR>
1180 Rolle, Switzerland</TD>
</TR>
<TR>
<TD colspan=8> </TD>
</TR>
<TR>
<TD align=left valign=top>BUYER:</TD>
<TD valign=top colspan=7>XYZ and Co., Inc.<BR>
Main St<BR>
N.Y. 10001, USA</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>COMMODITY:</TD>
<TD colspan=7>CRUDE PALM OIL, in bulk. Malaysian/Indonesian origin at seller's option. </TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>QUANTITY:</TD>
<TD colspan=7>250 Metric Tons</TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>SHIPMENT:</TD>
<TD colspan=7>June, 2023</TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>PRICE:</TD>
<TD colspan=7>USD 1022.50 per metric ton CIF Rotterdam</TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>ANALYSIS/ WEIGHTS:</TD>
<TD colspan=7>Landed analysis and landed weights to govern.</TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>PAYMENT:</TD>
<TD colspan=7>99% cash against documents on/before vessels arrival at port of destination, but not later than 45 days from Bill of Lading Date, unless documents are presented thereafter. Balance to be settled on determination of landed weight and quality.</TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
<TR>
<TD valign=top align=left>SPECIAL CONDITIONS:</TD>
<TD colspan=7>This contract is subject to the rules and regulations of FOSFA-80, including sticker AS-9 and in compliance with EU-1 regulations.<BR><BR>CIF Rotterdam Traceability terms.<BR><BR>FFA: Max 5% at time of shipment, basis 5% FFA on arrival. M&I basis pure on arrival.<BR><BR>OP #22101366</TD>
</TD>
</TR>
<TR><TD colspan=8> </TD></TR>
</TABLE><BR>
<BR><TABLE width=660 class=REGULAR>
<TR>
<TD width=24> </TD>
<TD valign=top colspan=2 width=276>XYZ and Co., Inc.</TD>
<TD width=24> </TD>
<TD valign=top colspan=2 width=276>ABC</TD>
</TR>
<TR>
<TD width=24> </TD>
<TD valign=top colspan=2 width=276>(Buyer)</TD>
<TD width=24> </TD>
<TD valign=top colspan=2 width=276>(Seller)</TD>
</TR>
<TR>
<TD colspan=6> </TD>
</TR>
<TR>
<TD width=24> </TD>
<TD valign=top width=24>By:</TD>
<TD valign=bottom width=252 style="background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAAAtCAYAAAAZbXEKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAACGsSURBVHhe7X0JnFxVne5Xt6qrqqt639JJp7OTFWQJixp2AsqioIzI8MIWB1TG51PnMeA4LugwOvBDRJ2HPnlqEIIoBmUTwrDIlrBkDwnZmiS972vt2/u+c+vSRXd1AgMJBPrrnK67nHvuued85////uee6rgyBMYxjncdcaQRgwsFyGT8SKcBy5WEy4qYY4AXscQgPB43j7u470MGHljm2ncfB6rccXzo4WEqZHLD5UqTzEA0apHkxWhujGPDukZ4PaU8HjQDATxzIDFO9HEcIIjUIrsseoYWPYNAwELT6wl8+7o78fPbHkJ7c5x5RHC3yX8gMS5dxnFAkE5lkEqRxlQpFkWJ5Enr3jBu/Le7cd2/fA57dnXCW1iKhcfXgCMBVoGLuVJZuov47y7GLf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6JbtN4OGWhe5qf3LPDPx9G5BJ4ZBqJfZ37oGLks+a2wcg0NvR3g5Ro1ak0PF4LU+qmY2+DjG4ZYiE3Hn5oJU482Q5MM/oTiGLkfpr5w2eWx/H+hayylLSxzoptEuaL4Pob/Gtfsb8QvX1rD2YeNgPTzBfkZfXJ8IyGxb4x/h/qjuN9Bb39N7R1648a6c17EaJDLjz2YDuCxUPYunUPjlo4ByedXkeaZ+MeLQPQvzGtOvD/AaKZSof9O0A9AAAAAElFTkSuQmCC) no-repeat"><BR><BR><BR><HR>(Signature)</TD>
<TD valign=top width=24> </TD>
<TD valign=bottom width=252><BR><HR>(Signature)</TD>
<TD valign=top width=24> </TD>
</TR>
<TR>
<TD colspan=6> </TD>
</TR>
</TABLE><BR></FONT>
</BODY>
</HTML>
Change your media line to match A4 output, it will resolve page size (note those margins for later).
#media print { #page { margin: 0; size: 210mm 297mm ; } body { margin: 0; } }
The browser settings should be default to image, open the test.html and print one with graphics on to check its working.
then in the folder at the console line run
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --headless --print-to-pdf="%CD%\output.pdf" "%CD%\test.html"
Then type output.pdf and check the result, it should be up to the left.
there should be no visible header footer (because the margins obscure them)
Avoid adjusting that first value so I suggest for your case the second as body { margin: 12mm; } } should be about right (1/2"), too much will trip a new blank page, as seen here, by the page 1/2 :-
For a full folders worth run
(NOTE if using a batchfile.bat change %F to %%F and the 2 x %CD%\%~nF edit to %CD%\%%~nF)
for /f "usebackq delims==" %F in (`dir /b *.html`) do ("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --headless --print-to-pdf="%CD%\%~nF.pdf" "%CD%\%~nF.html")
Mailchimp is so frustrating. I'm trying to make a campaign with the template that I did. It's supposed to look like this:
BUT when I'm trying to paste a table that I copied from google sheets, it's looking like this
How do I fix it? How can I make the borders disappear every time I'm going to paste a table?
If you're wondering this is the source code (I removed the content because it's classified and it exceeded the 30,000 characters limit):
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
</style>
<table border="1" cellpadding="0" cellspacing="0" dir="ltr">
<colgroup>
<col width="277" />
<col width="100" />
<col width="100" />
<col width="113" />
<col width="114" />
<col width="49" />
<col width="79" />
<col width="2" />
<col width="100" />
<col width="100" />
</colgroup>
<tbody>
<tr>
<td data-sheets-value="{"1":2,"2":"AS OF: 8/29/16"}">AS OF: 8/29/16</td>
<td colspan="6" data-sheets-value="{"1":2,"2":"DIGITAL CARDS / CODES\n Official Pins or Scans with Text"}" rowspan="1">DIGITAL CARDS / CODES<br />
Official Pins or Scans with Text</td>
<td> </td>
<td colspan="2" data-sheets-value="{"1":2,"2":"PHYSICAL CARDS\n Free shipping on 500+ units"}" rowspan="1">PHYSICAL CARDS<br />
Free shipping on 500+ units</td>
</tr>
<tr>
<td> </td>
<td colspan="2" data-sheets-value="{"1":2,"2":"< 100 Units"}" rowspan="1">< 100 Units</td>
<td colspan="2" data-sheets-value="{"1":2,"2":"100+ Units\n Call/Email for pricing on 1000+ units per item"}" rowspan="1">100+ Units<br />
Call/Email for pricing on 1000+ units per item</td>
<td colspan="2" data-sheets-value="{"1":2,"2":"Format"}" rowspan="1">Format</td>
<td> </td>
<td colspan="2" data-sheets-value="{"1":2,"2":"Call/Email for pricing\n on 1000+ units per item"}" rowspan="1">Call/Email for pricing<br />
on 1000+ units per item</td>
</tr>
<tr>
<td> </td>
<td data-sheets-value="{"1":2,"2":"Unit Cost"}"> </td>
<td data-sheets-value="{"1":2,"2":"% Off MSRP"}"> </td>
<td data-sheets-value="{"1":2,"2":"Unit Cost"}"> </td>
<td data-sheets-value="{"1":2,"2":"% Off MSRP"}"> </td>
<td data-sheets-value="{"1":2,"2":"Pins"}"> </td>
<td data-sheets-value="{"1":2,"2":"Scans + Text"}"> </td>
<td> </td>
<td data-sheets-value="{"1":2,"2":"Unit Cost"}"> </td>
<td data-sheets-value="{"1":2,"2":"% Off MSRP"}"> </td>
</tr>
<tr>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0",1]" data-sheets-value="{"1":3,"3":10}"> </td>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0.00",1]" data-sheets-value="{"1":3,"3":9.15}"> </td>
<td data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="{"1":3,"3":0.085}"> </td>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0.00",1]" data-sheets-value="{"1":3,"3":9.1}"> </td>
<td data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="{"1":3,"3":0.09}"> </td>
<td data-sheets-value="{"1":2,"2":"\u25cf"}"> </td>
<td> </td>
<td> </td>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0.00",1]" data-sheets-value="{"1":3,"3":9.1}"> </td>
<td data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="{"1":3,"3":0.09}"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0",1]"> </td>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0.00",1]"> </td>
<td data-sheets-numberformat="[null,3,"0.00%",1]"> </td>
<td data-sheets-numberformat="[null,4,"\"$\"#,##0.00",1]"> </td>
<td data-sheets-numberformat="[null,3,"0.00%",1]"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
table border applied change border="0"
<table border="0" cellpadding="0" cellspacing="0" dir="ltr">
Step 1: set each <table> to border="0"
<table border="0" cellpadding="0" cellspacing="0" dir="ltr">
Step 2: delete the commented-out td {border: 1px solid #ccc;}
You should now have no borders anywhere, so go back and add only the borders you want with inline styles on either <td>s (best) or <table>s. Eg:
<table border="0" cellpadding="0" cellspacing="0" dir="ltr">
<tr>
<td style="border-top: 1px solid #ffffff;">
content
</td>
</tr>
</table>
This should produce an email with no unintentional borders anywhere. I'm not sure what pasting from Google Sheets is like, but you'll want to edit the HTML in this way to make sure it displays correctly.
I am running the following as a simple html file.Problem is that when i am running it on firefox i get a different view than on chrome i.e extra space at the end of the page in the table in case of chrome because of which i am getting extra pages at the end in print preview,i want that it should look as in case of firefox.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--last modified on Tuesday, June 05, 2001 08:55 AM -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<META NAME="GENERATOR" Content="Visual Page 2.0 for Windows">
<META NAME="Author" Content="NetCorrespondence.com">
<TITLE>Printing Work Order</TITLE>
</HEAD>
<BODY>
<img src="/CFFileServlet/_cf_image/_cfimg5646601472618022292.PNG" alt="" />
<P>
<TABLE BORDER="2" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" HEIGHT="100%">
<TR>
<TD WIDTH="100%" VALIGN="TOP">
<TABLE BORDER="1" WIDTH="100%">
<TR>
<TD WIDTH="50%"><b><font size="+1"> </font></b></TD>
<TD WIDTH="50%">
<P ALIGN="RIGHT"><b>WORKORDER - Pest Control Services</b>
</TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP">
<table>
<tr>
<td><img src="http://209.123.166.68/E7CC71EB-756D-462F-9641B46BA6927E9B/pestlogo.jpg" alt="" width="100" height="125" border="0"></td>
<td>
<FONT SIZE="5">
Preferred Pest Services, Inc D/B/A Pest Pro Services
</FONT>
<BR>
32 Drysdale Street<BR>
Staten Island, NY, 10314<BR>
Tel:718 983-0004<BR>
Fax:718-477-0333 Email:pestprosolutions#gmail.com
<BR>
Sales Representative: Debbie
</td>
</tr>
</table>
</TD>
<TD WIDTH="50%" VALIGN="TOP">
<DIV ALIGN="RIGHT">
<P>
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="95%">
<TR>
<TD><b>Order#:</b></TD>
<TD> 92681</TD>
</TR>
<TR>
<TD><b>JobDate:</b></TD>
<TD> <b>10/07/2011</b></TD>
</TR>
<TR>
<TD><b>Day of Week:</b></TD>
<TD> <b>Friday</b></TD>
</TR>
<TR>
<TD><b>Location:</b></TD>
<TD> Manhattan</TD>
</TR>
<TR>
<TD><b>Start Time:</b></TD>
<TD> 12:00 PM</TD>
</TR>
<TR>
<TD width="50%"><b>CFP:</b></TD>
<TD width="50%"> </TD>
</tr>
<tr>
<TD width="50%"><b>CN:</b></TD>
<TD width="50%"> </TD>
</TR>
<tr>
<TD width="50%"><b>Day Number:</b></TD>
<TD width="50%"> 1/1 </TD>
</TR>
</table>
</DIV>
</TD>
</TR>
<TR>
<TD WIDTH="50%"><b>FOR OFFICE USE ONLY:</b></TD>
<TD WIDTH="50%"> </TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP"><B>CUSTOMER INFORMATION:</B><BR><BR>
Company: Lemle and Wolff<BR>
Christopher Anelante<BR>
Address: 5925 Broadway<BR>
Address: Bronx, NY 10463<BR>
Telephone: 718 884-7676 Fax: 718 884-5300<BR>
Email: <BR>
<TD WIDTH="50%" VALIGN="TOP"><B>Billing Address:</B><BR><BR>
Company: Lemle and Wolff<BR>
Christopher Anelante<BR>
Address: 5925 Broadway<BR>
Address: Bronx, NY 10463<BR>
</TD>
</TR>
<TR>
<TD WIDTH="50%"><b>JOB SITE:</b></TD>
<TD WIDTH="50%"> </TD>
</TR>
<TR>
<TD VALIGN="TOP" COLSPAN="2">
<b>JOB INFORMATION:</b><BR>
2651 Eighth Avenue<br>
New York, NY 10030<br>
Primary Contact: Eriberto Jacques 172*44*29419 Phone: 718 884-7676 Cell: Beeper:<br>
Notes:<BR>
JOB TYPE: Pest Control Services<BR>
<BR>
<BR>
</TD>
</TR>
<TR>
<TD COLSPAN="2"><B>Job Description:</B>
Pest Control Services-First Friday of the month 12:00 PM
</TD>
</TR>
<TR>
<TD VALIGN="TOP" COLSPAN="2"><B>Special Instructions:</B><BR>
Service to all of 10 apartments in building thorough treatment for mice roaches and insects. MUST LIST ALL APARTMENTS IN BUILDING ON LIST. TREAT all common areas and basements and common areas. MUST SEE SUPER FOR ACCESS</TD>
</TR>
<TR>
<TD COLSPAN="2"><b>ORDER TOTALS</b></TD>
</TR>
<TR>
<TD COLSPAN="2">Service Price: $30.00 Parts: $0.00 Subtotal: $30.00 Tax: $2.51 Total: $32.51</TD>
</TR>
<TR>
<TD VALIGN="TOP" COLSPAN="2"><B>Parts:</B><BR>
<table width="90%" border="1" cellspacing="0" cellpadding="0"><tr>
<TR>
<TD WIDTH="49%"><b>ItemID</b></TD>
<TD WIDTH="24%"><b>Description</b></TD>
<TD WIDTH="20%"><b>Qty</b></TD>
<TD WIDTH="20%"><b>Price</b></TD>
<TD WIDTH="20%"><b>Total</b></TD>
</TR>
</TD>
</tr>
</table>
</TR>
<TR>
<TD COLSPAN="2"> </TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP">
<DIV>
<P><FONT SIZE="2">Please sign that job was completed and performed in a <BR>
satisfactory manner.</FONT></P>
<P><FONT SIZE="2">Name:___________________________<BR><br>
Authorized Signature:_____________________________<BR><br>
Title:__________ Date:__________<BR><br>
</FONT>
</DIV>
<P><FONT SIZE="2">Job Completed: [ ]Yes [ ]No </FONT><FONT SIZE="1"></FONT>
</TD>
<TD WIDTH="50%" VALIGN="TOP"><FONT SIZE="2">Persons on the Job<BR><BR>
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="74%">
<TR>
<TD WIDTH="49%"><FONT SIZE="2"><b>Name</b></FONT></TD>
<TD WIDTH="24%"><FONT SIZE="2"><b>Start Time</b></FONT></TD>
<TD WIDTH="20%"><FONT SIZE="2"><b>End Time</b></FONT></TD>
</TR>
<TR>
<TD WIDTH="49%">Carlos Almonte</TD>
<TD WIDTH="24%"> </TD>
<TD WIDTH="20%"> </TD>
</TR>
</TABLE>
<font size="-1"><br>Please use the back of this workorder for comments.</font></FONT></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<!---<p style="page-break-after: always"></p>--->
<table Align="Center" width="85%">
<tr>
<td valign="Top">
<font size="+4"><div align="center"><b><u>WARNING!!</u></b></div></font>
<div align="center"><font size="+3">To all residents of:</font></div><br>
<font size="+3"><div align="center">2651 Eighth Avenue</div></font>
<br>
<div align="center"><font size="+4">Your stairhalls will be cleaned on:</font></div></font>
<br><br>
<font size="+3"><div align="center">Friday Oct-07/2011 12:00PM-06:11PM</div></font>
<br><br>
<font size="+4">
<b>DANGER TO ANYONE ATTEMPTING TO ENTER STAIRWAY !!!!</b>
<BR><BR>
<b>MUST USE CAUTION WHEN USING THESE STAIRCASES FOR THE NEXT 48 HOURS!</b>
</font>
<br><br>
<font size="+3"><p align="right">Thank You for your cooperation,<br>
The Management</p></font>
</td>
</tr>
</table>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--last modified on Tuesday, June 05, 2001 08:49 AM -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<META NAME="GENERATOR" Content="Visual Page 2.0 for Windows">
<META NAME="Author" Content="NetCorrespondence.com">
<TITLE>Confirmation</TITLE>
</HEAD>
<BODY>
<P>
<TABLE BORDER="2" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" HEIGHT="100%">
<TR>
<TD WIDTH="100%" VALIGN="TOP">
<TABLE BORDER="1" WIDTH="100%">
<TR>
<TD WIDTH="50%">
</TD>
<TD WIDTH="50%">
<P ALIGN="RIGHT"><font size="+1"><b>CONFIRMATION OF SERVICES<BR> for Pest Control Services</b></font>
</TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP">
<table>
<tr>
<td align="left" valign="Top">
</td>
<td valign="top">
<FONT SIZE="5">Pest Pro Services</FONT><BR>
32 Drysdale Street<BR>
Staten Island NY 10314<BR>
Tel:718 983-0004<BR>
Fax:718-477-0333
<BR>
</td>
</tr>
<tr>
<td colspan="2">Sales Representative: Debbie</td>
</tr>
</table>
</TD>
<TD WIDTH="50%" VALIGN="TOP">
<DIV ALIGN="RIGHT">
<P>
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="75%">
<TR>
<TD>Order#:</TD>
<TD> 92681</TD>
</TR>
<TR>
<TD>JobDate:</TD>
<TD> 10/07/2011</TD>
</TR>
<TR>
<TD>Location:</TD>
<TD> Manhattan</TD>
</TR>
<TR>
<TD>StartTime:</TD>
<TD> 12:00 PM</TD>
</TR>
</TABLE>
</DIV>
</TD>
</TR>
<TR>
<TD WIDTH="50%"> </TD>
<TD WIDTH="50%"> </TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP">Lemle and Wolff<BR>
Telephone: 718 884-7676 Fax: 718 884-5300<BR>
Billing Address: 5925 Broadway<br>
Address: Bronx, NY 10463<BR>
</TD>
<TD WIDTH="50%"> </TD>
</TR>
<TR>
<TD WIDTH="50%"> </TD>
<TD WIDTH="50%"> </TD>
</TR>
<TR>
<TD VALIGN="TOP" COLSPAN="2">
JOB TYPE: Pest Control Services<BR>
Attention: Eriberto Jacques 172*44*29419<BR>
Job Address: 2651 Eighth Avenue<BR>
Job City: New York
Borough or Town: Manhattan<BR>
<BR>
Site Manager/Super: Eriberto Jacques 172*44*29419 Tel: 718 884-7676
Beeper: Cell: Location
of Site/Mtc: Eriberto Jacques 172*44*29419<BR>
<BR>
</TD>
</TR>
<TR>
<TD WIDTH="50%"> </TD>
<TD WIDTH="50%"> </TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP"><BR>
Dear Customer,<br><br>
Thankyou for choosing us as your building maintenance company. Your building/s will be serviced on:<br>
<br>
<font size="+1"><b>Day:</b> Friday<br>
<b>Date:</b> Oct-072011<br>
<b>Start Time:</b> 12:00 PM<br></font>
<br>
Please post
any notices if applicable.
</TD>
<TD WIDTH="50%" VALIGN="TOP">
<B><FONT SIZE="2">SPECIAL INSTRUCTIONS:</FONT></B>
<br>
Service to all of 10 apartments in building thorough treatment for mice roaches and insects. MUST LIST ALL APARTMENTS IN BUILDING ON LIST. TREAT all common areas and basements and common areas. MUST SEE SUPER FOR ACCESS
<br>
<br>
<br>
<TABLE BORDER="1" CELLSPACING="1" WIDTH="80%">
<TR>
<TD WIDTH="67%"><FONT SIZE="2">Agreed Price:</FONT></TD>
<TD WIDTH="33%" Align="Right"><FONT SIZE="2">$30.00</FONT></TD>
</TR>
<TR>
<TD WIDTH="67%"><FONT SIZE="2">P.O. #:</FONT></TD>
<TD WIDTH="33%"></TD>
</TR>
</TABLE>
<br><br>
<b> All cancellations require at least 24 hours of notice to us
Failure to do so could result in extra charges.</b>
</TD>
</TR>
<TR>
<TD COLSPAN="2">
</TD>
</TR>
<TR>
<TD VALIGN="TOP">
Date Confirmed: <br>
Confirmed By:
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<!---<p style="page-break-after: always"></p>--->
First, make a stylesheet for your print layout:
<link rel="stylesheet" href="/css/print.css" type="text/css" media="print" />
Key there being media="print".
Next, reset the base style so it's cross-browser normalized. Check out YUI3's CSS reset syntax for a quick reference: http://yuilibrary.com/yui/docs/cssreset/
From there, you'll want to omit visual stuff people hate printing out, like logos, graphical navs, etc:
#logo, .nav-tab, .etc {
display:none;
}
Finally, set the page breaks so you don't get unintentional content-splitting across multiple pages:
#some-important-element {
page-break-before: always;
}
Once you set this up, you won't have to worry about cross-browser quirks interfering with your web-print renderings.
i have this html:
<table style="width: 128px;" border="0" cellspacing="0" cellpadding="0">
<colgroup span="1"><col span="2" width="64"></col></colgroup>
<tbody>
<tr height="20">
<td width="64" height="20"> </td>
<td class="xl65" dir="rtl" width="64"><strong></strong></td>
</tr>
<tr height="20">
<td class="xl67" dir="rtl" width="64" height="20"> </td>
<td class="xl66" dir="ltr" width="64">T3500 </td>
</tr>
<tr height="20">
<td class="xl68" width="64" height="20"> </td>
<td> </td>
</tr>
<tr height="20">
<td height="20"> </td>
<td class="xl65" dir="rtl" width="64"><strong></strong></td>
</tr>
<tr height="48">
<td class="xl67" dir="rtl" width="64" height="48"> </td>
<td class="xl66" dir="ltr" width="64">Intel® X58 Chipset </td>
</tr>
<tr height="33">
<td class="xl70" dir="rtl" width="64" height="33"> </td>
<td class="xl69" dir="ltr" width="64">10/100/1000 </td>
</tr>
<tr height="20">
<td class="xl68" width="64" height="20"> </td>
<td> </td>
</tr>
<tr height="20">
<td height="20"> </td>
<td class="xl65" dir="rtl" width="64"><strong></strong></td>
</tr>
<tr height="96">
<td class="xl67" dir="rtl" width="64" height="96"> </td>
<td class="xl66" dir="ltr" width="64">One Intel Xeon W3503(2.4GHz,4.8GT/s,4MB,DC) </td>
</tr>
<tr height="20">
<td class="xl68" width="64" height="20"> </td>
<td> </td>
</tr>
</tbody>
</table>
i want to replace all style, dir, height, width and class with nothing so it will be removed
this is what i have tried for some of them and it worked in an online tester but didn't work in notepad++
( class=\"([^\"]*)\"){0,} (width=\"([^\"]*)\"){0,} (height=\"([^\"]*)\"){0,}
Try
\s*(?:style|dir|height|width|class)\s*=\s*"[^"]*"\s*
Of course this will remove texts like style="hello" wherever they may occur, also outside of tags.
It may be that Notepad++ doesn't support the \s shorthand. Try using
[ ]*(?:style|dir|height|width|class) *= *"[^"]*" *
instead and see if that works. The [ ] at the start can be replaced by a single space.
This should do the trick, at least for your example:
\s*(style|dir|height|width|class)="[^"]+"\s*
how can i get the images and the content to the right to top align?
i tried valign="top" as you can see.
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr valign="top">
<td valign="top"><img alt="" style="border: 0px solid;" src="/Portals/0/affiliates/NFL.png" /></td>
<td valign="top"> </td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">NFL</span><br />
</strong><span class="body_copy" valign="top">The official website for the National Football League. Learn more >></span></td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td valign="top"><img alt="" src="/Portals/0/affiliates/NFL_players_association.png" /></td>
<td> </td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">NFL Players Association</span><br />
</strong><span class="body_copy" valign="top">"We, The National Football League Players Association ... Pay homage to our predecessors for their courage, sacrifice, and vision; ... Pledge to preserve and enhance the democratic involvement of our members; ... Confirm our willingness to do whatever is necessary for the betterment of our membership - To preserve our gains and achieve those goals not yet attained." Learn more >></span></td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td valign="top"><img alt="" src="/Portals/0/affiliates/NFL_play_benfits.png" /></td>
<td><strong> </strong></td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">NFL Player Benefits</span></strong><br />
<span class="body_copy">A Complete guide to the benefits available for NFL players. Learn more >></span></td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td valign="top"><img alt="" src="/Portals/0/affiliates/NFL_hall_fame.png" /></td>
<td> </td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">Pro football Hall of Fame</span></strong><br />
<span class="body_copy">The Mission of the Pro Football Hall of Fame is: To honor, preserve, educate and promote. Learn more >></span><br />
</td>
</tr>
</tbody>
</table>
Some CSS :
table td, table td * {
vertical-align: top;
}
<TABLE COLS="3" border="0" cellspacing="0" cellpadding="0">
<TR style="vertical-align:top">
<TD>
<!-- The log text-box -->
<div style="height:800px; width:240px; border:1px solid #ccc; font:16px/26px Georgia, Garamond, Serif; overflow:auto;">
Log:
</div>
</TD>
<TD>
<!-- The 2nd column -->
</TD>
<TD>
<!-- The 3rd column -->
</TD>
</TR>
</TABLE>