Hello Alexandre,

that works. Thanks. However, I was thinking about a more general solution. Without much success, I admit. The only solution that I see is to add another parameter to blocks in the ini file. This would provide information about, whether the block has a connection to a field or not. I can not see any way to decide this automatically. Do you have any other ideas?

There is another issue, this time on the JavaScript side. Maybe you can give me another hint. If the "rotate version" of the GUI is used, the browser fails to draw the preview rectangle if the map scale is much larger than the desired printing scale. The reason is the size of the rectangle. For example, if the map scale is 1:2.000 and the printing scale is set to 1:500.000, the browser usually hangs. I think the best way would be to restrict the available scales in the pdf form depending on the current map scale. Any idea, how this could be achieved (with and without Ajax)?

Regards,
Dirk


I guess you're right. noteA and noteB should be part of the $optionalInputs field to be handled the same way title and note are.

If you already have extended the exportPdf plugin in your project, I would suggest to override the ClientExportPdf::$optionalInputs property in order to add your new fields to the inital array.
(see ClientExportPdf.php l.80-81)

Dirk Jesko wrote:
Hello,

hmm. I can't get it to work. Below I copied an excerpt from exportPdf.ini and the corresponding part from the template. Now, the initial content defined in the ini file for the blocks "title" and "note" are displayed in the corresponding form fields, but the fields for "noteA" and "noteB" are empty. Further, any text typed into the input fields for "title" or "note" appears on the generated pdf, but the text typed into the fields "pdfNoteA" and "pdfNoteB" is ignored. Instead, the generated blocks for noteA and noteB contain the strings defined in the ini file. If I add {if $pdfNoteA}{/if} resp. {if $pdfNoteB}{/if} around the corresponding parts of the template, the input fields aren't displayed at all.

Although, I did some debugging of the ClientExportPdf class, I could not find out, why the blocks are not handled correctly. My best guess would be the fact that the two additional fields ('noteA' and 'noteB') are not added to the $optionalInputs field. The drawUserForm() function on the other hand only assigns fields that are defined in $optionalInputs to smarty-variables. Maybe, other functions depend on it too.

Regards,
Dirk



_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to