Skip to content

Commit

Permalink
update: 添加批量删除注释功能;修复双层pdf bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin2li committed Jul 27, 2023
1 parent 8863135 commit 97fe494
Show file tree
Hide file tree
Showing 17 changed files with 303 additions and 181 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- dev
env:
VERRSION: "1.0.11"
VERRSION: "1.0.12"
jobs:
deploy-macos:
runs-on: macos-latest
Expand All @@ -28,7 +28,7 @@ jobs:
- name: 安装 Python
uses: actions/setup-python@v4
with:
python-version: 3.10.11
python-version: 3.8.10

- name: 安装依赖 && 编译
run: |
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: 安装 Python
uses: actions/setup-python@v4
with:
python-version: 3.10.11
python-version: 3.8.10

- name: 安装依赖 && 编译
run: |
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- name: 安装 Python
uses: actions/setup-python@v4
with:
python-version: 3.10.11
python-version: 3.8.10

- name: 安装依赖 && 编译
run: |
Expand Down
21 changes: 21 additions & 0 deletions annot.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main

func (a *App) AnnotParser(inFile string, outFile string, method string, annotTypes []string, pages string) error {
logger.Printf("inFile: %s, outFile: %s, method: %s, annotTypes: %v, pages: %s\n", inFile, outFile, method, annotTypes, pages)
args := []string{"annot"}
args = append(args, inFile)
args = append(args, "--method", method)
if len(annotTypes) > 0 {
args = append(args, "--annot-types")
args = append(args, annotTypes...)
}
if pages != "" {
args = append(args, "--page_range", pages)
}

if outFile != "" {
args = append(args, "-o", outFile)
}
logger.Println(args)
return a.cmdRunner(args, "pdf")
}
2 changes: 1 addition & 1 deletion build/windows/installer/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "PDF Guru"
#define MyAppVersion "1.0.11"
#define MyAppVersion "1.0.12"
#define MyAppPublisher "Kevin2li"
#define MyAppURL "https://github.com/kevin2li/PDF-Guru"
#define MyAppExeName "PDF Guru.exe"
Expand Down
18 changes: 15 additions & 3 deletions frontend/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
</template>
{{ menuRecord['background'] }}
</a-menu-item>
<a-menu-item key="annot">
<template #icon>
<message-outlined />
</template>
{{ menuRecord['annot'] }}
</a-menu-item>
</a-sub-menu>
<a-sub-menu key="protect">
<template #title>保护</template>
Expand Down Expand Up @@ -212,11 +218,12 @@
<HeaderAndFooterForm v-if="store.selectedKeys.at(0) === 'header'" />
<PageNumberForm v-if="store.selectedKeys.at(0) === 'page_number'" />
<BackgroundForm v-if="store.selectedKeys.at(0) === 'background'" />
<!-- <MetaForm v-if="store.selectedKeys.at(0) === 'meta'" /> -->
<MetaForm v-if="store.selectedKeys.at(0) === 'meta'" />
<DualLayerForm v-if="store.selectedKeys.at(0) === 'dual'" />
<PasswordCrackForm v-if="store.selectedKeys.at(0) === 'crack'" />
<SignForm :width="400" :height="200" v-if="store.selectedKeys.at(0) === 'sign'" />
<Debug :width="400" :height="200" v-if="store.selectedKeys.at(0) === 'debug'" />
<SignForm v-if="store.selectedKeys.at(0) === 'sign'" />
<AnnotForm v-if="store.selectedKeys.at(0) === 'annot'" />
<Debug v-if="store.selectedKeys.at(0) === 'debug'" />
</div>
</div>
</a-col>
Expand Down Expand Up @@ -265,6 +272,7 @@ import {
HomeOutlined,
EditOutlined,
StarOutlined,
MessageOutlined,
createFromIconfontCN,
} from '@ant-design/icons-vue';
Expand Down Expand Up @@ -294,6 +302,7 @@ import DualLayerForm from "./components/Forms/DualLayerForm.vue";
import PasswordCrackForm from "./components/Forms/PasswordCrackForm.vue";
import Index from "./components/Forms/Index.vue";
import SignForm from "./components/Forms/SignForm.vue";
import AnnotForm from "./components/Forms/AnnotForm.vue";
import Debug from "./components/Forms/Debug.vue";
import { useMenuState } from './store/menu';
Expand Down Expand Up @@ -342,6 +351,7 @@ export default defineComponent({
HomeOutlined,
EditOutlined,
StarOutlined,
MessageOutlined,
IconFont,
// form
// 合并
Expand Down Expand Up @@ -394,6 +404,8 @@ export default defineComponent({
Index,
// 电子签名
SignForm,
// 注释
AnnotForm,
// 调试
Debug,
},
Expand Down
Loading

0 comments on commit 97fe494

Please sign in to comment.