EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SBB -> OS X: Could not get signature properties from signed PDF

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#36647
Posted: 05/05/2016 04:49:24
by Martin Icha (Premium support level)
Joined: 10/31/2014
Posts: 9

Hello, I am unable to get any "valid" signature properties from signed PDF. I use the code bellow and I get only empty strings :-(

Code
    std::fstream fs;
    fs.open(path.UTF8String, std::ios::binary | std::ios::in | std::ios::out);
    
    if(!fs.is_open())
        return;
    
    try
    {
        SecureBlackbox::TElPDFDocument pdf(NULL);
        SecureBlackbox::TElCallbackStream cs(fs);
        pdf.Open(cs);

        signaturesCount = pdf.get_SignatureCount();
        for(int i = 0; i < signaturesCount; i++)
        {
            SecureBlackbox::TElPDFSignature* signature = pdf.get_Signatures(i);
            std::string signatureName = "";
            
            NSLog(@"%s", signatureName.c_str());
            pdf.get_SignatureCustomDataName(signatureName);
            NSLog(@"%s", signatureName.c_str());
            signature->get_Reason(signatureName);
            NSLog(@"%s", signatureName.c_str());
            signature->get_SignatureName(signatureName);
            NSLog(@"%s", signatureName.c_str());
            signature->get_AuthorName(signatureName);
            NSLog(@"%s", signatureName.c_str());
            signature->get_ContactInfo(signatureName);
            NSLog(@"%s", signatureName.c_str());
        }
        pdf.Close(false);
    }
    catch (SecureBlackbox::SBException E)
    {
        std::cout << "FillPDFProperties failed: " << E.what() << std::endl;
    }
#36649
Posted: 05/05/2016 05:28:28
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us,

The properties that you are trying to read should be populated.
Could you please post a sample pdf document for which you are failing to read those properties. Please use Helpdesk ( https://www.eldos.com/helpdesk/ ) to post the documents to us privately.
Also, please try to convert a string from UTF8 encoding, as follows:
Code
NSLog([NSString stringWithUTF8String:signatureName.c_str()]);
#36650
Posted: 05/05/2016 08:18:54
by Martin Icha (Premium support level)
Joined: 10/31/2014
Posts: 9

Ok, I just created a Helpdesk ticket with those PDFs.

Reply

Statistics

Topic viewed 743 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!