Printing in 1C Enterprise 8.2. Using Print Options Settings

How to add a stamp, signature and logo to the printed form of an invoice for payment to the buyer (for 1C: Accounting 8.3, edition 3.0)

2018-07-27T09:42:51+00:00

Organizations often ask to embed a logo and a seal with a signature directly into the invoice for payment to the buyer. This makes the account look more solid and representative. Facsimile printing on an invoice is not prohibited by regulations and therefore many people take advantage of this opportunity.

Today I will tell you how to make a similar setup for 1C: Accounting 8.3 (edition 3.0) yourself, without the help of a programmer.

We customize the seal, signature and logo

So, go to the “Main” section and select the “Organizations” item:

Open the card of our organization and expand the “Logo and seal” item:

Immediately after this we will be asked to indicate the picture that we want to use as our logo. You need to prepare a file with such a picture in advance (order it from the designer) or find something suitable on the Internet.

For our experiments, I took the 1C company logo:

In general, any image in formats (png, jpg, bmp) will do.

The logo was inserted into the field and displayed on the form, great!

We will take care of the production of fax stamps and signatures. To do this, click on the item “Instructions “How to create a fax signature and seal””:

Let's print and follow the instructions indicated on the printed sheet:

After that, we will have at our disposal 3 pictures in one of the formats (png, jpg, bmp) with a seal and signatures, in my case they look like this:

We see that pictures with stamps and signatures have been substituted and displayed on the form. Click the “Record and close” button in the organization card:

Please note the change in BP version 3.0.64.34. About him .

Finally, go to some invoice for payment to the buyer and click the “Print” -> “Invoice for payment (with stamp and signatures)” button:

A printed form of the invoice with a logo, seal and signatures has appeared:

If the pictures with the seal and signatures are too small, rescan the sheet with a higher resolution.

We're great, that's all it seems

But what if we want the seal to fit over the signature?

Not everyone needs this, and apparently that’s why 1C by default made an option with a separate location for the signature and seal.

For those who need to combine them, instructions are below.

We combine the seal and signature of the manager

To do this, go to any account and create a regular printed form (without stamps and signatures):

It will turn out like this:

Then we cut off along the bold line at the bottom (before the signatures and seal) and scan the bottom part and save it as a picture on the desktop.

I got it like this (the stamp and signature are fictitious):

Again, go to the organization’s card, section “Logo and Printing”.

Here we delete the pictures with the signatures of the manager and accountant, and instead of the old seal picture, we upload the large picture we just made, combining the seal and signatures:

Click the “Record and close” button in the organization’s card, and then create a printed form of any invoice along with a seal and signatures:

In the printed form that opens, from the “More” item, select the “Change layout...” command:

In the layout that opens, go almost to the very bottom (about the 90th line) and select the invisible square below the inscription “manager”:

Our task is to drag this square a little higher (determined experimentally) than the inscription head and stretch it across the entire width of the printing form, like this:

Don't change anything else! Click the "Record and close" button, the printed invoice form will be reformatted automatically:

Exactly what we wanted happened - the seal climbed onto the signature.

Well done again

By the way, for new lessons...

Change in BP version 3.0.64.34

Now, having set up a signature and seal in the organization, we still must select the “Invoice for payment” item in the invoice, and in the printed form itself, check the “Signature and seal” checkbox:

You only need to install it once. Its value is saved between calls to the print form.

Addition from a site reader. If there was an invoice form - field
will not appear with a checkbox - it is necessary

I encountered a strange problem - 1C does not select the default printer

More precisely, not quite so - 1C does not use the default printer for separate printing form only on a specific computer. On the rest, the same forms are printed correctly, using the “default” printer. Moreover, looking ahead, the form can be any - invoice, expense schedule, etc.

The default printer is installed correctly, the printing settings in 1C and in other programs do not differ - when printing from Word, Excel, everything works.

“open the printed form and change the hardcoded printer”

were not taken seriously, since on other computers a similar printed form worked correctly. A search in the Windows registry and in the 1C registers, judging by the stories, did not yield anything useful. The assumption that the default printer settings were lost only for a specific 1C user or a Windows user was not confirmed - authorization under other users did not help.

Solving the default printer problem in 1C

Select the desired printing form, click on the print preview and in the pop-up window change the indentation value (it doesn’t matter, then we’ll return it as it was) and print. In this case, 1C will remember the default printer for this form and save all parameters. Changing any setting will overwrite the print settings.

Most training materials on programming in the 1C system describe the formation of printed forms based on an object "Tabular Document" are limited to displaying the finished form on the screen. For users, what is much more important is how the document will look when printed. Here, in addition to a well-designed layout, printing parameters also play a role.

Almost all the parameters available in the print settings dialogs (printer settings, page properties) can be specified directly when generating a spreadsheet document.

Let's look at the properties and methods of a spreadsheet document related to printing settings (in the examples given, “TabDoc” is an object of the “Spreadsheet Document” type).

Property "PrinterName" Allows you to specify a printer other than the default for printing. The name must match the printer name configured on the system:

TabDoc. PrinterName = "HP LaserJet 3050 Series PCL 6";

When printing a batch of documents, you can save time by setting the collation option:

TabDoc. ParseByCopies = true;

The number of copies can be specified as follows:

TabDoc. Number of Instances= 5 ;

Of course, you can set the fields:

TabDoc. FieldLeft = 20 ; //Left margin is 20mm, other margins are 10mm (default)

A few more page properties:

TabDoc. OrientationPage= OrientationPage. Landscape;
TabDoc. InstancesOnPage= 2 ; //there will be 2 pages on the sheet
TabDoc. Autoscale = true; //similar to the “page width” scale settings

If necessary, you can specify a specific scaling value in percentage (property "Print Scale").

Property "Page Size" allows you to set standard page formats - “ A 3”, “A4”, “A 5” (a complete list of options is available in 1C help).

TabDoc. PageSize = "A3" ; // letter A must be English

For a non-standard paper size (Custom), you can specify the page height and width (in mm):

TabDoc. PageSize = "Custom" ; //non-standard size
TabDoc. PageHeight = 350 ;
TabDoc. PageWidth = 350 ;

Also in a spreadsheet document, you can control the output of headers and footers and their contents. This is done using properties "Page header" And "Footer". For example:

TabDoc. Page header. Output = true; //the header will be printed
TabDoc. HeaderSizeTop= 7 ; //footer size 7mm (default 10mm)
TabDoc. Page header. VerticalPosition= VerticalPosition. Top ;
TabDoc. Page header. Home page= 2 ; //the footer is displayed from the second page
FontFooter=New Font("Courier New", 8,True);
TabDoc. Page header. Font = FontFooter; //oblique font
TabDoc. Page header. TextInCenter = "Page header";
TabDoc. Page header. TextRight = "Page[&PageNumber] of [&PagesTotal]"; //pagination
TabDoc. Page header. TextLeft = "[&Date]" ; //The current date

The generated document is sent for printing using the method "Type()". There are two possible call options.

1) Directly to the printer:

TabDoc. Print(.NotUse);
TabDoc. Print(true);

2) Before printing, a print dialog will be displayed:

TabDoc. Print ( DialogUsageModePrint. Use );
TabDoc. Print(false);

In addition, you can control how the document is divided into pages. You can estimate the number of pages in a document based on the current printer settings:

TabDoc. Number of pages();

Using methods "CheckOutput()" And "CheckAttach()" You can determine whether a spreadsheet document or an array of spreadsheet document areas will fit on the page in height and width at the current printer settings.

It should be borne in mind that the operation of the last three methods depends on the installed printer. If the method cannot find it, an exception is thrown.

Methods allow you to force insertion of page breaks"OutputVerticalPageSeparator()" And "OutputHorizontalPageSeparator()".

Thus, you can control page-by-page printing and control page filling:

If Not TabDoc. CheckOutput ( Array of OutputAreas) Then
TabDoc. OutputHorizontalPage Separator();
endIf;

An important characteristic of the 1C:Enterprise 8.2 platform is the strict separation of properties and methods by execution context. While all of the above properties are available in any context, the methods listed are not available on the thin client. The exception is the “Print()” method, the availability of which is limited to the client part for obvious reasons. This means that the formation of a spreadsheet document should occur on the server, and it should be sent for printing in a client procedure.

Colleagues!

We continue the topic of creating reports in 1C. Recently, our client had a problem transferring documentation from 1C 8.3.

Entering additional information into a printed form, numbering print sheets, indicating the date, time and user who issued the report.

We discussed a similar example in configuration 8.2 in the previous release. Now we will look at the print settings, which allow us to do all this in configuration 8.3.

Moreover, much of this is automated in 8.3.

So how can you incorporate the above information into your print? What should be done in this case?

We offer our review of options; perhaps it will also be useful to you.

Option 1. Directly from the printed form of the generated report or document:

Create a printed invoice form for payment and call it through Ch. menu – Table – Printing settings – Header and footer and configure as needed.
This is done once for any FORMED printing form.

Setting up header and footer fields

Pay attention to the icons in the upper left corner of the form:

These are in order: page number, number of pages, date and time. Position your mouse at the desired location in the header or footer and click on the desired icon. After clicking on the button. OK, when printed, this data will be displayed in the printed form where you indicated.

Option 2. Configured for any printing (reports, documents, certificates) from the program

If you do not want to manually configure headers and footers each time, you can use the Administration – Header and Footer Settings section to configure the general appearance of headers and footers for printing.

It looks like this:

There are more options for displaying information in printed forms: the “Report Name” and “User” data is added. This is exactly our case.

Selecting data for the header and footer is carried out as described in option 1, only instead of icons we select the text buttons “Time”, “Date”, “Report Name”, etc. But the essence does not change. After specifying the required information in the required places on the form, the setting is saved.

When the printed form is printed, all specified data will be displayed in it.

Option 3: Edit the layout in custom mode

Why am I considering this method here, which has its own functionality and which, strictly speaking, does not relate to the topic under consideration.

Because it often happens that you have to use a combination of this method and print settings to achieve the desired result. Editing the layouts of printed forms allows us to draw some things we need right in the layout of this printed form.

Layouts can be changed in the Administration – Printed forms, reports, processing – Printed form layouts section.

Here is an example of editing the layout of an Order Invoice (document Invoice for payment to the buyer):

We select a layout, indicating at the entrance that we will edit it and add some text information at the end.

For example, like this:

Save the changes and create the printable form.

And we print with the changes.
But the possibilities for such editing are limited.)

So option 3 is convenient to use for entering constant, unchangeable information; everything else will require modification of the printed form by a programmer.

But often this is enough. 🙂