lightpdf-aipdf-mcp 0.1.55__py3-none-any.whl → 0.1.57__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -373,8 +373,13 @@ class Editor(BaseApiClient):
373
373
  # 记录操作描述
374
374
  await self._log_operation("去除PDF文件白边")
375
375
 
376
- # 调用edit_pdf方法处理API请求,去除白边不需要额外参数
377
- return await self.edit_pdf(file_path, EditType.REMOVE_MARGIN, {}, password, original_name)
376
+ # 构建API参数,按照固定格式传递
377
+ extra_params = {
378
+ "pages": [{"url":"oss://autocrop","oss_file":""}]
379
+ }
380
+
381
+ # 调用edit_pdf方法处理API请求
382
+ return await self.edit_pdf(file_path, EditType.REMOVE_MARGIN, extra_params, password, original_name)
378
383
 
379
384
  async def edit_pdf(self, file_path: str, edit_type: EditType, extra_params: Dict[str, Any] = None, password: Optional[str] = None, original_name: Optional[str] = None) -> EditResult:
380
385
  """编辑PDF文件
@@ -221,6 +221,13 @@ async def process_edit_file(
221
221
  password=password,
222
222
  original_name=original_name
223
223
  )
224
+ elif edit_type == "remove_margin":
225
+ # 直接调用remove_margin方法,不需要额外参数
226
+ return await editor.remove_margin(
227
+ file_path=file_path,
228
+ password=password,
229
+ original_name=original_name
230
+ )
224
231
  else:
225
232
  return EditResult(
226
233
  success=False,
@@ -857,7 +864,7 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
857
864
  "param_keys": ["rotates"] # 只需要rotates参数,移除对旧格式的支持
858
865
  },
859
866
  "remove_margin": {
860
- "edit_type": "edit", # 编辑类型
867
+ "edit_type": "remove_margin", # 编辑类型
861
868
  "is_edit_operation": True, # 标记为编辑操作
862
869
  }
863
870
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightpdf-aipdf-mcp
3
- Version: 0.1.55
3
+ Version: 0.1.57
4
4
  Summary: MCP Server for LightPDF AI-PDF
5
5
  Author: LightPDF Team
6
6
  License: Proprietary
@@ -0,0 +1,9 @@
1
+ lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
2
+ lightpdf_aipdf_mcp/common.py,sha256=-7LU6gm-As_F8Ly68ssy15Vc9Zt_eNSnvDLEtVZDwlI,6633
3
+ lightpdf_aipdf_mcp/converter.py,sha256=d90pNUT8pQn93u1fJSlu4f2KyLDzhOdTrqyBkSTRFBE,14450
4
+ lightpdf_aipdf_mcp/editor.py,sha256=krnbUnILN3v5fbepsx88thoQkpmkYHXkhHTiIwC8-a0,24727
5
+ lightpdf_aipdf_mcp/server.py,sha256=57oQ2wBOF6ajJs67q41w3MNjrIiYaOf3Z_LJ17OC7Ag,43306
6
+ lightpdf_aipdf_mcp-0.1.57.dist-info/METADATA,sha256=cebBp7rWZ834MRE8Dz7SI9cHwyYLOEkCBAMdoPKgtR4,7826
7
+ lightpdf_aipdf_mcp-0.1.57.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ lightpdf_aipdf_mcp-0.1.57.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
9
+ lightpdf_aipdf_mcp-0.1.57.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
2
- lightpdf_aipdf_mcp/common.py,sha256=-7LU6gm-As_F8Ly68ssy15Vc9Zt_eNSnvDLEtVZDwlI,6633
3
- lightpdf_aipdf_mcp/converter.py,sha256=d90pNUT8pQn93u1fJSlu4f2KyLDzhOdTrqyBkSTRFBE,14450
4
- lightpdf_aipdf_mcp/editor.py,sha256=hwj_wR0zjAEH6H7OfYnL9VHUQbVbbRY1cuT8mv-x3oE,24594
5
- lightpdf_aipdf_mcp/server.py,sha256=ZG-JDHpYRRwU0YNnQ8tRUHs0p13vvCN4iry-aYPe800,43035
6
- lightpdf_aipdf_mcp-0.1.55.dist-info/METADATA,sha256=Zb_ZIj1hQ64jAQwcojvrEGM6Qfbt-jeq5vNICnNvgHA,7826
7
- lightpdf_aipdf_mcp-0.1.55.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- lightpdf_aipdf_mcp-0.1.55.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
9
- lightpdf_aipdf_mcp-0.1.55.dist-info/RECORD,,