PDF has an error after set permission

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

PDF has an error after set permission

Post by edvschu »

Hello,

after set permisson with Core Api, the pdf has following error: The required values were not found in the last trailer. I use Build 6.0.322.7 of Core Api.

Code: Select all

Dim pDoc As PDFXCoreAPI.IPXC_Document = pdfInst.OpenDocumentFromFile(sFilePath, Nothing, Nothing, 0, 0)
Dim nPermission As UInteger = CType(PDFXCoreAPI.PXC_SecurityPermissions.Permit_Printing + PDFXCoreAPI.PXC_SecurityPermissions.Permit_HighQualityPrinting, UInt32)
pDoc.SetStdEncryption(PDFXCoreAPI.PXC_StdEncryptionMehtod.SEM_AV10, True, nPermission, sUserPassword, sOwnerPassword)
pDoc.WriteToFile(sFilePath & ".pdf")
pDoc.Close()
Do it with PDF Editor, pdf has no error. Can be check whether the PDF is already flawed? Attached PDF is before set permission.

Best Regards,
edvschu
Attachments
Sample.pdf
(6.05 KiB) Downloaded 137 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: PDF has an error after set permission

Post by Sasha - Tracker Dev Team »

Hello edvschu,

I've reproduced this behavior - will investigate and reply with the results.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: PDF has an error after set permission

Post by edvschu »

Hello,

are there any new results?

Best Regards,
edvschu
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: PDF has an error after set permission

Post by Sasha - Tracker Dev Team »

Hello edvschu,

We've fixed this - the fix itself will be available from the next release (should be in less then a week or so).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply