omkar-mohanty / vortex

A tool to extract images from pdf files
MIT License
52 stars 7 forks source link

Fail with PDF Mask #3

Open maxpowel opened 4 months ago

maxpowel commented 4 months ago

I am getting this error while processing the attached PDF:

thread 'main' panicked at /media/storage/vortex/src/writer/mod.rs:36:13:
source slice length (23040) does not match destination slice length (69120)

In the file https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf page 222 there is a little description about it.

64af47b29f64b55351577766.pdf

Looks that the image contains another image wich is the mask applied to the first one. The PDF contains two images that should look like this 0 1

It is weird that the content size does not match the width X height but all PDF viewers I tested, open and show correctly the images so I guess that the PDF is correct.

omkar-mohanty commented 4 months ago

Hi sorry I couldn't respond in the past few days. I'll take a look into this