Skip to content

PDF Portfolio attachments display order #1030

Answered by JorjMcKie
erand96 asked this question in Q&A
Discussion options

You must be logged in to vote

I have made a few changes to PyMuPDF's embedded files handling.
Note that the portfolio information for each embedded file is contained in object encoded in xref "collection".
If you look at this example file, the following things will be possible in v1.18.13:

>>> doc=fitz.open("portfolio-sample.pdf")
>>> n=doc.embfile_count()
>>> from pprint import pprint
>>> for i in range(n):
	pprint(doc.embfile_info(i))
	print("-"*10)

	
{'checksum': b'c59313c2a309cb9a235fe2809464c39266c3bc',
 'collection': 50,
 'creationDate': "D:20120928172443-04'00'",
 'desc': '',
 'filename': 'facility_budget.xlsx',
 'length': 9633,
 'modDate': "D:20120928172458-04'00'",
 'name': '<0>facility_budget.xlsx',
 'size': 

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@erand96
Comment options

@JorjMcKie
Comment options

@erand96
Comment options

@JorjMcKie
Comment options

Comment options

You must be logged in to vote
1 reply
@erand96
Comment options

Answer selected by erand96
Comment options

You must be logged in to vote
2 replies
@erand96
Comment options

@JorjMcKie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants