click here for a list of all existing Templot documentation
Important Privacy Information cookie information pre-print options:    

click image to open Templot Club in a new tab
Templot club top logo
looking for Templot? - (free)



 you are not logged in  - Login | Join


receive all messages by email: info


Recent Topics
Front Page  Search  Image Gallery  Gallery Upload  My Account  Members  Open Source  TemplotMEC  Help  
make a donation  
please click: important information for new members and first-time visitors Templot Companion - User Guide
            messages archive on Yahoo
page trail:  Templot Club > Forums > OpenTemplot Project > Help Window Printing Issue
Templot web site

                                       Help Window Printing Issue
     
 Start new topic   Reply blank   Printer friendly 
  Rate this topic  
AuthorMessage
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
1st message | this message only posted: 8 Aug 2018 04:02
 PM  Reply with quote  Reply blank 
from:
Frank Sergent
Tennessee USA

 

view images in gallery
view images as slides
Hi All,
I have cloned the OpenTemplot project from SourceForge and have built it and I'm currently trying to debug a help screen print crash. So I can print templates with OpenTemplot just fine (which is more than I can currently do with Templot2 because it can't find a printer and I have several).  If I run OpenTemplot from the Lazarus IDE and then I do "background - shapes", then "help - background shapes help", then press the "print" button on the resulting help screen, then the Windows print dialog comes up as expected (even if it is hidden under the help window, grrrr) and ask me for a printer. I like the default printer so I press OK. Then I get a nice window that says Project OpenTemplot raised exception class 'External SIGSEGV' at address 10003BA45. I'm guessing that's a segment fault due to trying to copy a string into an uninitialized variable.

I've attached a screen shot of the program at a breakpoint getting ready to crash as soon as I hit run again. You can see the file in question and the line number as well as the watch window showing that PrnDev.Device looks valid. Device is declares as a PWideChar. If this were C, I would say the problem is obvious and Device should be declared as a char array instead of a pointer to a char. But its not C and I'm not certain StrCopy parameters are dest then src like the C strcpy or if its the other way around and that's the real problem.

Any ideas?

Frank



__________
message ref: 25377

 
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
2nd message | this message only posted: 8 Aug 2018 18:51
 PM  Reply with quote  Reply blank 
from:
Martin Wynne
West Of The Severn, United Kingdom



view images in gallery
view images as slides

Please do not send requests for help direct to me via email or PM.

Post your questions on the forum where everyone can see them and add helpful replies.
Hi Frank,

Welcome to Templot Club and thanks for the introduction. :)

I'm concerned that you are having problems printing from Templot2. I haven't had any similar reports.

Please note that if you want to use a printer for the track templates from Templot, it must be switched on and available to the system before you start Templot. That's because on start-up Templot creates its own list of available printers, so that it has somewhere to put the calibration data.

Thanks also for getting into OpenTemplot.

The latest full versions of the OT files are in the attached .zip file at:

 http://85a.co.uk/forum/view_topic.php?id=3292&forum_id=26

I don't think Adrian has yet got round to putting them on Sourceforge.

Note that the printing problem you are having is not in Templot itself, it is in the HtmlViewer component from:

 https://github.com/BerndGabriel/HtmlViewer

Templot2 uses the original Delphi version of that component from David Baldwin, but it won't compile in Lazarus. Mainly because it makes much use of Windows Metafiles (as does Templot2 for the sketchboard) which are not cross-platform and therefore not supported on Lazarus.

There is an updated version of the component from Bernd Gabriel for Lazarus on the above link, but I have noticed that it still contains some problems. It also needs some of my mods to work as intended with Templot. I have included the files and the mods in the OpenTemplot files in the above-mentioned .zip, so that it is no longer strictly necessary to install the package in order to compile OpenTemplot. However, it is still necessary to do so if you want to edit any of the the form files containing the HtmlViewer.

All of which is a round-about way of saying that to resolve the problem it needs to be taken up with Bernd Gabriel on the above link. There is not much we can do here in Templot, unless someone wants to set about working on the vwPrint.pas file. Without TMetafile I'm not too sure how to proceed.

I did mention this at:

 http://85a.co.uk/forum/view_topic.php?id=3288&forum_id=25

at item 3. - more work needed - text printing, metafiles.

Very old versions of Templot did not use the internal printing functions in HtmlViewer and instead sent the original help string to the printer, i.e. the string before conversion to HTML. We may need to go back to that for OT., although the printed results are inferior.

cheers,

Martin.

__________
message ref: 25383

 
This is topic ID = 3316     Page created at 17:32 (local time)  
You can type a quick reply to this topic here.

Click in the box to begin.


But to reply to an individual message, or to include images, attachments and formatted text, use the reply buttons on each message above.

To start a new topic in this forum, click the Start new topic button below.
To start a new topic in a different forum, click the Forum Jump drop-down list below.

             Start new topic 

 click to jump to a different forum:     Back to top of page

Templot Club > Forums > OpenTemplot Project > Help Window Printing Issue
about Templot Club

list recently active topics Templot Companion - User Guide - A-Z Index Templot Explained for beginners Please click: important information for new members and first-time visitors.
indexing link for search engines

back to top of page


Please read this important note about copyright: Unless stated otherwise, all the files submitted to this web site are copyright and the property of the respective contributor. You are welcome to use them for your own personal non-commercial purposes, and in your messages on this web site. If you want to publish any of this material elsewhere or use it commercially, you must first obtain the owner's permission to do so.

The small print: All material submitted to this web site is the responsibility of the respective contributor. By submitting material to this web site you acknowledge that you accept full responsibility for the material submitted. The owner of this web site is not responsible for any content displayed here other than his own contributions. The owner of this web site may edit, modify or remove any content at any time without giving notice or reason.
Problems with this web site? Contact webmaster@templot.com.   This web site uses cookies: click for information.  
© 2018  

Powered by UltraBB - © 2009 Data 1 Systems