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 in AWS by Manav
• 120 points
140 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 by MD
• 24,500 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,150 points
8,089 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
593 views
0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14, 2019 in AWS by athenauserz
3,098 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
• 57,530 points
774 views
0 votes
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
• 57,530 points
1,554 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,670 points
947 views
0 votes
2 answers
0 votes
1 answer