Beruflich Dokumente
Kultur Dokumente
w w w .hamw eather.com
Table of Contents
Overview Overview Revisions License Installation Requirements Installation Usage Trouble Shooting General Usage Template Commands Advanced Usage PDF Templates PDF Template Syntax PDF Template Variables Configuration HW3 PDF INI 3 3 4 5 12 12 13 16 16 17 18 65 65 66 68 69 69
2
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Overview
HWpdf Plugin Overview
For years HAMweather has empowered thousands of websites by allowing the seamless integration of timely weather information into users existing web portals. Now HAMweather is proud to announce HWpdf! HWpdf is an exciting new plug-in that will allow HW3php to create PDF documents. With the HWpdf plug-in, you can:
Offer superior quality weather related PDF documents. Offer forecasts for display in hotel lobbies, community bulletin boards, newsletters, ev flyers, ent work areas, and more! Modify and create completely customized weather related PDF documents v templates. ia Have the ability to create weather related PDFs via HAMweather 3 with out special and/or costly server requirements.
Below are links to sample PDFs created with the HWpdf plug-in:
Forecast with the standard HW3 icon set: Atlanta, GA Forecast with a custom icon set: Atlanta, GA
The HWpdf plugin is currently offered for download via the HW3Plugins area. If you have questions, suggestions or notice issues with the HWpdf plugin, please visit the HWpdf forum at the HAMweather Support Forums.
This document can be found at the following locations: Online HTML: http://www.hamweather.com/hw3/docs/hw3php/plugins/hw3pdf/ PDF: http://www.hamweather.com/hw3/docs/hw3php/plugins/hw3pdf/hw3pdf.pdf
3
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Revisions
HW3pdf Release Changes
Latest Document Revision: 9/26/2008 12:18:26 AM
Release 1.0
Initial Release
4
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
License
HAMweather Software Suite License Agreement
NOTE: This copy of the HAMweather Software Suite License Agreement was current at the time of this publication. Check for the latest version of the HAMweather Software Suite License Agreement online at http://www.hamweather.com/hw3/hw3_license.shtml. Definitions The "SOFTWARE PRODUCT" is all files included with the HAMweather distribution archive as well as all files produced as a result of the installation scripts. The "SOFTWARE PRODUCT" also includes the HAMweather name and logo included with the HAMweather package. The provisions of this License Agreement applying to the "SOFTWARE PRODUCT" also apply to all derivative works of the "SOFTWARE PRODUCT." The actual Forecasts used and output by HAMweather are Public domain and cannot be copyrighted. The "LICENSEE" is the individual who downloads or receives the SOFTWARE PRODUCT unless the individual designates another to be the "LICENSEE" prior to initiating installing HAMweather. "HAMweather, LLC" is HAMweather, LLC, Woodstock, Georgia, which is the sole owner of the copyright and all other rights in and to the SOFTWARE PRODUCT. "LICENSE FEES" are monies paid from the LICENSEE to HAMweather, LLC for the right to invoke this License Agreement for a specific implementation of the SOFTWARE PRODUCT. "PLUG-INS" are applications modules created by HAMweather, LLC or third parties that allow you to extend the capabilities of the SOFTWARE PRODUCT with out the need of modifying or making additions to the SOFTWARE PRODUCT itself. PLUG-INS not created by HAMweather, LLC are not considered part of the SOFTWARE PRODUCT and may have a license for their own usage. PLUG-INS created by HAMweather, LLC are considered to be part of the SOFTWARE PRODUCT and may have additional and separate LICENSE FEES and restrictions. "DATABASES" includes but is not limited to all supporting data files and data structures that are made available through the HAMweather, LLC to the LICENSEE. DATABASES are considered part of the SOFTWARE PRODUCT. "DISTINCT IMPLEMENTATION" is each separate install of the HAMweather 3 Software Suite and/or separate domains that use a single HAMweather software Suite installation, you must purchase a license. "SINGLE DOMAIN" is defined as either a single top level domain (TLD) or any single 3rd level subdomain of a TLD. For example. www.mydomain.com, www.mydomain.net, mysite.mydomain.com and yoursite.mydomain.com are examples of four single domains. "THIRD PARTY APPLICATION" are applications written or offered by third parties that may or may not use output from the SOFTWARE PRODUCT. Application of License By downloading or receiving the SOFTWARE PRODUCT, or by installing the SOFTWARE PRODUCT onto any machine, or by using the SOFTWARE PRODUCT or any portion of the SOFTWARE PRODUCT in any way, the LICENSEE agrees to be bound by the terms of this License Agreement.
5
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
The LICENSEE is responsible for ensuring that the terms of the License Agreement are upheld and the LICENSEE is responsible for any violations of the License Agreement whether or not the LICENSEE authorized the infringements of the License Agreement. National Weather Service Disclaimer HAMweather uses information obtained from the National Weather Service and the National Oceanic Atmospheric Administration (NOAA). The National Weather Service (NWS) and NOAA require a disclaimer as seen below. The disclaimer in full can be viewed at http://weather.noaa.gov/disclaimer.html
About the information on this U.S. Government server This server provides current documented information about meteorological and hydrological data generated by the NWS or received from other official sources. It is for use by the national and international meteorological and hydrological community. This server has access to a selection of current weather observations, forecasts, warnings, graphical charts, and satellite images which are available from official government sources. This server is however not an official source for these products. Use of Data and Products The information on government servers are in the public domain, unless specifically annotated otherwise, and may be used freely by the public. This information shall not be modified in content and then presented as official government material. As required by 17 U.S.C. 403, third parties producing works consisting predominantly of the material appearing in NWS Web pages must provide notice with such subsequently produced work(s) identifying such incorporated material and stating that such material is not subject to copyright protection.
Environmental Disclaimer/Copyright HAMweather uses information obtained from the Environmental Canada for producing the Canadian forecasts (Current conditions for Canada come from the National Weather Service though). The Environmental Canada disclaimer/copyright in full can be viewed at http://www.ec.gc.ca/copy_e.html Permitted Uses Provided that any required LICENSE FEES have been paid, this License Agreement allows the LICENSEE to download the SOFTWARE PRODUCT for the purpose of installing the SOFTWARE PRODUCT on the LICENSEE'S SINGLE DOMAIN or for the purpose of examining the source code of the SOFTWARE PRODUCT to evaluate its future use on the LICENSEE'S SINGLE DOMAIN. The LICENSEE may install the SOFTWARE PRODUCT one or more times onto a WWW server. The LICENSEE may also retain one copy of the distribution of the SOFTWARE PRODUCT for archival purposes provided that this archive is not redistributed in any way. The LICENSEE must display the phrase "Powered by HAMweather" and a link to hamweather.com in all output from the SOFTWARE PRODUCT, on all SINGLE DOMAIN's that use the output from the SOFTWARE PRODUCT and all THIRD PARTY APPLICATIONS that use the output from the SOFTWARE PRODUCT, unless required LICENSE FEES have been paid. The following provide examples of usage and the required licenses:
6
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Using the output from the SOFTWARE PRODUCT on a SINGLE DOMAIN requires a single license, unless the required phrase and link to hamweather.com are displayed on the SINGLE DOMAIN. Using the output from the SOFTWARE PRODUCT on multiple SINGLE DOMAINS requires a license for each SINGLE DOMAIN that does not display the required phrase and link to hamweather.com. Using the output from the SOFTWARE PRODUCT to offer data feeds via, but not limited too, XML, RSS, JavaScript, Macromedia Flash or other THIRD PARTY APPLICATION requires a license for each SINGLE DOMAIN or THIRD PARTY APPLICATION installation that uses the data feed or an ENTERPRISE LICENSE obtained by the LICENSEE. Using the output from the SOFTWARE PRODUCT in THIRD PARTY APPLICATIONS, such as but not limited too, desk top applications, requires the LICENSEE display the required phrase and link to hamweather.com in the THIRD PARTY APPLICATION whenever output from the SOFTWARE PRODUCT is used or displayed, unless the LICENSEE has obtained an ENTERPRISE LICENSE. Using the output from the SOFTWARE PRODUCT to offer data feeds for print medias including, but not limited too, news papers and magazines requires a PRINT MEDIA LICENSE to be obtained by the LICENSEE.
Prohibited Uses The LICENSEE agrees not to do any of the following unless previously authorized in writing by HAMweather, LLC, as doing the following would violate this License Agreement and be grounds for the termination of this License Agreement and possible legal action as described in this License Agreement.
Making available for download or otherwise copying or redistributing the SOFTWARE PRODUCT Selling, renting, or leasing the SOFTWARE PRODUCT to any individual or organization Including on any distribution medium (such as a CD-ROM or bundled within a software package) the SOFTWARE PRODUCT Installing the SOFTWARE PRODUCT on more than one WWW server or implementing the SOFTWARE PRODUCT more than one time on a WWW server, without a sufficient number of Licenses to do so Using any portion of the SOFTWARE PRODUCT in any other application or redistributing the SOFTWARE PRODUCT under the same or another name. PLUG-INS may use portions of the SOFTWARE PRODUCT but the PLUG-IN distribution may not redistribute any portion of the SOFTWARE PRODUCT under the same name or another name. Making output of the SOFTWARE PRODUCT available in print m edias including, but not limited too, news papers and magazines, without obtaining an PRINT MEDIA LICENSE.
7
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Copyright notices included within the PHP scripts and source files of the SOFTWARE PRODUCT may never be modified, appended, or removed without the prior expressed written consent of HAMweather, LLC, regardless of whether the LICENSEE has paid any LICENSE FEES for the implementation of the SOFTWARE PRODUCT. The LICENSEE is not permitted to modify, append, or remove any copyright notices or program credits appearing within the visual interface of the SOFTWARE PRODUCT. This includes, but is not limited to, copyright notices on documentation pages and the "Program Credits" page. Removing links to such copyright notices and program credits is similarly prohibited. HAMweather, LLC reserves the right to publish conditions under which copyright notices or program credits can be removed from the visual interface and to specify the extent of the removal of the same. The following items are not considered to be copyright notices or program credits and may be removed or modified at the discretion of the LICENSEE: the HAMweather logo. The following items are considered to be copyright notices or program credits and may only be removed or modified if required LICENSE FEES have been paid: The "Powered By HAMweather" message and associated HTML link to HAMweather in all output from the SOFTWARE PRODUCT and on each SINGLE DOMAIN that uses the output from the SOFTWARE PRODUCT. Modifications or Additions HAMweather, LLC strongly discourages the use or creation of any modifications or additions to the SOFTWARE PRODUCT. Any modifications or additions to the SOFTWARE PRODUCT are subject to the following provisions: 1. The LICENSEE may modify in any way desired the SOFTWARE PRODUCT for the LICENSEE'S own use, except that copyright headers and credits cannot be removed except as otherwise provided in this License Agreement. 2. Any modifications containing portions of the SOFTWARE PRODUCT or causing any portion of the SOFTWARE PRODUCT to be executed, evaluated, or otherwise used in any way, are considered derivative works of the SOFTWARE PRODUCT. Hence, these modifications are subject to all terms of this License Agreement, and consequently cannot be redistributed or sold. Thus, no person, organization, or entity shall distribute any modification or addition to the SOFTWARE PRODUCT that uses any portion of the SOFTWARE PRODUCT in any way. 3. By making any modification or by otherwise installing any third-party modifications to the SOFTWARE PRODUCT, the LICENSEE voids the limited warranty and any obligation of support on behalf of HAMweather, LLC, whether express or implied. HAMweather, LLC specifically disclaims all warranties, express or implied, if any portion of the SOFTWARE PRODUCT has been modified except as documented in the SOFTWARE PRODUCTS accompanying documentation. 4. HAMweather, LLC makes no guarantee that the underlying code or data structure will be maintained in future upgrades to the SOFTWARE PRODUCT. The LICENSEE agrees that HAMweather, LLC retains the absolute right to modify future versions of the SOFTWARE PRODUCT as HAMweather, LLC sees fit, whether or not such modifications are compatible with any modifications made by the LICENSEE. HAMweather, LLC retains this right in all circumstances, even if the LICENSEE has the right under arrangements with HAMweather, LLC to download and install future upgrades of the SOFTWARE PRODUCT. HAMweather, LLC is under no obligation whatsoever to modify the SOFTWARE PRODUCT or to instruct the LICENSEE or anyone else how to modify the SOFTWARE PRODUCT. 5. HAMweather, LLC encourages that any modifications or additions made that enhance the
8
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
SOFTWARE PRODUCT be submitted to HAMweather, LLC for possible inclusion in a future version of the SOFTWARE PRODUCT. Limited Warranty Provided that LICENSE FEES have been paid by the LICENSEE, HAMweather, LLC warrants that the SOFTWARE PRODUCT will perform according to its documentation for a period of 30 days commencing upon payment of such LICENSE FEES. Should HAMweather, LLC breach the limited warranty agreement, HAMweather, LLC will, at its discretion, repair, replace, or provide instructions for repair of the SOFTWARE PRODUCT, or return any LICENSE FEES to the LICENSEE. In this sense, HAMweather, LLC offers 30 days of free technical support to the LICENSEE for the sole purpose of causing the SOFTWARE PRODUCT to perform according to its documentation. In no case shall the liability of HAMweather, LLC exceed the LICENSE FEES paid by the LICENSEE. This limited warranty is not offered if LICENSE FEES have not been paid by the LICENSEE. This is the only warranty of any kind guaranteed by HAMweather, LLC. Except for this limited warranty, the SOFTWARE PRODUCT is provided on an "as is" basis, and the LICENSEE accepts the SOFTWARE PRODUCT "with all faults." Should the SOFTWARE PRODUCT prove defective, the LICENSEE and not HAMweather, LLC assumes the entire cost of service and repair. In addition, the security mechanisms implemented in SOFTWARE PRODUCT have inherent limitations, and HAMweather, LLC does not warrant that the SOFTWARE PRODUCT will withstand all attacks. To the maximum extent permitted by applicable law, HAMweather, LLC disclaims all other warranties, either express or implied. Particularly, HAMweather, LLC makes no warranty of title, no warranty against infringement, no warranty of merchantability, and no warranty of fitness for a particular purpose. This warranty gives you specific legal rights, and you may have other legal rights that vary by jurisdiction. The SOFTWARE PRODUCT is not fault-tolerant and is not designed for use in high-risk activities in any environment where the SOFTWARE PRODUCT could lead to injury or death. HAMweather, LLC specifically disclaims any warranties, express implied, of fitness for high-risk activities. In no event shall HAMweather, LLC be liable for any damages in excess of LICENSE FEES paid (including without limitation, special, direct, incidental, consequential, or indirect damages for personal injury, loss of business profits, business interruption, loss of information, loss of data, and any other pecuniary loss) arising from the installation or any use of this SOFTWARE PRODUCT or any installation or use of PLUG-INS not created by HAMweather, LLC. The LICENSEE voids this limited warranty by performing any of the following actions: 1. Modifying any part of the SOFTWARE PRODUCT except as documented in the documentation that accompanies the SOFTWARE PRODUCT. This includes, but is not limited to, the PHP scripts, the message files that are produced by or installed with the program, the templates that accompany the program, and any configuration files generated by the program or required for installation. Should any other person or any automatic process (including but not limited to web site publishing software or third-party scripts which directly or indirectly access or write any of the files constituting part of the SOFTWARE PRODUCT) perform such modifications, the LICENSEE is deemed to have performed such modifications and thus the limited warranty is void. 2. Breaching any portion of this License Agreement. 3. Failing to promptly register the implementation of the SOFTWARE PRODUCT with HAMweather, LLC following its implementation the LICENSEE'S site.
9
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
4. Deleting or moving (intentionally or inadvertently) any file provided with, created by, or used by the SOFTWARE PRODUCT. 5. Failing to meet the system requirements for the LICENSEE'S server as stated on the HAMweather download page for the version of the SOFTWARE PRODUCT that the LICENSEE is attempting to install. 6. Failing to pay required LICENSE FEES in a timely manner for the LICENSEE'S implementation of the SOFTWARE PRODUCT, in which case the LICENSEE not only voids the limited warranty, but also breaches this License Agreement and is also subject to other provisions of this License Agreement. Site Content The LICENSEE alone, not HAMweather, LLC, bears the entire responsibility for the content of any internet site, even if the LICENSEE is using the SOFTWARE PRODUCT as part of that internet site. In no way shall HAMweather, LLC be liable or responsible for the content of any LICENSEE'S site, including but not limited to any data created by users of the SOFTWARE PRODUCT. Title and Copyright The SOFTWARE PRODUCT remains the property of HAMweather, LLC. The SOFTWARE PRODUCT is licensed, not sold. By paying LICENSE FEES, the LICENSEE is granted the right to use the SOFTWARE PRODUCT as described in this License Agreement, but the LICENSEE does not assume any rights of ownership or other rights in and to the SOFTWARE PRODUCT. The SOFTWARE PRODUCT is copyright 1997-2001 by HAMweather, LLC, all rights reserved, HAMweather, LLC having obtained the copyright from HAMnet Consulting whose name remain on older versions of the SOFTWARE PRODUCT. The LICENSEE of this SOFTWARE PRODUCT gains the right to use the copyrighted software but does not gain ownership of the copyright or of the SOFTWARE PRODUCT. Consequences of License Violations Should the LICENSEE use unlicensed copies of the SOFTWARE PRODUCT without the expressed written consent of HAMweather, LLC, the LICENSEE is in violation of this License Agreement. If the LICENSEE was using any portions of the SOFTWARE PRODUCT which ordinarily require the payment of LICENSE FEES, the LICENSEE agrees to pay to HAMweather, LLC the LICENSE FEES necessary to license the unlicensed implementation according to the schedule of LICENSE FEES available at the time from the HAMweather, LLC web site. Additionally, HAMweather, LLC may require that the LICENSEE immediately and entirely remove any implementation of the SOFTWARE PRODUCT that is in breach of this License Agreement. In addition, the LICENSEE shall be liable for the payment to HAMweather, LLC of attorney's fees, court costs, punitive damages, and any other legal remedy appropriate for the situation. Should the LICENSEE distribute, sell, or otherwise make available any portion of the SOFTWARE PRODUCT or any modification which is determined to be the SOFTWARE PRODUCT according to any other sections of this License Agreement, the LICENSEE shall be liable for the payment to HAMweather, LLC of the equivalent cost of LICENSE FEES for the SOFTWARE PRODUCT or for all monies collected by the LICENSEE in violation of this License Agreement, whichever is more. In addition, the LICENSEE shall be liable for the payment to HAMweather, LLC of attorney's fees, court costs, punitive damages, and any other legal remedy appropriate for the situation. Termination HAMweather, LLC may, at any time, terminate the License Agreement if HAMweather, LLC
10
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
determines that the License Agreement has been breached. If the termination of License Agreement occurs as a result of a violation by the LICENSEE or another person, the LICENSEE must immediately remove all files from his or her implementation of the SOFTWARE PRODUCT and all links to the same. In no case shall HAMweather, LLC be responsible for paying to the LICENSEE or anyone else any amount of money, even if the termination of the license diminishes or eliminates revenue raised by the implementation of the SOFTWARE PRODUCT. In no case shall HAMweather, LLC be responsible for refunding any LICENSE FEES, regardless of the reason for termination of this License Agreement, except as provided in the limited warranty section of this License Agreement. Transfer of License The LICENSEE is not permitted to transfer this License to any other individual or institution without the expressed written consent of HAMweather, LLC. Without prior written consent of HAMweather, LLC, the LICENSEE may not act as a reseller who sells or otherwise distributes Licenses for the SOFTWARE PRODUCT. Under this License, HAMweather, LLC reserves the right to develop a separate agreement applying to such reselling activities, and such an agreement, if entered into by HAMweather, LLC and the LICENSEE, would supersede this License Agreement as defined in the separate agreement. Jurisdiction This License Agreement is governed by the laws of the State of Georgia located in the United States of America. Both the LICENSEE and HAMweather, LLC submit to the jurisdiction of the courts of the State of Georgia. Both the LICENSEE and HAMweather, LLC agree to commence any litigation that may arise hereunder in the courts located in the Judicial District of Fulton County in the State of Georgia.
11
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Installation
Requirements
HW3pdf Requirements
The following are the requirements for using HW3image:
You must have HW3php 3.9.8.6 or newer installed and working correctly.
12
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Installation
HW3pdf Installation
Before you can install HW3pdf you must make sure that your server passes the HW3 requirements. Once you have verified that your server passes these requirements, follow the steps below to install HW3pdf: NOTE: HW3pdf PHP requires HW3php 3.9.8.6 or newer be installed Installation : STEP 1 : Uncompressing the package. The first step is to download the "zip" distribution of HW3pdf from the HAMweather Download Site and decompress the software package. You can use Winzip or something similar. Installation : STEP 2 : Uploading the Files The Installation requires the uploading of files to your server, specifically to the CGI side of the HW3 installation. You will need to upload the following files to your current HW3 installation: 1. Upload the "HW3PDF" directory and files with-in to the hamlib/HW directory of the HAMweather 3 installation in ASCII mode.. NOTE: Make sure the directory and file name casing match the names in the distribution exactly. The following should be installed in the paths indicated after you upload the "HW3PDF" directory: hamlib/HW/HW3PDF/* 2. Upload the "fpdf" directory and files with-in to the hamlib directory of the HAMweather 3 installation. NOTE: Make sure the directory and file name casing match the names in the distribution exactly. The following should be installed in the paths indicated after you upload the "fpdf" directory: hamlib/fpdf/* 3. Upload the files with-in the distribution's "configs" directory to the "configs" directory of the HAMweather 3 installation. NOTE: You are not replacing your current "configs" directory but simply uploading the config files to the "config" directory on the server. The following should be installed in the paths indicated after you upload the in the distributions "configs" directory: configs/hw3pdf.ini.php 4. Upload the files with-in the distribution's "cgi-bin/templates" directory to the "templates" directory of the HAMweather 3 installation. NOTE: You are not replacing your current "templates" directory but simply uploading the template files to the "templates" directory on the server.
13
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
NOTE: Your FTP program may not auto recognize ".hwpdf" files as text files and may try to upload in binary mode. You should force your FTP program to upload these files in ASCII mode as uploading in binary mode will cause errors on UNIX/LINUX servers. The following should be installed in the paths indicated after you upload the in the distributions "templates" directory: templates/* 5. Upload the directory "html/images/hw3pdf_icons" (and files with-in), to the HW3 "images" directory (the one which contains the above "blankmaps" directory of the HAMweather 3 installation. NOTE: The "hw3pdf_icons" directory contains images and should be uploaded in BINARY mode. The "hw3pdf_icons" directory contains a new set of default HW3 images that have a reduced color palette for use with HW3pdf. Installation : STEP 3 : Create HW3pdf Cache Directory You need to make a cache directory where your HW3pdfs will be stored. By default this directory should be with in your main HW3 "images" directory on the HTML side of your web site. So in the main HW3 "images" directory, create a subdirectory called "hw3pdf". Thus giving you a directory that looks like the following: images/hw3pdf You will also need to give this directory write permissions by the web server. UNIX/LINUX Users: On a *nix account you can do this by setting the permissions, either via your FTP client or from the telnet/SSH command line, to: chmod 777 Windows Users: Windows servers may not need to set the permission, but if you experience an error then you will need to give the directory write permissions for the web server (usually a user name similar to IUSR_GUEST or such) in both Windows Explorer and IIS. NOTE: You may need to have your network/web server administrator set the permissions for you. Installation : STEP 4 : Testing Installation Your installation of HW3pdf should be complete. Now it should be ready to test. To test your installation browse to it with the following URL, but changing the "http://www.yourdomain.com/weather/hw3.php" to the URL to Hw3.php on your server. If all works correctly you should see the forecast for Atlanta, Georgia in a generated PDF document: PDF Test 1:
http://www.yourdomain.com/hw3.php?forecast=zandh&config=hw3pdf&alt=sample1&zipcode=3 0301
PDF Test 2:
http://www.yourdomain.com/hw3.php?forecast=zandh&config=hw3pdf&alt=sample2&zipcod e=30301
If the above URLs worked correctly for you then you should proceed to the General Usage
14
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
documentation. Otherwise, review the Trouble Shooting Documentation or visit the online support forums at http://support.hamweather.com/
15
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Usage
Trouble Shooting
Trouble Shooting HW3pdf Installation
If you followed the Five easy steps to installation and are having troubles This page may be able to help you solve your problem. Trouble Shooting : Server Errors These errors normally indicate trouble with the HW3 installation itself, thus if they occur you may need to refer to the HW3 Documentation. If you get a 500 Error (Internal Server Error), then HW3 itself is having an error most likely. Make sure that your HW3 installation is working correctly. If so then verify that you uploaded the HW3pdf files in ASCII mode and not binary. If you get a 404 Error (File Not Found), then the URL that you entered does not correspond to the location of the hw3.php script. You should double check the URL including spelling and capitalization of the URL. If you see the source code of the script and not an information page, then either the extension that you gave the script is incorrect, or you did not put the script in a directory with appropriate Php permissions.
16
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
General Usage
HW3pdf General Usage
Default Images/Templates HW3pdf works by creating PDF documents which can be viewed in a web browser, or saved for viewing later. To create the PDF document, HW3pdf uses templates that instruct HW3pdf how to create and save the document. HW3pdf comes with several standard templates for creating some standard PDF documents such as current conditions and zone forecasts. Using these standard templates you can start using HW3pdf immediately with out the need to modify/create HW3pdf templates. The templates included with HW3pdf are: Template Name sample1.hwpdf sample2.hwpdf To have HW3pdf create a PDF document using one of these templates you make a call to the hw3.php as you normally would, but you would add two additional parameters. To create a 24 Hour Quickcast, Extended and Detailed Forecast for Atlanta, Georgia, you could use a url similar to:
http://www.yourdomain.com/weather/hw3.php?forecast=zandh&config=hw3pdf&alt=sample1&zipcode=30301
To create an alternate 24 Hour Quickcast, Extended and Detailed Forecast for Atlanta, Georgia, you could use a url similar to:
http://www.yourdomain.com/weather/hw3.php?forecast=zandh&config=hw3pdf&alt=sample2&zipcode=30301
You can also use any standard arguments to any HW3 forecast. For example, instead of using zipcode, use place and state:
http://www.weatherlive.net/wx3/hw3.php?forecast=zandh&config=hw3pdf&alt=sample2&place=atlanta&state=ga
17
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Template Commands
HW3 PDF Template Commands
HW3pdf is based on the open source FPDF (http://www.fpdf.org), User scripts ( http://www.fpdf.org/en/script/index.php and custom HAMweather, LLC additions. ) Click on the PDF Template command name to view description of command. AddFont AddLink AddPage AliasNbPages Cell Close END * Error Footer FPDF GOTO * Header Image * ImageWMF ImageEPS * KILLPDF * LABEL * Line LINETO * LINEBREAK * LinearGradient * Link Ln MirrorH * MirrorV * MirrorP * MirrorL * MOVETO * MultiCell NEWPDF * Output OUTPUTPDF * PageNo Polygon * PutLink * RadialGradient * Rect RoundedRect * Rotate * Scale * ScaleX * ScaleY * ScaleXY * SetAuthor SetAutoPageBreak SetCellMargin * SetCharSpacing * SetCompression SetCreator SetDisplayMode SetDrawColor SetFillColor SetFont SetFontSize SetKeywords SetLeftMargin SetLineWidth SetLink SetMargins SetRightMargin SetSubject SetTextColor SetTextMode * SetTitle SetTopMargin SetX SetXY SetY Skew * SkewX * SkewY * StartTransform * StopTransform * SWITCH2PDF * Text TEXTAT * TextWithDirection * TextWithRotation * Translate * TranslateX * TranslateY * Write WriteHTML *
* addition to FPDF
AddFont
AddFont family [style] Description Imports a True Type or Type1 font and makes it available. It is necessary to generate a font definition file first with the makefont.php utility. The definition file (and the font file itself when embedding) must be present in the font directory. If it is not found, the error "Could not include font definition file" is generated.
18
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Parameters family Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font. style Font style. Possible values are (case insensitive):
The default value is regular. file The font definition file. By default, the name is built from the family and style, in lower case with no space. Examples AddFont "Comic" "I" ADDFONT "ArialBlack"
AddLink
AddLink Description Creates a new internal link and returns its identifier. An internal link is a Clickable area which directs to another place within the document. The identifier can then be passed to Cell, Write, Image or Link. The destination is defined with SetLink. See also Cell, Write, Image, Link, SetLink. Back to top
19
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
AddPage
AddPage orientation Description Adds a new page to the document. If a page is already present, the Footer method is called first to output the footer. Then the page is added, the current position set to the top-left corner according to the left and top margins, and Header is called to display the header. The font which was set before calling is automatically restored. There is no need to call SetFont again if you want to continue with the same font. The same is true for colors and line width. The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards. Parameters orientation Page orientation. Possible values are (case insensitive):
P or Portrait L or Landscape
The default value is the one passed to the constructor. See also FPDF, Header, Footer, SetMargins. Back to top
AliasNbPages
AliasNbPages [alias] Description Defines an alias for the total number of pages. It will be substituted as the document is closed. Parameters alias The alias. Default value: {nb}. Example Cell 0 10 "Page "PageNo() "/{nb}" 0 0 "C" See also PageNo, Footer. Back to top
20
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Cell
Cell w [h [txt [border [ln [align [fill [link]]]]]]]) Description Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text. If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. Parameters w Cell width. If 0, the cell extends up to the right margin. h Cell height. Default value: 0. txt String to print. Default value: empty string. border Indicates if borders must be drawn around the cell. The value can be either a number:
0: no border 1: frame
or a string containing some or all of the following characters (in any order):
Default value: 0. ln Indicates where the current position should go after the call. Possible values are:
21
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Putting 1 is equivalent to putting 0 and calling Ln just after. Default value: 0. align Allows to center or align the text. Possible values are:
fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. link URL or identifier returned by AddLink. Examples Move to 8 cm to the right Cell 80 Centered text in a framed 20*10 mm cell and line break Cell 20 10 "Title" 1 1 "C" See also SetFont, SetDrawColor, SetFillColor, SetTextColor, SetLineWidth, AddLink, Ln, MultiCell, Write, SetAutoPageBreak, SetCellMargin. Back to top
Close
Close Description Terminates the PDF document. It is not necessary to call this method explicitly because Output does it automatically. If the document contains no page, AddPage is called to prevent from getting an invalid document. See also Output. Back to top
Error
Error msg
22
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Description This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid. Parameters msg The error message. Back to top
Footer
Footer Description This method is used to render the page footer. It is automatically called by AddPage and Close and should not be called directly by the application. The implementation in FPDF is empty, so you have to subclass it and override the method if you want a specific processing. See also Header. Back to top
FPDF
FPDF [orientation [unit [format]]] Description This is the class constructor. It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes). Parameters orientation Default page orientation. Possible values are (case insensitive):
P or Portrait L or Landscape
pt: point
23
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. Default value is mm. format The format used for pages. It can be either one of the following values (case insensitive):
A3 A4 A5 Letter Legal
or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit). Back to top
Header
Header Description This method is used to render the page header. It is automatically called by AddPage and should not be called directly by the application. The implementation in FPDF is empty, so you have to subclass it and override the method if you want a specific processing. See also Footer. Back to top
Image
Image file x y [w [h [type]]] Image URL x y [w [h [type]]] Description Puts an image in the page. The upper-left corner must be given. The dimensions can be specified in different ways:
24
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
explicit width and height (expressed in user unit) one explicit dimension, the other being calculated automatically in order to keep the original proportions no explicit dimension, in which case the image is put at 72 dpi
Supported formats are JPEG and PNG. For JPEG, all flavors are allowed:
gray scales on at most 8 bits (256 levels) indexed colors true colors (24 bits)
If a transparent color is defined, it will be taken into account (but will be only interpreted by Acrobat 4 and above). The format can be specified explicitly or inferred from the file extension. It is possible to put a link on the image. Remark: if an image is used several times, only one copy will be embedded in the file. Parameters file Name of the file containing the image. URL URL location containing the image. x Abscissa of the upper-left corner. y Ordinate of the upper-left corner. w
25
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Width of the image in the page. If not specified or equal to zero, it is automatically calculated. h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. type Image format. Possible values are (case insensitive): JPG, JPEG, PNG. If not specified, the type is inferred from the file extension. Examples
IMAGE "%%hwvIconsPath%%/%%day_icon%%hwcounter%%%%" 206 {%%hwvY%%+3.35 + 65*%%hwcounter%%}
Line
Line x1 y1 x2 y2 Description Draws a line between two points. Parameters x1 Abscissa of first point. y1 Ordinate of first point. x2 Abscissa of second point. y2 Ordinate of second point. See also SetLineWidth, SetDrawColor. Back to top
Link
Link x y w h link
26
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Description Puts a link on a rectangular area of the page. Text or image links are generally put via Cell, Write or Image, but this method can be useful for instance to define a Clickable area inside an image. Parameters x Abscissa of the upper-left corner of the rectangle. y Ordinate of the upper-left corner of the rectangle. w Width of the rectangle. h Height of the rectangle. link URL or identifier returned by AddLink. See also AddLink, Cell, Write, Image. Back to top
Ln
Ln [h] Description Performs a line break. The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter. Parameters h The height of the break. By default, the value equals the height of the last printed cell. See also Cell. Back to top
27
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
MultiCell
MultiCell w h txt [border [align [fill]]] Description This method allows printing text with line breaks. They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other. Text can be aligned, centered or justified. The cell block can be framed and the background painted. For HW usage you can use ~~ and it will be converted to a line feed in the output Parameters w Width of cells. If 0, they extend up to the right margin of the page. h Height of cells. txt String to print. border Indicates if borders must be drawn around the cell block. The value can be either a number:
0: no border 1: frame
or a string containing some or all of the following characters (in any order):
Default value: 0. align Sets the text alignment. Possible values are:
28
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. See also SetFont, SetDrawColor, SetFillColor, SetTextColor, SetLineWidth, Cell, Write, SetAutoPageBreak, SetCellMargin. Back to top
Output
Output [name [dest]] Description Send the document to a given destination: string, local file or browser. In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) m be forced. ay The method first calls Close if necessary to terminate the document. Parameters name The name of the file. If not given, the document will be sent to the browser (destination I) with the name doc.pdf. dest Destination where to send the document. It can take one of the following values:
I: send the file inline to the browser. The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF. D: send to the browser and force a file download with the name given by name. F: save to a local file with the name given by name. S: return the document as a string. name is ignored.
If the parameter is not specified but a name is given, destination is F. If no parameter is specified at all, destination is I. Note: for compatibility with previous versions, a boolean value is also accepted (false for F and true for D). See also Close. Back to top
29
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
PageNo
PageNo Description Returns the current page number. See also AliasNbPages. Back to top
Rect
Rect x y w h [style] Description Outputs a rectangle. It can be drawn (border only), filled (with no border) or both. Parameters x Abscissa of upper-left corner. y Ordinate of upper-left corner. w Width. h Height. style Style of rendering. Possible values are:
See also
D or empty string: draw. This is the default value. F: fill DF or FD: draw and fill
30
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
SetAuthor
SetAuthor author Description Defines the author of the document. Parameters author The name of the author. See also SetCreator, SetKeywords, SetSubject, SetTitle. Back to top
SetAutoPageBreak
SetAutoPageBreak auto [margin] Description Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm. Parameters auto Boolean indicating if mode should be on or off. margin Distance from the bottom of the page. See also Cell, MultiCell. Back to top
SetCompression
SetCompression compress Description Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default. Note: the Zlib extension is required for this feature. If not present, compression will be
31
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
turned off. Parameters compress Boolean indicating if compression must be enabled. (1) compression or (0) no compression Back to top
SetCreator
SetCreator creator Description Defines the creator of the document. This is typically the name of the application that generates the PDF. Parameters creator The name of the creator. See also SetAuthor, SetKeywords, SetSubject, SetTitle. Back to top
SetDisplayMode
SetDisplayMode zoom [layout] Description Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a specific zooming factor or use viewer default (configured in the Preferences menu of Acrobat). The page layout can be specified too: single at once, continuous display, two columns or viewer default. By default, documents use the full width mode with continuous display. Parameters zoom The zoom to use. It can be one of the following string values:
fullpage: displays the entire page on screen fullwidth: uses maximum width of window real: uses real size (equivalent to 100% zoom)
32
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
or a number indicating the zooming factor to use. layout The page layout. Possible values are:
single: displays one page at once continuous: displays pages continuously two: displays two pages on two columns default: uses viewer default mode
SetDrawColor
SetDrawColor color Description Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be expressed in Hexadecimal notation, or by using a color defined in the color list. The method can be called before the first page is created and the value is retained from page to page. Parameters color Color denoted in Hexadecimal (ie. #FFFFFF), color defined in the color list (ie. white) See also SetFillColor, SetTextColor, Line, Rect, Cell, MultiCell. Back to top
SetFillColor
SetFillColor color Description Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in Hexadecimal notation, or by using a color defined in the color list. The method can be called before the first page is created and the value is retained from page to page. Parameters color
33
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Color denoted in Hexadecimal (ie. #FFFFFF), color defined in the color list (ie. white) Example: SetFillColor #FFFFFF See also SetDrawColor, SetTextColor, Rect, Cell, MultiCell. Back to top
SetFont
SetFont family [style [size]] Description Sets the font used to print character strings. It is mandatory to call this method at least once before printing text or the resulting document would not be valid. The font can be either a standard one or a font added via the AddFont m ethod. Standard fonts use Windows encoding cp1252 (Western Europe). The method can be called before the first page is created and the font is retained from page to page. If you just wish to change the current font size, it is simpler to call SetFontSize. Parameters family Family font. It can be either a name defined by AddFont or one of the standard families (case insensitive):
Courier (fixed-width) Helvetica or Arial (synonymous; sans serif) Times (serif) Symbol (symbolic) ZapfDingbats (symbolic)
It is also possible to pass an empty string. In that case, the current family is retained. style Font style. Possible values are (case insensitive):
34
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
U: underline
or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats. size Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12. Example SETFONT "Helvetica" "B" 20 See also AddFont, SetFontSize, Cell, MultiCell, Write. Back to top
SetFontSize
SetFontSize size Description Defines the size of the current font. Parameters size The size (in points). See also SetFont. Back to top
SetKeywords
SetKeywords keywords Description Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. Parameters keywords The list of keywords. See also SetAuthor, SetCreator, SetSubject, SetTitle.
35
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Back to top
SetLeftMargin
SetLeftMargin margin Description Defines the left margin. The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin. Parameters margin The margin. See also SetTopMargin, SetRightMargin, SetAutoPageBreak, SetMargins. Back to top
SetLineWidth
SetLineWidth width Description Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page. Parameters width The width. See also Line, Rect, Cell, MultiCell. Back to top
SetLink
SetLink link [y [page]] Description Defines the page and position a link points to. Parameters link The link identifier returned by AddLink.
36
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
y Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page). page Number of target page; -1 indicates the current page. This is the default value. See also AddLink. Back to top
SetMargins
SetMargins left top [right] Description Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change them. Parameters left Left margin. top Top margin. right Right margin. Default value is the left one. See also SetLeftMargin, SetTopMargin, SetRightMargin, SetAutoPageBreak. Back to top
SetRightMargin
SetRightMargin margin Description Defines the right margin. The method can be called before creating the first page. Parameters margin The margin.
37
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
SetSubject
SetSubject subject Description Defines the subject of the document. Parameters subject The subject. See also SetAuthor, SetCreator, SetKeywords, SetTitle. Back to top
SetTextColor
SetTextColor color Description Defines the color used for text. It can be expressed in Hexadecimal notation, or by using a color defined in the color list. The method can be called before the first page is created and the value is retained from page to page. Parameters color Color denoted in Hexadecimal (ie. #FFFFFF), color defined in the color list (ie. white) Example: SetTextColor #FFFFFF See also SetDrawColor, SetFillColor, Text, Cell, MultiCell, SetTextMode. Back to top
SetTitle
SetTitle title
38
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Description Defines the title of the document. Parameters title The title. See also SetAuthor, SetCreator, SetKeywords, SetSubject. Back to top
SetTopMargin
SetTopMargin margin Description Defines the top margin. The method can be called before creating the first page. Parameters margin The margin. See also SetLeftMargin, SetRightMargin, SetAutoPageBreak, SetMargins. Back to top
SetX
SetX x Description Defines the abscissa of the current position. If the passed value is negative, it is relative to the right of the page. Parameters x The value of the abscissa. See also GetX, GetY, SetY, SetXY. Back to top
39
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
SetXY
SetXY x y Description Defines the abscissa and ordinate of the current position. If the passed values are negative, they are relative respectively to the right and bottom of the page. Parameters x The value of the abscissa. y The value of the ordinate. See also SetX, SetY. Back to top
SetY
SetY y Description Moves the current abscissa back to the left margin and sets the ordinate. If the passed value is negative, it is relative to the bottom of the page. Parameters y The value of the ordinate. See also GetX, GetY, SetX, SetXY. Back to top
Text
Text x y txt Description Prints a character string. The origin is on the left of the first character, on the baseline. This method allows to place a string precisely on the page, but it is usually easier to use Cell, MultiCell or Write which are the standard methods to print text.
40
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Parameters x Abscissa of the origin. y Ordinate of the origin. txt String to print. See also SetFont, SetTextColor, Cell, MultiCell, Write, TextAt, SetTextMode, TextWithDirection, TextWithRotation. Back to top
Write
Write h txt [link] Description This method prints text from the current position. When the right margin is reached (or the \n character is met) a line break occurs and text continues from the left margin. Upon method exit, the current position is left just at the end of the text. It is possible to put a link on the text. Parameters h Line height. txt String to print. link URL or identifier returned by AddLink. Example <!-- Begin with regular font --> SetFont "Arial" "" 14 Write 5 "Visit " <!-- Then put a blue underlined link --> SetTextColor 0 0 255 SetFont "" "U" Write 5 "www.hamweather.com" "http://www.hamweather.com" See also SetFont, SetTextColor, Cell, MultiCell, TextAt, Text, SetTextMode, TextWithDirection,
41
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
TextWithDirection
TextWithDirection x y text direction Description Prints a character string in any of four directions. The origin is on the left of the first character, on the baseline. This method allows to place a string precisely on the page, in any direction. Parameters x Abscissa of the origin. y Ordinate of the origin. text String to print. direction Print direction. Possible values are:
See also
SetFont, SetTextColor, Cell, MultiCell, Write, TextAt, Text, SetTextMode, TextWithRotation. Back to top
TextWithRotation
TextWithRotation x y text text_angle font_angle xscale yscale Description Prints a character string at any angle, with any font angle. The origin is on the left of the first character, on the baseline. This method allows to place a string precisely on the page at any angle. The text is also completely scalable on the x and y axis. You can use this to do som e neat effects.
42
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Parameters x Abscissa of the origin. y Ordinate of the origin. text String to print. text_angle Text angle. font_angle Font angle. xscale X scale yscale Y scale See also SetFont, SetTextColor, Cell, MultiCell, Write, TextAt, Text, TextWithDirection, SetTextMode. Back to top
ImageWMF
ImageWMF file x y [width] [height] [link] Description import a Windows Meta File (WMF) file into the pdf.. width & height are optional if not set uses default from image.. if link is set make the WMF Clickable to the given url Parameters file WMF filename to import x Abscissa of the origin. y Ordinate of the origin. width
43
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
set width of image height set height of image link URL path to where the link will be transferred when image is clicked width & height are optional, if not set uses default from image Back to top
ImageEPS
ImageEPS file x y [width] [height] [link] [useBoundingBox] Description import an Encapsulated PostScript (EPS) file into the pdf.. width & height are optional if not set uses default from image.. if link is set make the EPS Clickable to the given url Parameters file EPS filename to import x Abscissa of the origin. y Ordinate of the origin. width set width of image height set height of image link URL path to where the link will be transferred when image is clicked setBoundsBox Use a box outline around the imported EPS image width & height are optional, if not set uses default from image Back to top
LinearGradient
LinearGradient x y width height startColor endColor GradientDirection
44
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Description Draws a rectangular region using Linear Gradient shading Parameters x Abscissa of the origin. y Ordinate of the origin. width width of the gradient area height height of the gradient area startColor Beginning color in the gradient, denoted in Hexadecim (ie. #FFFFFF), or color al defined in the color list (ie. white) endColor Ending color in the gradient, denoted in Hexadecim (ie. #000000), color defined in al the color list (ie. black) GradientDirection Gradient direction. Possible values are:
Back to top
RadialGradient
RadialGradient x y width height startColor endColor pattern Description Draws a rectangular region using Radial Gradient shading Parameters x
45
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Abscissa of the origin. y Ordinate of the origin. width width of the gradient area height height of the gradient area startColor Beginning color in the gradient, denoted in Hexadecim (ie. #FFFFFF), color defined al in the color list (ie. white) endColor Ending color in the gradient, denoted in Hexadecimal (ie. #000000), color defined in the color list (ie. black) pattern Binary code of the pattern you want to draw. Uses a 5 bit binary representation, with the first 4 bits determining the preset pattern, and bit 5 is always 1. If pattern is left blank, then the pattern is drawn starting with startColor at the center of the polygon, with gradient coloring to the endColor at the edges of the polygon. Each pattern is a quadrant of a complete image, and has complementary patterns used to complete the image. When the exclusive OR (XOR) of bits 2 and 4 and 1 are used (giving the opposite value), this gives the left and right quadrants of the whole image, and the XOR of the bits 1 through 4 and 1111 give the top and bottom opposing quadrants of the image. For instance, take a look at the second example below: RadialGradient 117 116 10 10 white black 10101 The top left quadrant of the image is 1010. RadialGradient 117 126 10 10 white black 11111 XOR of bits 2 and 4 and 1, the top right quadrant of the image is 1111. RadialGradient 127 116 10 10 white black 00001 The bottom left quadrant is 0000 (XOR of 1111 and 1111) RadialGradient 127 126 10 10 white black 01011 and the bottom right quadrant is 0101 (XOR of 1010 and 1111). (Remember, bit 5 is always 1.) Examples: RadialGradient 17 116 20 20 white black Draws
46
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
10 10 10 10
10 10 10 10
Back to top
WriteHTML
WriteHTML html Description will output html Parameters html Any basic html code Examples: WriteHTML "<font color='#000000' size='9' face='Helvetica'><b>High: </b></font><font color='#CC0000' size='12' face='Helvetica'><b>%%dec0_day_hi%%hwcounter%%%%F</b></font><font size='9' color='#CC0000' face='Helvetica' > (%%dec0_celcius_day_hi%%hwcounter%%%%C)</font>"
Back to top
47
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
PutLink
PutLink URL text Description adds a link with the text at the current x,y location Parameters URL URL path to where the link will be transferred when selected text text displayed for the referring link Back to top
Polygon
Polygon x1 y1 x2 y2 x3 y3 . Style Description Outputs a polygon. It can be drawn (border only), filled (with no border) or both. Parameters x1 Initial x position of polygon y1 Initial y position of polygon x2 2nd x position of polygon y2 2nd y position of polygon xn nth x position of polygon yn nth y position of polygon Style Style of rendering. Possible values are:
48
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
See also
NEWPDF
NEWPDF name [orientation [unit [width [height]]]] Description This is the class constructor. It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes). Parameters name PDF workspace name used to distinguish between different PDF documents referred to in the template. orientation Default page orientation. Possible values are (case insensitive):
P or Portrait L or Landscape
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. Default value is mm. width The width of the page by unit
49
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
KILLPDF
KILLPDF [name] Description Delete a PDF workspace from memory. If name is provided it will delete the specific PDF workspace from memory. If name is not provided, the current PDF workspace that is being worked on will be deleted. Parameters name PDF workspace name used to distinguish between different PDF documents referred to in the template. Back to top
OUTPUTPDF
OUTPUTPDF [name] [filename] [method] Description Outputs PDF to a file or cache. Parameters name HW3pdf workspace that will be saved in PDF document. If name is not used, the currently active PDF workspace will be output. filename Name of output PDF file, or "CACHE" or "C" to save to the cache. method Destination where to send the document. It can take one of the following values:
I: send the file inline to the browser. The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF. D: send to the browser and force a file download with the name given by filename. F: save to a local file with the name given by filename.
50
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
If the parameter is not specified but a name is given, destination is F. If no parameter is specified at all, destination is I. Back to top
TEXTAT
TEXTAT x y text Description Will add text to the current pdf workspace. The TEXT commands adds text, with the font used specified by a previous SETFONT and SETFONTSIZE commands. The text will also use any angle or skew previously set by the TextWithDirection or TextWithRotation Commands. The origin is on the left of the first character, on the baseline. This method allows to place a string precisely on the page. Parameters x Abscissa of the origin. y Ordinate of the origin. text String to print. Example TEXTAT 20 25 "Sample Text" See also SetFont, SetTextColor, Cell, MultiCell, Write, Text, SetTextMode, TextWithDirection, TextWithRotation. Back to top
LINEBREAK
LINEBREAK Description force a line break Back to top
LABEL
51
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
LABEL name Description The LABEL command provides a marker that is used in conjunction with the GOTO command. When HW3pdf hits a previous "GOTO nam e", it will stop parsing HW3pdf commands until it finds the corresponding "LABEL nam at which time HW3pdf will begin parsing commands e" again. Parameters name Label name, used in conjunction with the GOTO command Note that label names are case sensitive and if the label has a space (" ") in the name then the label must be surrounded with quotation marks. Examples: LABEL notavailable LABEL "Do Currents" See also GOTO. Back to top
GOTO
GOTO name Description jumps to the label specified by name. This is useful if some data is not avail and you want to skip over it or such. The GOTO command makes HW3pdf stop processing HW3pdf commands until it finds the corresponding "LABEL name", or hits the end of template. Parameters name Label name, used in conjunction with the LABEL command Note that GOTO is only forward looking. That means that you can only GOTO labels that follow the GOTO command, you cannot go to labels that occurred prior to the GOTO command. The reason for this limitation is simply to lower resource usage on the web server. Note that label names are case sensitive and if the label has a space (" ") in the name then the label must be surrounded with quotation marks. Examples: GOTO notavailable GOTO "Do Currents"
52
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
END
END Description Allows you to prematurely end the processing.. Useful if you have multiple sections that you are doing conditionally, Back to top
RoundedRect
RoundedRect x y w h r [style] Description Outputs a rectangle with rounded corner angles. It can be drawn (border only), filled (with no border) or both. Parameters x Abscissa of upper-left corner. y Ordinate of upper-left corner. w Width. h Height. r Radius of rounded angle. style Style of rendering. Possible values are:
D or empty string: draw. This is the default value. F: fill DF or FD: draw and fill
53
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
SetTextMode
SetTextMode [style] Description Sets how to draw the text. Parameters style Style of rendering. Possible values are:
See also
D draw outline. F: fill in text DF or FD: draw outline and fill. This is the default value.
SetFont, SetTextColor, Cell, MultiCell, Write, TextAt, Text, TextWithDirection, TextWithRotation. Back to top
SetCharSpacing
SetCharSpacing [spacing] Description Sets the spacing between consecutive characters. Parameters spacing Spacing between consecutive characters. Possible values are:
See also
SetFont, SetTextColor, Cell, MultiCell, Write, TextAt, Text, TextWithDirection, TextWithRotation. Back to top
54
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
SetCellMargin
SetCellMargin [margin] Description Sets the margins around a cell. Parameters margin Margin around the cell block. See also Cell, MultiCell. Back to top
MOVETO
MOVETO x y Description Move the pen to new position (x, y) on the page Parameters x abscissa of the scaling center. Default is current x position y ordinate of the scaling center. Default is current y position See also LineTo Back to top
LINETO
LINETO x y Description Line from the current x y position of the pen to the new position (x, y) on the page, often used with a MOVETO command first Parameters x abscissa of the scaling center. Default is current x position
55
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
y ordinate of the scaling center. Default is current y position See also MoveTo Back to top
ScaleX
ScaleX s_x [x [y]] Description Scale on point (x, y) in x-direction by percent (s_x). Parameters s_x scaling factor for width as percent. 0 is not allowed. x abscissa of the scaling center. Default is current x position y ordinate of the scaling center. Default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
ScaleY
ScaleY s_y [x [y]] Description Scale on point (x, y) in y-direction by percent (s_y). Parameters s_y scaling factor for height as percent. 0 is not allowed. x abscissa of the scaling center. Default is current x position y
56
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
ordinate of the scaling center. Default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
Scale
Scale s_x s_y [x [y]] Description Scale on point (x, y) in x-direction by percent (s_x) and in y-direction by percent (s_y). Parameters s_x scaling factor for width as percent. 0 is not allowed. s_y scaling factor for height as percent. 0 is not allowed. x abscissa of the scaling center. Default is current x position y ordinate of the scaling center. Default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
ScaleXY
ScaleXY s [x [y]] Description Scale on point (x, y) in x-direction and y-direction by percent (s). Parameters s scaling factor for width and height as percent. 0 is not allowed. x abscissa of the scaling center. Default is current x position
57
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
y ordinate of the scaling center. Default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
MirrorH
MirrorH [x] Description Alias for scaling -100% in x-direction Parameters x abscissa of the axis of reflection See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
MirrorV
MirrorV [y] Description Alias for scaling -100% in y-direction Parameters y ordinate of the axis of reflection See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
MirrorP
MirrorP [x [y]]
58
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Description Point reflection on point (x, y). (alias for scaling -100 in x- and y-direction) Parameters x abscissa of the point. Default is current x position y ordinate of the point. Default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
MirrorL
MirrorL [angle [x [y]]] Description Reflection against a straight line through point (x, y) with the gradient angle (angle). Parameters angle gradient angle of the straight line. Default is 0 (horizontal line). x abscissa of the point. Default is current x position y ordinate of the point. Default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
TranslateX
TranslateX t_x
59
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Description Translate (move) in x-direction (t_x) from the current position. Parameters t_x movement to the right See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
TranslateY
TranslateY t_y Description Translate (move) in y-direction (t_y) from the current position. Parameters t_y movement to the bottom See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
Translate
Translate t_x t_y Description Translate (move) in x-direction (t_x) and y-direction (t_y) from the current position. Parameters
60
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
t_x movement to the right t_y movement to the bottom See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
Rotate
ROTATE angle [x [y]] Description Rotate on point (x, y) in degrees (angle). Parameters angle angle in degrees between -360 (rotate to the left) and 360 (rotate to the right) x abscissa of the skewing center. default is current x position y ordinate of the skewing center. default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
SkewX
SkewX angle_x [x [y]] Description Skew on point (x, y) in degrees in x-direction (angle_x). Parameters
61
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right) x abscissa of the skewing center. default is current x position y ordinate of the skewing center. default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
SkewY
SkewY angle_y [x [y]] Description Skew on point (x, y) in degrees in y-direction (angle_y). Parameters angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) x abscissa of the skewing center. default is current x position y ordinate of the skewing center. default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
Skew
Skew angle_x, angle_y [x [y]] Description Skew on point (x, y) in degrees in x-direction (angle_x) and y-direction (angle_y) Parameters
62
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right) angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) x abscissa of the skewing center. default is current x position y ordinate of the skewing center. default is current y position See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
StartTransform
StartTransform Description Use this before calling any tranformation. Parameters none See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation. Back to top
StopTransform
StopTransform Description Restores the normal painting and placing behavior as it was before calling StartTransform (). Parameters none See also ScaleX, ScaleY, Scale, ScaleXY, MirrorH, MirrorV, MirrorP, MirrorL, TranslateX, TranslateY, Translate, Rotate, SkewX, SkewY, Skew, StartTransformation, StopTransformation.
63
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Back to top
SWITCH2PDF
SWITCH2PDF name Description Will change the active PDF workspace to the one specified by the name parameter. Future PDF commands will act upon the PDF workspace specified. Parameters name PDF workspace name used to distinguish between different PDF documents referred to in the template. Back to top
64
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Advanced Usage
PDF Templates
HW3pdf Templates
There are two main types of plug-ins that HAMweather 3 can uses: weather parsing plug-ins and template parser plug-ins. The former adds the ability for HW3 to process various weather information (and other data). The latter adds new capabilities to the parsing of templates outputted by HW3. HW3pdf is a template parser plug-in. Specifically, it adds an additional command set for use in templates. This additional command set allows HW3 to create, load, manipulate and save PDF documents. Thus with HW3 and HW3pdf combines, you can create new templates that create and output a PDF document only or you can create templates that output both PDF to a web browser while creating PDF documents at the same time.
65
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Coordinates must be specified as integers. Template variables that are replaced by integer numbers are allowed. They are relative to the upper left corner of the picture
66
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Negative coordinates are allowed, but points with negative coordinates will never be drawn.
The model is the color model used; the following color models are supported at the moment: RGB Hexadecimal Representation Syntax: PDFCOMMAND arg The arg should be a valid six (6) digit hexadecimal number between 000000 and FFFFFF and specify the red, green and blue (RGB) component of the color.
67
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Variable Name
%%GETXY%% %%GETX%% %%GETY%%
Description
Returns the current x y location. Returns the current x. Returns the current y
%%GETSTRINGWIDTH:xxxxxx Returns the estimated width of the given string. Not exact. %% %%GETSTRINGHTMLWIDTH:xx Returns the estimated width of the given string. Not exact. xxxx%%
68
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
Configuration
HW3 PDF INI
The default hw3pdf.ini.php file: <?php /* [Parse Plugins] HWpdf=HW::HW3PDF::HWPDFParser|parse_line|1|1|0 [Defaults] template_ext=hwpdf default_ttf=Arial [Paths] hw3pdf_cache=%%INI:Paths:html_side%%/images/hw3pdf hw3pdf_cache_url=%%INI:Paths:html_side_url%%/images/hw3pdf hw3pdf_fcicons=%%INI:Paths:html_side%%/images/hw3pdf_icons/55x55_wxicons hw3pdf_temp=%%INI:Paths:hw3pdf_cache_url%% # the following is the file path to the directory where the True Type Fonts are stored ttf_path= [CleanCacheDirs] # Remove the leading ";" if you want to have the hw3pdf folder # cleaned once per day ;clean_cache=%%INI:CleanCacheDirs:clean_cache%%,%%INI:Paths:hw3pdf_cache%%
*/ ?>
[Parse Plugins] HWpdf= HW::HW3PDF::HWPDFParser|parse_line|1|1|0 [Defaults] template_ext - the default pdf template extension default_ttf - the default True Type Font file
[Paths]
69
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :
w w w .hamw eather.com
hw3pdf_cache - the pdf cache system path hw3pdf_cache_url - the pdf cache URL path hw3pdf_fcicons - the path to the weather icons hw3pdf_temp - temporary pdf cache directory ttf_path - the following is the file path to the directory where the True Type Fonts are stored [CleanCacheDirs] clean_cache= - the path to the cache directory to be cleaned
70
125 TownPark Dr. Suite 300, Kennesaw, GA 30144 | P: 404.806.6432 | F: 678.302.4404 | E support@hamweather.com :