Explained new way to create pdf pages

This commit is contained in:
Mike Beck
2002-06-03 09:26:51 +00:00
parent 458d1e35e2
commit a5c00eaff6

View File

@@ -635,7 +635,6 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`master_field` varchar(64) NOT NULL default '',<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`master_field` varchar(64) NOT NULL default '',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`foreign_table` varchar(64) NOT NULL default '',<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`foreign_table` varchar(64) NOT NULL default '',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`foreign_field` varchar(64) NOT NULL default '',<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`foreign_field` varchar(64) NOT NULL default '',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`pdf_page_number` int(11) NOT NULL default '0',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRIMARY KEY (`master_table`,`master_field`),<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRIMARY KEY (`master_table`,`master_field`),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KEY pdf_page_number (`pdf_page_number`)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KEY pdf_page_number (`pdf_page_number`)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) TYPE=MyISAM COMMENT='Relation table';<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) TYPE=MyISAM COMMENT='Relation table';<br />
@@ -653,12 +652,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
If you created a relation table before release 2.3.0, you can upgrade If you created a relation table before release 2.3.0, you can upgrade
it with those commands, assuming your table name is &quot;PMA_relation&quot;:<br /> it with those commands, assuming your table name is &quot;PMA_relation&quot;:<br />
<tt> <tt>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE src_table master_table VARCHAR(64) NOT NULL<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE src_table master_table VARCHAR(64) NOT NULL;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE src_column master_field VARCHAR(64) NOT NULL<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE src_column master_field VARCHAR(64) NOT NULL;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE dest_table foreign_table VARCHAR(64) NOT NULL<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE dest_table foreign_table VARCHAR(64) NOT NULL;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE dest_column foreign_field VARCHAR(64) NOT NULL<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` CHANGE dest_column foreign_field VARCHAR(64) NOT NULL;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` ADD `pdf_page_number` int(11) NOT NULL;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALTER TABLE `PMA_relation` ADD INDEX(`pdf_page_number`);<br />
</tt><br /> </tt><br />
</dd> </dd>
@@ -712,7 +709,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
table. table.
<br /><br /> <br /><br />
PDF output is supported under PHP4, and you must be using also the PDF output is supported under PHP4, and you must be using also the
'relation' feature. Also, we used the fpdf library which currently 'relation' feature and have a table of PDF Pages (see $cfg['Servers'][$i]['pdf_pages']).
Also, we used the fpdf library which currently
only supports iso-8859 (Latin1) character sets in PDF. only supports iso-8859 (Latin1) character sets in PDF.
<br /><br /> <br /><br />
To use this functionality you have to: To use this functionality you have to:
@@ -734,9 +732,41 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
put the table name in put the table name in
<tt>$cfg['Servers'][$i]['table_coords']</tt> <tt>$cfg['Servers'][$i]['table_coords']</tt>
</li> </li>
</ul><br />
Usage tips: <a class="navigation" href="#faqpdf">PDF output</a>.
<br /><br />
</dd>
<dt>
<b>$cfg['Servers'][$i]['pdf_pages']</b> string
</dt>
<dd>
Since release 2.3.0 you can describe, in a special 'pdf_pages'
table, which pages you want to be able to create as PDF.
<br />
This configuration variable will hold the name of this special
table.
<br /><br />
PDF output is supported under PHP4, and you must be using also the
'relation' feature and have a table of PDF Pages (see $cfg['Servers'][$i]['pdf_pages']).
Also, we used the fpdf library which currently
only supports iso-8859 (Latin1) character sets in PDF.
<br /><br />
To use this functionality you have to:
<ul>
<li> <li>
then manually fill this table with information about the table create in the same database a table (for example
positions on the PDF schema. 'PMA_pdf_pages') following this scheme:<br />
<tt>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE TABLE PMA_pdf_pages (<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page_nr int(10) unsigned NOT NULL auto_increment,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page_descr varchar(50) NOT NULL default '',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PRIMARY KEY (page_nr)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';<br />
</tt>
</li>
<li>
put the table name in
<tt>$cfg['Servers'][$i]['pdf_pages']</tt>
</li> </li>
</ul><br /> </ul><br />
Usage tips: <a class="navigation" href="#faqpdf">PDF output</a>. Usage tips: <a class="navigation" href="#faqpdf">PDF output</a>.
@@ -1856,24 +1886,33 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<p> <p>
<b>How can I produce a PDF schema of my database?</b> <b>How can I produce a PDF schema of my database?</b>
<br /> <br />
First you have to fill the 'relation' and 'table_coords' First you have to fill the 'relation', 'table_coords' and 'pdf_pages'
configuration variables. configuration variables.
<br /><br /> <br /><br />
Then, think about your schema layout: which tables will go on which pages. Then, think about your schema layout: which tables will go on which pages.
You have to fill in the 'relation' table the page number for each <ul>
master-foreign link. <li>Click on your db name in the left frame</li>
<br /><br /> <li>Choose &quot;Structure&quot; in the navigation on top</li>
A table may be displayed on more that one page, depending on how many <li>Choose &quot;Edit PDF Pages&quot; which should be somewhere at the bottom of the page</li>
links it has to other tables. <li>Enter the name for a first pdf page and submit</li>
<br /><br /> <li>Choose this page to edit</li>
Then manually fill the table_coords table with the page number and <li>Now add a table you want to show on this page and it's coordinates and submit<br />
the coordinates, x being the width and y the height, and (0,0) at the upper First you will have to guess this coordinates of course, so just
left corner. expect to have an area of about 297 * 210 and put the tables coordinates somewhere
For example, x=100 and y=200 means that the table will be at 200 mm down in there, you will be able to have a look at what happened and change them later.<br />
and 100 mm right from the upper left corner. For example, x=100 and y=200 means that the table will be at 200 mm down
<br /><br /> and 100 mm right from the upper left corner.</li>
To generate the output, click on your database name, then choose <li>After every table you submitted you will have the possibility to submit more tables</li>
'Structure' and 'Display PDF schema', and enter the page number. <li>When you have entered enough tables Click on your db name in the left frame again</li>
<li>Now, again at the bottom of the page you should be able to choose &quot;Display PDF schema&quot;<br />
For testing it might be useful to show the Grid as well, so you can see the coordinates used<br />
maybe also choose Color and submit.</li>
<li>Save the file he will offer you to something like Schema.pdf (Internet Explorer has some Bug there
which might make it offer it without an extension. Under Windows it is important to have the Extension
.pdf, in under OS you should be fine just saving the file under the name it offers)</li>
in the navigation on top</li>
</ul>
</p> </p>
<a name="faqproject"></a> <a name="faqproject"></a>