CN113849140A - Label printing method and device, terminal equipment and storage medium - Google Patents

Label printing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN113849140A
CN113849140A CN202111215915.0A CN202111215915A CN113849140A CN 113849140 A CN113849140 A CN 113849140A CN 202111215915 A CN202111215915 A CN 202111215915A CN 113849140 A CN113849140 A CN 113849140A
Authority
CN
China
Prior art keywords
view
view control
label
control
commodity data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111215915.0A
Other languages
Chinese (zh)
Inventor
陈宏亮
熊娅娟
施宪富
刘伟
朱德刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kemai Technology Co ltd
Original Assignee
Shenzhen Kemai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kemai Technology Co ltd filed Critical Shenzhen Kemai Technology Co ltd
Priority to CN202111215915.0A priority Critical patent/CN113849140A/en
Publication of CN113849140A publication Critical patent/CN113849140A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/125Page layout or assigning input pages onto output media, e.g. imposition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1204Improving or facilitating administration, e.g. print management resulting in reduced user or operator actions, e.g. presetting, automatic actions, using hardware token storing data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The application is applicable to the technical field of label printing, and provides a label printing method, a label printing device, terminal equipment and a storage medium. In the embodiment of the application, commodity data are obtained according to each View control in a preset label template; filling contents of the View controls according to the commodity data to generate target labels; and printing the target label in a preset size, so that the label printing efficiency is improved.

Description

Label printing method and device, terminal equipment and storage medium
Technical Field
The present application belongs to the technical field of label printing, and in particular, to a label printing method, an apparatus, a terminal device, and a storage medium.
Background
Along with the rapid development of the internet technology, more and more merchants need to print commodity labels, the existing label printing is to align the information in the labels from left to right or print the labels after linear arrangement from top to bottom, but because the demands of users for label forms are different, the existing label printing cannot well meet the user demands, and if the printing is adjusted again according to the user demands, the efficiency of label printing is low.
Disclosure of Invention
The embodiment of the application provides a label printing method, a label printing device, terminal equipment and a storage medium, and can solve the problem of low label printing efficiency.
In a first aspect, an embodiment of the present application provides a label printing method, including:
acquiring commodity data according to each View control in a preset label template;
filling contents of the View controls according to the commodity data to generate target labels;
and printing the target label in a preset size.
In one embodiment, before acquiring commodity data according to each View control in a preset label template, the method comprises the following steps:
acquiring an operation instruction, and generating a View control containing an element type according to the operation instruction;
and carrying out attribute configuration on the View control, and determining a label template according to the configured View control.
In an embodiment, the attribute configuration of the View control includes:
when the attributes of at least two View controls are consistent, if the configured View control exists in the at least two View controls, copying the attribute of the configured View control into the non-configured View control in the at least two View controls for configuration.
In one embodiment, after determining the label template according to the configured View control, the method includes:
acquiring an adjusting instruction, and adjusting the attribute of a target control corresponding to the adjusting instruction according to the adjusting instruction;
and after the attribute adjustment of the target control is finished, refreshing the label template.
In an embodiment, the filling the content of each View control according to the commodity data includes:
when the element type of the View control is a bar code type, acquiring a bar code character string in the commodity data, and filling the bar code character string into a first sub-control of the View control of the bar code type;
and generating bar code pixels according to the bar code character strings, generating a bar code bitmap according to the bar code pixels, and filling the bar code bitmap into a second sub-control of the View control of the bar code type.
In an embodiment, the filling the content of each View control according to the commodity data includes:
when the element type of the View control is a two-dimensional code type, acquiring a two-dimensional code character string in the commodity data, and generating a two-dimensional code pixel according to the two-dimensional code character string;
and generating a two-dimensional code bitmap according to the two-dimensional code pixels, and filling the two-dimensional code bitmap into the View control of the two-dimensional code type.
In an embodiment, the filling the content of each View control according to the commodity data includes:
when the element type of the View control is a text type, acquiring text information of the commodity according to the two-dimensional code character string;
and filling the text information into the View control of the text type.
In a second aspect, an embodiment of the present application provides a label printing apparatus, including:
the acquisition module is used for acquiring commodity data according to each View control in a preset label template;
the filling module is used for respectively filling the contents of the View controls according to the commodity data to generate target labels;
and the printing module is used for printing the target label in a preset size.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements any of the steps of the label printing method when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the above label printing methods.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on a terminal device, causes the terminal device to execute any one of the label printing methods of the first aspect.
According to the embodiment of the application, the commodity data are acquired according to the View controls in the preset label template, so that the corresponding requirements of a user are met by setting the View controls, the commodity data required by the user for printing the label are acquired according to the preset label template, the acquisition speed of the commodity data during label printing can be increased, and the content filling is respectively carried out on the View controls according to the commodity data, so that the target label required by the user is generated, and the target label is printed in the preset size, so that the label printing efficiency is improved on the basis of meeting the requirements of the user.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a first schematic flow chart of a label printing method provided in an embodiment of the present application;
FIG. 2 is a diagram of a display effect of a tag provided by an embodiment of the present application;
fig. 3 is a schematic flow chart of a label printing method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a label printing method provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a label printing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Fig. 1 is a schematic flow chart of a label printing method in an embodiment of the present application, where an execution main body of the method may be a terminal device, and as shown in fig. 1, the label printing method may include the following steps:
and S101, acquiring commodity data according to each View control in a preset label template.
In this embodiment, when the terminal device prints the label, the commodity data required for printing may be directly obtained according to each View control in the label template that is stored in the terminal device in advance, and commodity data irrelevant to printing in the commodity does not need to be obtained, so that the commodity data obtaining speed is increased. The label template is a template constructed by an Android official control Group (View Group), the template comprises at least one View control, the View control is a View control, the View is a base class of all UI components and can be defined by a user, the View Group is a container for containing the View, and the View Group is derived from the View. The above-described label may be applied to various products to display product information, such as a label provided on a cup, and may also include a price tag placed on a shelf.
It can be understood that, because the requirements of users for the label form are different, in this embodiment, the user requirements are met by setting each View control in the preset label template, so that the user can issue a corresponding instruction through a display panel of the terminal device or the upper computer, so that the label template generates a corresponding View control according to the instruction expressing the user requirements, or a certain View control is changed correspondingly.
As a specific example, but not by way of limitation, when it is detected that the content to be displayed by the View control in the label template is "commodity name", the commodity name corresponding to the commodity is acquired and set in a corresponding position of the View control, where the corresponding position is determined by the attribute of the View control.
In one embodiment, before step S101, it may include: the terminal device generates a View control containing element types according to an operation instruction generated by a user through operation on a display panel of the terminal device or an upper computer, where the element types include, but are not limited to, a text type, a barcode type, a two-dimensional code type, and the like, and the content correspondingly displayed when the label printing is performed on the View controls of different element types is different, for example, the content displayed by the View control of the text type is text content, as shown in fig. 2, the text content in fig. 2 includes a commodity name, a commodity barcode, a commodity abbreviation, and a barcode character string "0123456789123". And then carrying out attribute configuration on the View control, wherein the attributes include but are not limited to color, size, style, placing position and the like, further finishing the display content of the View control through attribute configuration so as to further meet the requirements of users, and finally determining a label template according to the configured View control. The label template comprises at least one View control, and the at least one View control can be at least one of a text type, a bar code type and a two-dimensional code type.
Optionally, the terminal device may preset a configuration instruction, and when the commodity conforms to the preset commodity type, the attribute configuration is performed on each View control according to the configuration instruction corresponding to the preset commodity type, so that parameters such as color, size, style, placement position and the like of the View control are configured at the same time.
By way of specific example and not limitation, if the current commodity is a banana, a configuration instruction corresponding to the fruit type is selected, and therefore attribute configuration is performed on each View control in the label template of the banana.
In one embodiment, when the View controls of the text type, the barcode type and the two-dimensional code type exist in the label template, at least one of the View controls can be determined and displayed according to a user display instruction, so that the flexibility of the label template can be improved through different forms of display, and the label requirement of a user for a part of special goods can be met. For example, when the View control is a barcode type View control, the barcode type View control will include a graphic sub-control and a text sub-control, that is, the graphic sub-control displays a bitmap of a barcode, the text sub-control displays a character string of the barcode, and the terminal device can call a setview method of the View control to set at least one sub-control in the barcode type View control to be visible or invisible according to a display instruction of a user.
Optionally, when the View control containing the element type is generated according to the operation instruction, the display content that the user wants to display in the View control can be generated in the View control according to the operation instruction.
In an embodiment, the property configuration of the View control may include: when the terminal equipment detects that the attributes of at least two View controls are consistent, if the configured View controls exist in the at least two View controls, the attributes of the configured View controls can be copied to the uncompleted configured View controls in the at least two View controls for configuration by an addView method, so that the times of performing the same operation by a user are reduced, and the template generation efficiency is improved.
In an embodiment, when a user is not satisfied with the display effect of a certain View control in a template, after determining a label template according to a configured View control, a terminal device acquires an adjustment instruction issued by the user, and adjusts the attribute of a target control corresponding to the adjustment instruction according to the acquired adjustment instruction, so that the adjusted display effect of the target control which is not satisfied with the user meets the user requirement, when the attribute of the target control is adjusted according to the adjustment instruction, the target control redraws the content according to the adjusted attribute, and the terminal device refreshes the label template by calling an invalid function, so that the refreshed label template meets the user requirement. The adjusting instruction includes, but is not limited to, adjusting a name of the View control, adjusting a font size of the View control, adjusting a font color of the View control, adjusting a font style of the View control, adjusting a field name of the View control, adjusting a bitmap size and position of the View control, deleting or adding some content to some content in the View control, and the like.
By way of specific example and not limitation, when the target control is a text-type View control, if the adjustment instruction is to adjust the name of the View control, the name of the View control may be adjusted according to a preset field list, where the preset field list includes but is not limited to a commodity bar code, a commodity name, a commodity abbreviation, and the like. If the adjusting instruction is to adjust the font size or style of the View control, the font size, font effect (style) and the like of the text content displayed by the View control can be set and adjusted according to the preset attribute basis.
By way of specific example and not limitation, when the target control is a barcode type, if the adjusting instruction is to adjust the field name of the View control, the field name of the View control may be adjusted according to a preset field list. If the adjusting instruction is to adjust the size or the style of the View control, the font size or the style of the barcode character string displayed by the View control can be set and adjusted according to the preset attribute basis. If the adjustment instruction is to adjust the size and the position of the bitmap of the View control, the size and the position of the bitmap displayed by the View control can be adjusted according to a preset operation mode, wherein the operation mode includes but is not limited to a corresponding operation mode when the bitmap is enlarged or reduced and a corresponding operation mode when the bitmap is moved.
By way of specific example and not limitation, when the target control is of a two-dimensional code type, if the adjusting instruction is to adjust the field name of the View control, the field name of the View control may be adjusted according to a preset field list. If the adjustment instruction is to adjust the size and the position of the bitmap of the View control, the size and the position of the bitmap displayed by the View control can be adjusted according to a preset operation mode, wherein the operation mode includes but is not limited to a corresponding operation mode when the bitmap is enlarged or reduced and a corresponding operation mode when the bitmap is moved.
Optionally, after the terminal device detects the adjustment instruction, it may acquire corresponding adjustment information in the adjustment instruction, where the adjustment information includes an adjusted attribute and an adjustment direction corresponding to the attribute, and then acquire the type of the View control and the type of the commodity, and when the terminal device detects that the adjustment times for the adjusted attribute of the View control of the same type and the adjustment direction corresponding to the attribute are the same and are greater than a preset time threshold value under the same commodity type, if the terminal device detects the View control of the same type under the same commodity type again, perform attribute configuration on the View control according to the adjusted attribute and the adjustment direction corresponding to the attribute. For example, the adjustment attribute of the View control of the text type under the fruit type commodity is font size, the adjustment direction is adjusted to be font four, and after the same adjustment times are larger than a preset time threshold value, if the terminal device detects that the View control of the banana type is the text type, the font size in the View control is configured to be font four.
Optionally, the terminal device may create a Callback function (Callback) interface instance related to the ViewDragHelper in the View control through a ViewDragHelper tool class in the Android system, and implement moving the View control to the target position in the label template in a manner of associating with each other.
Optionally, the terminal device can rotate the View control according with the user requirement through a custom animation function in the Android system.
And S102, respectively filling contents in the View controls according to the commodity data to generate target labels.
In this embodiment, the terminal device performs content filling on the corresponding position of each View control according to the acquired commodity data, so as to generate a target label meeting the user requirement.
In one embodiment, as shown in fig. 2, the step S102 may include:
step S201, when the element type of the View control is the bar code type, acquiring a bar code character string in the commodity data, and filling the bar code character string into a first sub-control of the View control of the bar code type.
And S202, generating bar code pixels according to the bar code character string, generating a bar code bitmap according to the bar code pixels, and filling the bar code bitmap into a second sub-control of the View control of the bar code type.
The method includes the steps that a bar code type View control comprises an image sub-control (ImageView) and a text sub-control (TextView), wherein the image sub-control displays a bitmap of a bar code, the text sub-control displays a character string of the bar code, commodity data required by the display of the corresponding sub-control are respectively acquired according to different display contents of different sub-controls in the bar code type View control, namely, the bar code character string in the commodity data is filled into a first sub-control of the bar code type View control, the first sub-control is the text sub-control, the barcode bitmap is filled into a second sub-control of the bar code type View control, and the second sub-control is the image sub-control. Before Bitmap filling, the terminal device can use a Google Zxing library to draw out barcode pixels according to the barcode character string and create a barcode Bitmap (Bitmap) through the barcode pixels.
In one embodiment, as shown in fig. 3, the step S102 may include:
and S301, when the element type of the View control is a two-dimensional code type, acquiring a two-dimensional code character string in the commodity data, and generating a two-dimensional code pixel according to the two-dimensional code character string.
And S302, generating a two-dimensional code bitmap according to the two-dimensional code pixels, and filling the two-dimensional code bitmap into the View control of the two-dimensional code type.
It can be understood that the View control of the two-dimensional code type is a graphic control (ImageView), the graphic control displays a Bitmap of the two-dimensional code, and commodity data required by displaying the corresponding sub-control is acquired according to the View control of the two-dimensional code type, that is, the terminal device can draw a two-dimensional code pixel according to a two-dimensional code character string in the commodity data by using a Google Zxing library, create a two-dimensional code Bitmap (Bitmap) through the two-dimensional code pixel, and fill the two-dimensional code Bitmap into the View control of the two-dimensional code type.
In an embodiment, since text information of some commodities, such as commodity names, can be obtained according to the character string, commodity data can be obtained according to a barcode character string or a two-dimensional code character, specifically, when content filling is performed on each View control according to the commodity data, the method may include: and when the element type of the View control is a text type, acquiring text information of the commodity according to the two-dimensional code character string, and filling the text information into the View control of the text type, wherein the View control of the text type is a text control (textView).
Optionally, if part of the information in the text information of the product cannot be obtained according to the character string, the product may be detected, or part of the information that the product cannot be obtained through the character string may be obtained.
And step S103, printing the target label in a preset size.
In this embodiment, the terminal device may obtain the size of the actual printed label according to the size of the template when the target label is not printed, where the size is the preset size, and print the target label with the preset size. Wherein the dimensions include the length and width of the label.
According to the embodiment of the application, the commodity data are acquired according to the View controls in the preset label template, so that the corresponding requirements of a user are met by setting the View controls, the commodity data required by the user for printing the label are acquired according to the preset label template, the acquisition speed of the commodity data during label printing can be increased, and the content filling is respectively carried out on the View controls according to the commodity data, so that the target label required by the user is generated, and the target label is printed in the preset size, so that the label printing efficiency is improved on the basis of meeting the requirements of the user.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 5 is a schematic structural diagram of a label printing apparatus according to an embodiment of the present application, corresponding to the above-mentioned label printing method, and as shown in fig. 5, the label printing apparatus may include:
the obtaining module 501 is configured to obtain commodity data according to each View control in a preset label template.
And a filling module 502, configured to perform content filling on each View control according to the commodity data, so as to generate a target label.
A printing module 503, configured to print the target label in a preset size.
In one embodiment, the above label printing apparatus may further include:
and the control generation module is used for acquiring the operation instruction and generating the View control containing the element type according to the operation instruction.
And the attribute configuration module is used for carrying out attribute configuration on the View control and determining a label template according to the configured View control.
In one embodiment, the attribute configuration module may include:
and the attribute copying unit is used for copying the attribute of the configured View control to the View control which is not configured in the at least two View controls for configuration if the configured View control exists in the at least two View controls when the attributes of the at least two View controls are consistent.
In one embodiment, the above label printing apparatus may further include:
and the attribute adjusting module is used for acquiring an adjusting instruction and adjusting the attribute of the target control corresponding to the adjusting instruction according to the adjusting instruction.
And the template refreshing module is used for refreshing the label template after the attribute adjustment of the target control is finished.
In one embodiment, the filling module 502 may include:
and the character string filling unit is used for acquiring the bar code character string in the commodity data when the element type of the View control is the bar code type, and filling the bar code character string into the first sub-control of the View control of the bar code type.
And the pixel generation unit is used for generating bar code pixels according to the bar code character string, generating a bar code bitmap according to the bar code pixels, and filling the bar code bitmap into a second sub-control of the View control of the bar code type.
In an embodiment, the filling module 502 may further include:
and the character string acquisition unit is used for acquiring a two-dimensional code character string in the commodity data when the element type of the View control is the two-dimensional code type, and generating two-dimensional code pixels according to the two-dimensional code character string.
And the bitmap generation unit is used for generating a two-dimensional code bitmap according to the two-dimensional code pixels and filling the two-dimensional code bitmap into the View control of the two-dimensional code type.
In an embodiment, the filling module 502 may further include:
and the information acquisition unit is used for acquiring the text information of the commodity according to the two-dimensional code character string when the element type of the View control is a text type.
And the information filling unit is used for filling the text information into the View control of the text type.
According to the embodiment of the application, the commodity data are acquired according to the View controls in the preset label template, so that the corresponding requirements of a user are met by setting the View controls, the commodity data required by the user for printing the label are acquired according to the preset label template, the acquisition speed of the commodity data during label printing can be increased, and the content filling is respectively carried out on the View controls according to the commodity data, so that the target label required by the user is generated, and the target label is printed in the preset size, so that the label printing efficiency is improved on the basis of meeting the requirements of the user.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and the module described above may refer to corresponding processes in the foregoing system embodiments and method embodiments, and are not described herein again.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application. For convenience of explanation, only portions related to the embodiments of the present application are shown.
As shown in fig. 6, the terminal device 6 of this embodiment includes: at least one processor 600 (only one shown in fig. 6), a memory 601 connected to the processor 600, and a computer program 602, such as a label printing program, stored in the memory 601 and executable on the at least one processor 600. The processor 600 executes the computer program 602 to implement the steps in the various label printing method embodiments described above, such as steps S101 to S103 shown in fig. 1. Alternatively, the processor 600 executes the computer program 602 to implement the functions of the modules in the device embodiments, such as the functions of the modules 501 to 503 shown in fig. 5.
Illustratively, the computer program 602 may be divided into one or more modules, and the one or more modules are stored in the memory 601 and executed by the processor 600 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 602 in the terminal device 6. For example, the computer program 602 may be divided into an acquisition module 501, a filling module 502, and a printing module 503, and the specific functions of the modules are as follows:
an obtaining module 501, configured to obtain commodity data according to each View control in a preset label template;
a filling module 502, configured to perform content filling on each View control according to the commodity data, and generate a target label;
a printing module 503, configured to print the target label in a preset size.
The terminal device 6 may include, but is not limited to, a processor 600 and a memory 601. Those skilled in the art will appreciate that fig. 6 is merely an example of the terminal device 6, and does not constitute a limitation to the terminal device 6, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, a bus, etc.
The Processor 600 may be a Central Processing Unit (CPU), and the Processor 600 may be other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 601 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6 in some embodiments. In other embodiments, the memory 601 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device 6. Further, the memory 601 may include both an internal storage unit and an external storage device of the terminal device 6. The memory 601 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The memory 601 described above may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A label printing method, comprising:
acquiring commodity data according to each View control in a preset label template;
filling contents of the View controls according to the commodity data to generate target labels;
and printing the target label in a preset size.
2. The label printing method of claim 1, prior to acquiring commodity data from each View control in a preset label template, comprising:
acquiring an operation instruction, and generating a View control containing an element type according to the operation instruction;
and carrying out attribute configuration on the View control, and determining a label template according to the configured View control.
3. The label printing method of claim 2, wherein the property configuring the View control comprises:
when the attributes of at least two View controls are consistent, if the configured View control exists in the at least two View controls, copying the attribute of the configured View control into the non-configured View control in the at least two View controls for configuration.
4. The label printing method of claim 2, after determining the label template from the configured View controls, comprising:
acquiring an adjusting instruction, and adjusting the attribute of a target control corresponding to the adjusting instruction according to the adjusting instruction;
and after the attribute adjustment of the target control is finished, refreshing the label template.
5. The label printing method according to claim 1, wherein the content filling of the View controls according to the commodity data comprises:
when the element type of the View control is the bar code type, acquiring a bar code character string in the commodity data, and filling the bar code character string into a first sub-control of the View control of the bar code type;
generating bar code pixels according to the bar code character strings, generating bar code bitmaps according to the bar code pixels, and filling the bar code bitmaps into a second sub control of the View control of the bar code type.
6. The label printing method according to claim 1, wherein the content filling of the View controls according to the commodity data comprises:
when the element type of the View control is a two-dimensional code type, acquiring a two-dimensional code character string in the commodity data, and generating a two-dimensional code pixel according to the two-dimensional code character string;
and generating a two-dimensional code bitmap according to the two-dimensional code pixels, and filling the two-dimensional code bitmap into the View control of the two-dimensional code type.
7. The label printing method of claim 6, wherein said content populating each of said View controls based on said commodity data comprises:
when the element type of the View control is a text type, acquiring text information of the commodity according to the two-dimensional code character string;
and filling the text information into the View control of the text type.
8. A label printing apparatus, comprising:
the acquisition module is used for acquiring commodity data according to each View control in a preset label template;
the filling module is used for respectively filling the contents of the View controls according to the commodity data to generate target labels;
and the printing module is used for printing the target label in a preset size.
9. A terminal device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor, when executing said computer program, carries out the steps of a method of label printing according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method of label printing according to any one of claims 1 to 7.
CN202111215915.0A 2021-10-19 2021-10-19 Label printing method and device, terminal equipment and storage medium Pending CN113849140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111215915.0A CN113849140A (en) 2021-10-19 2021-10-19 Label printing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111215915.0A CN113849140A (en) 2021-10-19 2021-10-19 Label printing method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113849140A true CN113849140A (en) 2021-12-28

Family

ID=78978895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111215915.0A Pending CN113849140A (en) 2021-10-19 2021-10-19 Label printing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113849140A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050077361A1 (en) * 2003-08-28 2005-04-14 Mamoru Sakai Tape printing system, tape printing method, and tape printing program
US20070016857A1 (en) * 2005-06-30 2007-01-18 International Business Machines Corporation Method and system for non-intrusive portlet rendering for printing
CN101788892A (en) * 2009-01-22 2010-07-28 英业达股份有限公司 Label printing system
CN102117185A (en) * 2009-12-31 2011-07-06 北京东方开元信息科技有限责任公司 Bar code print control method and device
CN102574404A (en) * 2009-09-28 2012-07-11 Csr技术公司 Preview and modification of printable components of a document at a printing device
CN102880893A (en) * 2012-09-25 2013-01-16 北京建筑工程学院 Barcode displaying method
CN109409452A (en) * 2018-09-20 2019-03-01 摩尔元数(厦门)科技有限公司 The method and apparatus that universal tag parses and automatically generates print label
CN110749367A (en) * 2019-11-20 2020-02-04 石门依云电子商务有限公司 Electronic scale label printing system
CN111752667A (en) * 2020-07-01 2020-10-09 湖南快乐阳光互动娱乐传媒有限公司 Page generation method and device
CN112162712A (en) * 2020-09-10 2021-01-01 张平 Label printing method and system based on template editing

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050077361A1 (en) * 2003-08-28 2005-04-14 Mamoru Sakai Tape printing system, tape printing method, and tape printing program
US20070016857A1 (en) * 2005-06-30 2007-01-18 International Business Machines Corporation Method and system for non-intrusive portlet rendering for printing
CN101788892A (en) * 2009-01-22 2010-07-28 英业达股份有限公司 Label printing system
CN102574404A (en) * 2009-09-28 2012-07-11 Csr技术公司 Preview and modification of printable components of a document at a printing device
CN102117185A (en) * 2009-12-31 2011-07-06 北京东方开元信息科技有限责任公司 Bar code print control method and device
CN102880893A (en) * 2012-09-25 2013-01-16 北京建筑工程学院 Barcode displaying method
CN109409452A (en) * 2018-09-20 2019-03-01 摩尔元数(厦门)科技有限公司 The method and apparatus that universal tag parses and automatically generates print label
CN110749367A (en) * 2019-11-20 2020-02-04 石门依云电子商务有限公司 Electronic scale label printing system
CN111752667A (en) * 2020-07-01 2020-10-09 湖南快乐阳光互动娱乐传媒有限公司 Page generation method and device
CN112162712A (en) * 2020-09-10 2021-01-01 张平 Label printing method and system based on template editing

Similar Documents

Publication Publication Date Title
US9142044B2 (en) Apparatus, systems and methods for layout of scene graphs using node bounding areas
US10553001B2 (en) Master page overlay
US10410606B2 (en) Rendering graphical assets on electronic devices
EP3832459A1 (en) Graphic drawing method and apparatus, device, and storage medium
CN104820589A (en) Method and device for dynamically adapting webpage
CN111190672A (en) UI (user interface) adaptation method of electronic equipment, electronic equipment and storage medium
CN109636885B (en) Sequential frame animation production method and system for H5 page
CN112419136A (en) Picture watermark adding method and device, electronic equipment and storage medium
CN111788554A (en) Adaptive interface conversion across display screens
CN107506483A (en) Page loading method, device, electronic equipment and storage medium
CN111724455A (en) Image processing method and electronic device
CN113849140A (en) Label printing method and device, terminal equipment and storage medium
CN109144655A (en) Method, apparatus, system and the medium of image Dynamic Display
CN116010736A (en) Vector icon processing method, device, equipment and storage medium
CN114371838A (en) Method, device and equipment for rendering small program canvas and storage medium
CN113297313A (en) Table data display method and device, electronic equipment and storage medium
CN113254131A (en) Page background display method and device
CN114089995A (en) Page generation method, device, equipment and storage medium
EP2310963A1 (en) Information output apparatus, information output method, and recording medium
CN113703699B (en) Real-time output method and device for electronic file
US20150199837A1 (en) Method and apparatus for converting an animated sequence of images into a document page
CN114359094A (en) Image processing method, device, equipment and storage medium
CN115952773A (en) Form generation method and device
CN117350798A (en) Information display method and device, electronic equipment and storage medium
CN114237589A (en) Skeleton screen generation method and device, terminal device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination