Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw Cmd in Print Designer #275

Draft
wants to merge 48 commits into
base: develop
Choose a base branch
from

Conversation

IamSaiyyamChhetri
Copy link

@IamSaiyyamChhetri IamSaiyyamChhetri commented May 30, 2024

  • Disable Colors or change control to select field with black and white as options

  • Dynamic Text ( Font Family, Style, Height [ Auto, Fixed ] )

  • Table ( Borders, Padding )

  • Embed Image and check size

  • Disable Header / Footers

  • Check Barcode Printing / Also consider internal barcode options ( not required )

  • Layout is preserved with overlapping elements

  • Write Patch to create and set default values for required fields.

  • Only Show Raw Printing Section If Raw Printing is enabled

  • Add validation on save to check that language is selected

  • Check if Element is overlapping at the top and / or bottom and disable command options.

  • Add Empty / Disable Option in Raw Command Before / After so user can remove the command.

@IamSaiyyamChhetri IamSaiyyamChhetri mentioned this pull request May 30, 2024
@IamSaiyyamChhetri IamSaiyyamChhetri marked this pull request as draft May 30, 2024 12:08
@rmehta
Copy link
Member

rmehta commented Jun 20, 2024

Sceenshots / demo video?

@IamSaiyyamChhetri
Copy link
Author

Demo Video Link : https://drive.google.com/file/d/1_bupOIqog0XOCUmjYXEt5EIYZQ387zEB/view?usp=drive_link

Images:

  1. Use Raw Printing section to enable raw_print and set printer language through select field.
    Screenshot 2024-06-20 at 11 53 23 PM

  2. Then select an element to give raw cmd before/ after action for selected element.
    Screenshot 2024-06-20 at 11 53 41 PM

  3. You can write raw cmd by selecting 'custom' option.
    Screenshot 2024-06-20 at 11 53 52 PM

maharshivpatel and others added 17 commits June 28, 2024 10:53
signature field is saved as base64 encoded string in the database.
i just added img tag and set the src attribute to the base64 encoded string.
* refactor(minor): call whitelisted method to get meta

using with_doctype stores meta in localstorage which causes it to be full and is not required to replaced it with get_meta method in print designer

* fix: send dynamicField instead of field.

some keys are not in the field object such as parentField, so we need to send the dynamicField object instead.
from rectangle removed relative-column as there isn't any flex related css for column
adding that class caused border to be removed when it was applied from rectangle class.

also, added filter to remove classes getting added multiple times.
1. Add conditions
2. Add prompt before changing header/footer height as 0 if element present
3. Check if selected element is child
4. Add save raw_print related progress
feat : properties and ElementStore changes
feat : img render/ set rawLang to Mainstore
feat : Add validation on save to check that language is selected
@IamSaiyyamChhetri
Copy link
Author

Demo Video:

Covers:

  1. New Select field with white, black option for Text/ Border.
  2. Throw error if Raw Cmd Language is not selected
  3. Check if Element is overlapping from top/ bottom
  4. Save Changes

https://drive.google.com/file/d/1CHmxALFgZ_LyQdvCawMdMAJ8voQHoJ7p/view?usp=sharing

@phot0n
Copy link

phot0n commented Jul 17, 2024

@IamSaiyyamChhetri a few problems:

when selecting continuous roll option as the paper type, i can still fiddle around with page height - that should be set to auto and should not be allowed to change/change automatically?

Screencast.2024-07-17.14.36.50.mp4

have yet to test if printing with this works as expected or not but I tried out some stuff yesterday and things didnt work properly - every element when printed was coming up on the same (horizontal) line/row unlike the design (shown in the video) - maybe I'm missing something?

@phot0n
Copy link

phot0n commented Jul 18, 2024

also, the format looks different in the editor mode v/s the print mode

image

notice how there is extra padding in the print mode.
Thought maybe my print settings might be conflicting with this so i edited them and things still seem to be the same

image

This is how the print of that format looks like:

photo_2024-07-23_10-19-33

@maharshivpatel
Copy link
Collaborator

@phot0n page size is correct. styles are not applied to the table

@IamSaiyyamChhetri
Copy link
Author

Hi @maharshivpatel / @phot0n ,
Do let me know if any changes is required from my end.

@phot0n
Copy link

phot0n commented Jul 23, 2024

@IamSaiyyamChhetri I've mentioned the major problems in the above comments ...did you get a chance to work on them?

@phot0n
Copy link

phot0n commented Jul 24, 2024

the state management of the raw printing command also seems wonky

Screencast.2024-07-24.10.02.14.mp4

note how the command placement (before -> after) changed for all the elements in the designer

@IamSaiyyamChhetri
Copy link
Author

IamSaiyyamChhetri commented Jul 24, 2024

Hi @phot0n,
Please make a list of all your queries, we'll get into a call to close it .
Also share your point in advance, before getting into a call.

@phot0n
Copy link

phot0n commented Jul 26, 2024

fixed some stuff and the print(s) have started to come a bit cleanly and the full cut seems to be working (not really sure about the partial cut as both seemed to cut the same amount of length) ..there are still a few issues remaining

image

@maharshivpatel
Copy link
Collaborator

As it was discussed on call with different contributors in order to merge this PR we need at-least 90% of compatibility. if user is designing something in Print designer they should be able to print the same with thermal printer.

In the last call when we reviewed this images, css styles, fonts were not working at all. please fix this issues and if they are not required then disable them when raw_printing_mode is enabled. users expect to have 1-1 relation between design and thermal printing ( at-least majority should be same we can work on edge cases).

PR in this state cannot be merged please make necessary changes. Thank you so much for contributing.

@rmehta
Copy link
Member

rmehta commented Oct 11, 2024

@maharshivpatel does this interfere with existing layouts? If not, let's merge?

@phot0n can you update the branch and move it from Draft?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants