Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get info about encrypted file #123

Open
Lahorde opened this issue Dec 30, 2017 · 2 comments
Open

Cannot get info about encrypted file #123

Lahorde opened this issue Dec 30, 2017 · 2 comments

Comments

@Lahorde
Copy link

Lahorde commented Dec 30, 2017

I tried to get pdf info from file given as attachment STM32HitexRefManual.pdf

Here is info returned :

{'/CreationDate': '(ÅÔh\x0cw\x1dx¡\x01dXe\x91\x80\x8cÖí`Óän\x8eâÕÜèLºALj\x8e\x8bGôáæM\x99+$\x02\x8bYÞ\x89ð0)', '/Author': '(±\x1boézðdY\x94}¯\x894\x10Ù±å\x91\x13Òº±\x8eÚ<ìÕù\x94ÜÈy)', '/Creator': '(Îü\x84Wrbz\x9
0´,y¥þy\x89eÀG¥Øý\x15Z\x833Í\t,\x90\\)Ð<6\x97\x92 8\x98\x80|¼ZdbÀ\x9fa1)', '/Producer': "(÷ï\x07\\\\fF\x15Ã\x07o\x02ïTú¯ß¬\x12Q\x07?ÓJONå«ÖÜ«\x85Ö8Û³É\x8d'FËS\x0f>\x86\x075r\x93\x15¢ÿÑ-ªÑÌC¾i?\x84ÌU@)", '/ModDat
e': "(Ï¡\x10\x85\\)ÝeQ\x9f\x86\tHýAdʾŷ¶®¨õT\tÔ\x8aLc\x94Ã,©`\x10\x175ÉLr\x97'\x9bÎft\x84;)", '/Title': '(·#ݨS½ù7\x19\x88\x03\x85°Ün\x04Q\x7f\x1a=þDÏ\x14àò+H\x1e\x83ù\x89ËWr¿c\x95¸\x15\x03\x03»G<ær#U\x9cé$¶¡\x
170\x0b\x94\x13=y§\x00)'}

Info is encrypted, from pdfrw doc, I read :

The examples directory has a few scripts which use the library. Note that if these examples do not work with your PDF, you should try to use pdftk to uncompress and/or unencrypt them first.

Would it be possible to handle encrypted files as pdfinfo does?

pdfinfo STM32HitexRefManual.pdf 
Title:          Microsoft Word - ISGSTM32-v18d-fu.doc.docx
Author:         Fuller
Creator:        PScript5.dll Version 5.2.2
Producer:       Acrobat Distiller 7.0.5 (Windows)
CreationDate:   Thu Oct 22 15:48:02 2009 CEST
ModDate:        Fri Oct 23 13:25:51 2009 CEST
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          106
Encrypted:      yes (print:no copy:no change:no addNotes:no algorithm:AES)
Page size:      595.276 x 841.89 pts (A4)
Page rot:       0
File size:      4396418 bytes
Optimized:      yes
PDF version:    1.6
@JorjMcKie
Copy link
Collaborator

JorjMcKie commented Dec 30, 2017 via email

@Lahorde
Copy link
Author

Lahorde commented Jan 7, 2018

To get PDF title from python with encrypted files, I called pdfinfo from python code, code is here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants