How to get the number of pages in a pdf file present in s3

0 votes
I am using a python lamda function to add a file in s3.
Before adding the file in my s3, i would like to know the file size, number of pages info
How can i check that ?
May 2, 2020 in AWS by Manav
• 120 points
3,242 views

1 answer to this question.

0 votes

Hi@Manav,

To know about information about pdf file, you can use pdfinfo command in linux as follows.

[root@localhost Desktop]# pdfinfo Resume.pdf                                                                            
Title:          xxxxxxxxxxxx                                                                                 
Creator:        PDFescape Online - https://www.pdfescape.com                                                            
Producer:       RAD PDF 3.11.0.0 - https://www.radpdf.com                                                               
CreationDate:   Thu Oct 31 07:27:04 2019 EDT                                                                            
ModDate:        Thu Oct 31 07:30:47 2019 EDT                                                                            
Tagged:         no                                                                                                      
UserProperties: no                                                                                                      
Suspects:       no                                                                                                      
Form:           none                                                                                                    
JavaScript:     no                                                                                                      
Pages:          2                                                                                                       
Encrypted:      no                                                                                                      
Page size:      612 x 792 pts (letter)                                                                                  
Page rot:       0                                                                                                       
File size:      33130 bytes                                                                                             
Optimized:      no                                                                                                      
PDF version:    1.4  

Hope this will help.

answered May 3, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,170 points
19,887 views
0 votes
0 answers

I want to get file name from key in S3 bucket wanted to read single file from list of file present in bucket

1 <class 'boto.s3.key.Key'> <Key: numbers-email, staging/Procured_Numbers_Status/procured_numbers_status_2019-05-15:06:09:04.csv> I ...READ MORE

May 15, 2019 in AWS by anonymous
6,971 views
0 votes
0 answers

How to host a stic website of S3 in the aws ECS?

The keycloak programme is operating on my ...READ MORE

Dec 22, 2022 in AWS by Tejashwini
• 3,820 points
1 flag 648 views
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 58,020 points
6,012 views
–1 vote
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 58,020 points
5,233 views
0 votes
1 answer

Import my AWS credentials using python script

Using AWS Cli  Configure your IAM user then ...READ MORE

answered Nov 16, 2018 in AWS by Jino
• 5,820 points
2,884 views
0 votes
2 answers
0 votes
1 answer

How to get the contents of a folder in an AWS CodeCommit repository?

Hi@akhtar, The following get-folder example demonstrates how to get the ...READ MORE

answered Nov 25, 2020 in AWS by MD
• 95,460 points

edited Aug 4, 2023 by Khan Sarfaraz 2,782 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP