Welcome Guest Search | Active Topics | Sign In | Register

Invalid Password Error On Create PDF from Html Options
adam heeg
Posted: Thursday, March 31, 2022 8:29:38 AM
Rank: Newbie
Groups: Member

Joined: 8/5/2016
Posts: 5
I'm getting an error that doesn't make sense on certain files being passed into the Pdf constructor. EO library is throwing an "Invalid Password" error when i pass a memory stream of this file to the new Pdf constructor.

We use this code in production on many clients and this seems to be a rather new issue. I have a sample html i can supply that reproduces the issue for me. We are on EO Total 2021 the dll shows EO.Pdf.21.1.11.

It doesn't look like I can attach anything here, please help.
eo_support
Posted: Thursday, March 31, 2022 6:31:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

When you pass a Stream to the file, make sure that the stream's Position is correct. This is because the code reads the stream starting from its current position. For example, if the PDF content starts from the begining of the stream and when you pass the steam to the library and current position is half way in the middle, then you will get an error since it can't find the PDF file header.

If that's not the problem, please send us the test files and we will check it here. See here for more details on how to send files to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.