aspose-pdf-cloud / aspose-pdf-cloud-python Goto Github PK
View Code? Open in Web Editor NEWPython library for communicating with the Aspose.PDF Cloud API
License: MIT License
Python library for communicating with the Aspose.PDF Cloud API
License: MIT License
bb
I am very new to this but need to apply a white redaction box to multiple pages in a document. The position and size of the redaction area can change from document to document as can the number of pages so a box will have to be drawn around one area with instruction to repeat the mark across all pages.
Does anyone have a simple way to do this ?
The README says that I can create an API client in the following way:
# Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required). pdf_api = asposepdfcloud.PdfApi('MY_CLIENT_ID', 'MY_CLIENT_SECRET') file_name = 'PdfWithAnnotations.pdf' page_number = 2 response = pdf_api.get_page_annotations(file_name, page_number, folder=temp_folder)
but the PdfApi
has the following init:
class PdfApi(object): def __init__(self, api_client=None): ...
I tried passing in the ApiClient
then, but the ApiClient
takes an app_key
and app_sid
, which I haven't been able to find on the Aspose website after registering and creating an application. I tried using my client ID and client secret for these arguments, respectively, but I get an invalid client error, so I suspect that I didn't create the client correctly.
asposepdfcloud.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Date': 'Sat, 20 Mar 2021 22:05:00 GMT', 'Content-Type': 'application/json; charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Set-Cookie': 'AWSALB=GEPeXFXylmkX26v1qIjS7hP9twmsQm6aYh0INhQ4x8rCSmtPTfdUILgfMq+QPyqQlXgznQ9VvLp1f/LcBCUlXncp1UYUY8G/C4uXNCjCnFlgmKh3mcbz4QvrSTJI; Expires=Sat, 27 Mar 2021 22:05:00 GMT; Path=/, AWSALBCORS=GEPeXFXylmkX26v1qIjS7hP9twmsQm6aYh0INhQ4x8rCSmtPTfdUILgfMq+QPyqQlXgznQ9VvLp1f/LcBCUlXncp1UYUY8G/C4uXNCjCnFlgmKh3mcbz4QvrSTJI; Expires=Sat, 27 Mar 2021 22:05:00 GMT; Path=/; SameSite=None; Secure, .Prj.Customer=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax, .Prj.Customer=1c681fac-b5ae-4078-bede-29c25d3578dc; expires=Sun, 20 Mar 2022 22:05:00 GMT; path=/; samesite=lax; httponly', 'Cache-Control': 'no-store, no-cache, max-age=0', 'Pragma': 'no-cache'})
HTTP response body: {"error":"invalid_client"}
Any suggestions on how to proceed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.