Changes

Web Page View Field

159 bytes removed, 20:55, 22 August 2018
Tips
==Tips==
 
<u>'''Getting one document right and then duplicating that document'''</u>
The simplest way to create a lot of different document [[Template|templates]] fast is to create a single template, get it right in every respect and then create new documents from that [[Template|template]]. Adding , adding in the '''static text''' and '''variables''' that you need. The following set of tips are useful in getting the document right.
<u>'''Using an Editor'''</u>
If you want to create a more elaborate document , then you should use an HTML editor to prepare the document, insert the variable names and then copy and paste the HTML code into the HTML template field.
<u>'''Controlling Margins and Header/Footer when Printing'''</u>
If you don’t set any margins when printing a web page document, then the margins in your [[Browser|browser]] will define the margins used to print the document. Generally this will lead to unsatisfactory results.
You should always control the margins both within the '''Web Page View''' [[Template|template]] and within the [[Browser|browser]] to get the most accurate printed version.
 
* Set the [[User|user’s]] browser margins to the minimum value, usually 0 for all margins (top, bottom, left and right).
* Remove the default header and footer from the [[Browser|browser]].
<u>'''Setting the Margins in the Web Page View field'''</u>
The following code is used to control the margins in the document. There are two methods of setting the document margins – you can set margins within the body tab of the HTML OR define styles in the head portion of the HTML.
<head> <style> body{margin-top:10px;margin-left:10px;margin-right:10px;} </style> </head>
The above settings will work in both Firefox and Internet Explorer.
All measurements for these types of settings are using pixels.
Pixels should not be confused with points. A pixel represents a single dot on a monitor; a point is a unit of measure equal to 1/72 of an inch. The following link provides a comparison between points and pixels:
'''http://www.sibagraphics.com/font.php'''
This tip is very important if you are enabling editing within the completed '''Web Page View''' document.
HTML supports a Line tag - < br > and a Paragraph tag set < p > </ p >. 
* When you hit the '''Enter''' key a new paragraph is generated using the [[SmartSimple]] HTML Editor to edit the Web Page Document.
* When you use the '''SHIFT + Enter''' key combination a new line is generated.
Paragraphs are set to have extra line spacing called paragraph margins and when you press the '''Enter''' key the lines can be spaced too far apart because they are really paragraphs.
You can solve his this issue by using '''SHIFT + Enter''' but if your [[User|users]] find this too difficult to remember then , you can set the paragraph margin within the '''Web Page View''' document with the following code:
[[Image:Wpv6.png]]
If you need to create a document in landscape layout you will need to add the following special tag to the document template:
'''<pd4ml:page.break pageFormat="rotate">'''
You can position this tag at any location within the [[Template|template]] to change the orientation so the document could begin in portrait layout and then switch to landscape.
This tag is specific to the [[SmartSimple]] PDF writer and can only be used when you provide the '''Save As PDF''' option to the document.
<u>'''Automatic conversion from Web Page View to PDF - .pdfwrite() function'''</u>
If you want to automatically convert Wew Web Page View to PDF without clicking 'Export as PDF' button , use the following code at the very bottom of you Web Page View source code.
<pre> ... <script language="javascript">// <![CDATA[
parent.pdfwrite();
</script>  </body]]> </htmlscript>
</pre>
Smartstaff, administrator
421
edits