Here you are, for example. You do think that everything ends after death, right?
“Right ...” several voices in the hall responded. [...]
- And the current does not flow through the air. Right?
- Right…
- And without Windows or MacOS it is impossible to produce a prepress newspaper?
Wrong. With the help of Linux you can, of course, do not everything, but much more than you think.
Fifteen years ago, the advertising agency where I worked began to chuck the roasted rooster about unlicensed software. The chief estimated the possibilities and decided that he would be able to carve out from the budget the sum for the purchase of five Windows + Office licenses, one 1C 7.7 and a couple of Corel Draw. At the same time, 10 advertising managers should have worked on 1C, and Windows was absolutely necessary for designers.
We had a good admin; He also estimated the possibilities, consulted with colleagues and wondered: why specifically sales managers need Windows?
With the help of a downgrade, he made a pair of dll files from a single Windows XP terminal server, installed 1C there, and installed Ubuntu on all the management machines with a single shortcut on the desktop - “Connect to server”. Further, the idea of the chief began to move in the direction of “why do we need computers in the office at all, if managers can connect to the terminal server right from home?”, There were great prospects ahead.
And we would live happily ever after, but it was necessary to somehow still impose our advertising newspaper. In Korela it was absolutely impossible to do this. Adobe products categorically refused to buy products - and not only because of prices: this corporation snapped on all advertising enterprises of our city in bulk (preemptively sounded, according to the principle: if you do advertising, it means you have Photoshop stealing!) And we are polite invited to the prosecutor's office to show our licenses. We showed the licenses, but Adobe was seriously offended and the prosecutor's office was assured that we never had any business with the products of this corporation and we are not going to have it.
You could, of course, buy QuarkXpress or start developing Scribus. But by this time we already had a certain data processing system, there was some level of automation. A convenient storage system for advertising layouts, a “correct” data structure describing layouts, led us to the following thought: why do we need a visual program for printing layout in general? Advertizing layouts are after all just rectangles, arrange them in rows and columns on the newspaper page - naked mathematics. Why is there a man with a mouse in his hand?
In 1C, managers created a “Advertising Layout” document, which, among other things, indicated: layout dimensions, a page in a newspaper and coordinates on a page. It is clear that there could be a lot of collisions. Which should have been resolved by the general manager.
The situation was complicated by the characteristics of the final product - the newspaper: there must be a number of pages (pages), necessarily a multiple of four. And for some printing machines - a multiple of eight.
This means that the general manager must constantly monitor the amount of advertising and give feedback to clients in a timely manner. If, for example, the material for the next issue has accumulated by 33 pages, part of the advertising layouts will have to be thrown out of this issue - transfer to the next or reduce the size, or even think of something, and manage to coordinate all this with the client before handing over the newspaper to the printing house ( and not to put customers before the fact after the release).
To resolve a collision — the overlay of two layouts — the main manager must see this overlay. You will say, the imposition of coordinates is easier and safer to detect programmatically. The way it is. But what does the program do with the problem found? And a combined method appears: the program, having detected the overlay, “drops” the layout from the page and marks it in a special way, and the main manager already looks at all the “dropped” layouts and decides what to do with them.
He does this no longer in 1C, but on a web page, where all the thumbnails of the layouts are located exactly as on the corresponding newspaper page (but the list of “dropped” layouts is somewhere on the side). Therefore, in the following, we will call the main manager simply a “layout designer”.
In order for the layouts to be displayed on the web page, the layout designer, before starting the layout, uploads the data from 1C and loads it into Mysql. And then opens in the browser address localhost / verstka . Or, say, in the summer, when the coder is constantly living in the country, an address like #http: //nasha-gazeta.ru/verstka/.
On a web page layout, javascript using the technology drag-end-drop allows the layout maker to move the thumbnails of the layouts with both the mouse and keyboard arrows. After any stopping of the layout, ajax writes new layout coordinates to Mysql. After the end of the current layout, the layout designer uploads new data from Mysql and loads it back into 1C. After that, managers working with clients can agree on the new state of the layouts. And so several times around, until everyone is happy.
In the end, everything is agreed, all layouts are placed; we have completely made up the newspaper "virtually." But what will we carry to the printing house?
Typography needs a postscript or pdf file. If you have ever worked in advertising, you know how a pdf file for a printing house is made: you click in the program like InDesign or Corel Draw on the File - Export menu, select the format you want and create a pdf file (postscript). Or create the same file through the menu File - Print. But what does this print file have inside?
If a person places a number of layouts taken from the disk of his computer in a visual printing layout program, then, when exporting or printing, the program will also put all these source files with the necessary coordinates into a common postscript file. That is, the final file is the files of separate layouts combined together, each of which is preceded by a pair of special commands in the postscript language indicating coordinates and some other details.
The postscript file is a plain text file with a set of data and instructions. Approximately as an html file, only sizes are larger. You can open this file in a text editor, find the instruction 150 250 moveto
, replace the number 250 by 300, and some element during printing will shift by 50. True, the question remains: will shift by 50 what and in what direction?
There are several not quite familiar rules in postscript: everything is measured in points - such conventional units that are less than millimeters 2.8346456692913 times; A point of reference coordinates is located in the lower left corner of the page (and not in the upper left, as you used to).
That is, the command 150 250 moveto
, entered on a “clean sheet”, means that we moved from the bottom left point of the page 53 mm to the right and 88 mm up.
The following difficulty arises from the size of printing files: we cannot, of course, open and edit print files of 100 megabytes in a text editor — that would be very inconvenient. Fortunately, layouts can be put together on the same page, without putting the entire contents of the file into the text of the whole page, but using something like links — specifying the paths to the files and the combination of the file , run and flush commands:
%% /PasteFile { grestore gsave x1 y1 translate {/f1 f10 (r) file def} stopped {} {f10 run} ifelse f10 = flush } def %% /f10 (/home/verstka/shablon/fon_bw.eps) def /x1 7.7 def /y1 49 def PasteFile
Thus, we get almost a complete analogue of the html-file, which also usually contains links to images, and not the pictures themselves. Unfortunately, this small postscript layout text file cannot be sent to the printing company, since the layout files associated with it are stored separately and during printing (and the font files, by the way, too) will not be accessible.
At the last stage, you need to put everything together - embed the content of each layout in the page. This can be done with the help of the wonderful Ghostscript program. If you use the ps2pdf method, you can immediately get the final pdf for the print shop from our small file; If the printer requires ps files, you can use the Ghostscript program to create a “full” postscript file using the ps2ps method.
Our typography program was just a small php script on a web server. She generated postscript text files with links to layout files, using information from a database describing the coordinates and sizes of the layouts. She then called the Ghostscript interpreter and created files that were completely ready to be sent to the print shop. If necessary, imposition was just as easy to create: small text files of separate strips were connected to each other with the addition of rotate
and translate
instructions.
The described layout program seems to be quite able to work under Windows. But a machine with a web server, where it all happened, had to be a file server , if necessary: after all, all the layout files that have access to a large number of people — both designers and managers — are stored together and stored — for example, to copy ready layout received from the client, or vice versa, print the layout and send for approval.
But Windows XP has one very unpleasant feature - a limit on the number of connections. At one time it spoiled us a lot of blood. In one case (with a terminal server) our admin solved this problem by hacking Windows XP, in the other (with a repository of advertising layouts) by installing Linux. And in what case was there less risk for the enterprise?
The main conclusion I made for myself is that a system administrator is absolutely necessary for a small enterprise. It can be coming, it can be an outsourcing from some company, it does not matter. The main thing that he was not afraid of Linux. Then you will stop being afraid of him. I've stopped. I just wrote the same layout program in php and javascript. Started on Windows. But since the admin has transplanted me to Linux, I don’t want to hear about Windows anymore - so Linux has been convenient for me in all respects.
The second conclusion is almost TRIZ: if you cannot solve the problem, divide it into parts and space them in space and time. An advertising agency may well live without the highly specialized software of the Adobe Corporation, indicating in the rules for working with clients: layouts are accepted in eps format. If you do not have a ready-made layout, we will stamp it with your own resources in Korela. And for VIP clients, you can use the same outsourcing - entrust the production of layouts to third parties, cool designers.
The third conclusion: Linux in a modern small enterprise does not survive because of objective reasons - not because it is too complicated or loses Windows, but because the office people are mostly lazy and curious. People just do not want to learn something new. And the shops helpfully slip the familiar “Windows” to them.
Now in the company where I work, all the managers work with the client base and sales through the web - they do not depend on the operating system. A car with 1C and a bank client stands alone in the corner - purely for an accountant. But Linux is only on two old client machines. Because when you buy a new computer, it already has Windows. At the same time, everything is bogging down on its OS, but in different ways: if sitting on Linux cannot really show anything but vague anxiety that they are “not in the mainstream”, then Windows 10 lovers are cursing for a very specific reason: they cannot print files on the nearby HP 1100 printer. But nobody wants to change to Linux anyway.
Source: https://habr.com/ru/post/346530/