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

HANA PDF v2.3 #12

Merged
merged 17 commits into from
Dec 7, 2023
Merged

HANA PDF v2.3 #12

merged 17 commits into from
Dec 7, 2023

Conversation

Nicklas373
Copy link
Owner

v2.3 20231207 [HANA PDF]

  • Add logic to prevent laravel crash whenever database eloquent error
  • Add logic to prevent user insert last page more than total PDF page
  • Change how radio button interaction
  • Implement more database insert to record all failed process
  • Implement feature Extract image from PDF
  • Implement feature image to PDF (Convert to PDF)
  • Misc title text update
  • Properly encrypt file to iLovePDF API
  • Slightly change filename naming scheme or format to make it simple and easier to recognize
  • Switch extract pages feature to remove pages on split PDF pages

Do not set to sticky layout, position fixed at the bottom from the layout

Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Orientation 45 → 0 Degrees

Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Title Error Message (allModal) :

“Please choose PDF file !” → “Please choose PDF file!”
“Unsupported file format !” → “Unsupported file format!”

Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Title Headline
- Need bigger font size

Sub Title Headline
- Need smaller font size

Menu Title
- Need smaller font size

Feature List [With title feature card, all pages] :
- Title feature text need bigger font size [Only on mobile]
- Title feature text re-position more down [Only on mobile] [Reference from desktop design]
- Title sub feature text following more down position from title feature [Only on mobile] [Reference from desktop design]

[Compress & Convert Page]
- Title feature text need bigger font size [Only on mobile]
- Title feature text re-position more down [Only on mobile] [Reference from desktop design]
- Title sub feature text following more down position from title feature [Only on mobile] [Reference from desktop design]

Convert Page:
1. Convert To PDF
 - Title Page
   * “PDF Convert” → “Convert to PDF”
2. Convert From PDF
 - Title Page
   * “PDF Convert” → “Convert From PDF”
3. HTML To PDF
 - Title Page
   * “HTML To PDF” → “HTML to PDF”

Reference:
- Sanity testing [UX] at 18 November 2023

Related Change:
- resources/views/includes/header.blade.php
- resources/views/layouts/default.blade.php
- resources/views/pages/cnvFromPDF.blade.php
- resources/views/pages/cnvMain.blade.php
- resources/views/pages/cnvToPDF.blade.php
- resources/views/pages/compress.blade.php
- resources/views/pages/htmltopdf.blade.php
- resources/views/pages/merge.blade.php
- resources/views/pages/split.blade.php
- resources/views/pages/watermark.blade.php
- resources/views/pages/welcome.blade.php

Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
- Function sub title [selected pages] change color to softest → Reference from Watermark PDF page
- Error message “First page can not more than last page” → “First page can’t be more than last page”

Reference:
- Sanity testing [UX] at 18 November 2023

Related Change:
- public/ext-js/kao-main.js
- resources/js/kao-logic.js

Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
All radio button need to re-mapping with this condition:

Element that wrapping radio button with text should can be clicked and trigger radio to selected, with hover interactively change after it

Everytime hover move to some of radio button or element that wrap it up, that element with radio button should run the hover function alternatively

kao-main should be re-written [RE-FACTORING] to make it simple and keep optimize from this changes

Related changes:

- All layout with radio button
- kao-main.js
* BE-001: Filename formatting
Slightly change filename naming scheme or format to make it simple and easier to recognize

suffix template:
- pdf_compress_8code.pdf [format: feature-title_8code.ext]

khusus split:
- pdf_split_8code_page-n [format: feature-title_8code_page-n.ext]

* BE-002: More database record implementation
Implement more database insert to record all failed process;
[ Some of process still are not record to database, when error are not came from API process or main process ]

Within this condition, the process id can be still generated if the process error. But it can’t be traced on DB, because it wasn’t inserted in any chance.

Add more insert logic to DB on this condition, will make logging more advanced and easier to trace

[Should be applicable on all controllers]

* BE-003: Add logic to prevent laravel crash whenever database eloquent error
In some case, laravel app got some crash when database eloquent process fail.

Due unprotected run process, database eloquent may stop the laravel and return error 500 [Internal Server Error].

Resolution:
- Create try catch logic to prevent laravel app crash, whenever eloquent logic fail. And return error message to user with exact error or simple unified message error

* BE-004: Properly encrypt file to iLovePDF API
All file that was send by using iLovePDF API are not encrypted by default, and could possibiity with security leaks issue, iLovePDF API itself already use JWT token with full SSL encryption. But better to protect more

Possibility Issue:
- Security leaks
- Data breach while POST to iLovePDF API
- Task can be tracked if task id can be trace, due task are not automatically removed after process [2 Hours after task started, it will automatically deleted]

Resolution:
- Include some iLovePDF API flags to enable encryption
- Include some iLovePDF API flags to auto delete task after download process complete
- Need to apply to all controllers that access iLovePDF API POST
- Need to create dynamic encryption key that always change whenever task start
…F page

Background:
In some scenario user may input last page for split more than total pdf page, that case aren’t stopper and not make any error from the apps. But it can be complain from user due different number page that already inserted before, ilovepdf logic will auto limit last page whenever user input page more than total pdf page.

Possibility Issue:
- PDF still processed, but selected page if more than total pdf pages aren’t processed

Resolution:
- Get total PDF page from uploaded file, then throw back to split page as separate response variable. So it can be user from kao-logic to prevent user input variable more than that.

Related Changes:
- resources\js\kao-logic.js
- resources\views\pages\split.blade.php
Switch extract pages feature to remove pages on split PDF pages

Split PDF
- Delete page (Remove pages → switch from extract pages)

References:
- https://developer.ilovepdf.com/docs/guides/split-pdf-api
Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
@Nicklas373 Nicklas373 added bug Something isn't working enhancement New feature or request dependencies Pull requests that update a dependency file labels Dec 7, 2023
@Nicklas373 Nicklas373 self-assigned this Dec 7, 2023
@Nicklas373 Nicklas373 merged commit 73c2bbb into master Dec 7, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant