Author Topic: Creating a Simple Printing Script... very confused.  (Read 2767 times)

blacksmithkazuma

  • Newbie
  • *
  • Posts: 5
Creating a Simple Printing Script... very confused.
« on: November 12, 2011, 06:48:55 PM »
All I am now trying to do is create the script to print my pages. and possible a print preview. I have no idea how to do any of this and frankly I dont have a clue at all about scripting. How to open a command function anything, so any help would be nice.

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 401
  • Here to help you
Re: Creating a Simple Printing Script... very confused.
« Reply #1 on: November 14, 2011, 11:46:55 AM »
Hello

There is a Printing project to help get you started.

HyperNext has some built-in help  available via the menu bar - Guide - then option Overview
There is a section on Printing in this.

There is also a section on printing in the Language Reference PDF.

There are 2 stages to printing:-
1) The PageSetup commands are used to specify the actual printer, paper size and layout etc.
2) OpenPrinter is then called allowing the users to specify the number of pages, page range etc.


Attached is a screen shot of the printer project that might help you understand the various HyperNext commands.

Malkom

 

« Last Edit: November 14, 2011, 11:48:42 AM by Malkom »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

blacksmithkazuma

  • Newbie
  • *
  • Posts: 5
Re: Creating a Simple Printing Script... very confused.
« Reply #2 on: November 14, 2011, 05:08:37 PM »
I actually tried that, even created a new card identical to the project, copied over all the scripts, nothing. When I went to compile it, I got a error about CallPrinterStats. I even tried deleting those lines and I was able to print but all that came up was a red and blue box with numbers in them. I know I am doing something wrong, or missing something. This is the most important part of this project to be able to print just the Home Card with all the data that was input into. which would be 5 fields of txt and 6 canvases with images input from the user at any time.

The doc is the basic template for the project, the user will drag and drop or load a photo ID, then up to 4 images of material placed upon a scale. The 4 fields to the right will let the user type or select a type of material from another card (6 cards total - Home, 4 Material selection cards, and the printer card) All that needs to be printed is all the data that would be inserted into the Home card.

tigabyte

  • Administrator
  • Newbie
  • *****
  • Posts: 54
Re: Creating a Simple Printing Script... very confused.
« Reply #3 on: November 14, 2011, 07:26:47 PM »
I actually tried that, even created a new card identical to the project, copied over all the scripts, nothing. When I went to compile it, I got a error about CallPrinterStats. I even tried deleting those lines and I was able to print but all that came up was a red and blue box with numbers in them. I know I am doing something wrong, or missing something. This is the most important part of this project to be able to print just the Home Card with all the data that was input into. which would be 5 fields of txt and 6 canvases with images input from the user at any time.

The doc is the basic template for the project, the user will drag and drop or load a photo ID, then up to 4 images of material placed upon a scale. The 4 fields to the right will let the user type or select a type of material from another card (6 cards total - Home, 4 Material selection cards, and the printer card) All that needs to be printed is all the data that would be inserted into the Home card.

The error with Call PrinterStats is probably because the procedure PrinterStats has not been copied across to your new stack.

To find it just open the Editor and along the top look for a button called MainCode.
The MainCode section holds global procedures and variables that can be called from anywhere within the program.

Once you find PrinterStats you will see that it uses some printer functions to interrogate the printer setup and then places the values in some fields.

I hope this helps.

I agree with you that Printing is at the heart of your app and needs to be reliable.