dond

PDF appears corrupt in Sandbox

0 votes
I'm running the follow code (segment) and my pdf is showing up garbled on the sandbox using Java API version 10.10.1 I can read the file Consent.pdf using any reader on my workstation, but when it gets to the sandbox site it is showing up as a series of garbled text (starts with @`%PDF-1.3... etc.... CODE SEGEMENT Follows.... EslClient eslClient = new EslClient( API_KEY, API_URL ); InputStream myPDF = null; myPDF = Hello.class.getResourceAsStream( "/Consent.pdf" ); DocumentBuilder db = DocumentBuilder.newDocumentWithName("Consent"); db.withDescription("Sample Consent Document"); db.fromStream(myPDF, DocumentType.PDF); db.withSignature(sig); Document d1 = db.build(); PackageBuilder pb = PackageBuilder.newPackageNamed("Don Sample Package Friday Oct 16"); pb.withSigner(s); pb.withDocument(d1); DocumentPackage dp = pb.build(); PackageId id = eslClient.createPackage(dp); eslClient.sendPackage(id);

Reply to: PDF appears corrupt in Sandbox

0 votes
Hey dond, What is in this "Hello.class" where you're grabbing the resource as a stream?

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: PDF appears corrupt in Sandbox

0 votes
Hello.class is just the driver that has the java main() method and instantiates the object that has the Silanis calls... basically just a container that points to the code segment I included. I got a handle to the input stream a couple of ways... they both seem to be successfully able to find the file as a valid (non-null) input stream.

Reply to: PDF appears corrupt in Sandbox

0 votes
I emailed you directly asking for you to send me a document that you're having issues with. :)

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: PDF appears corrupt in Sandbox

0 votes
I am seeing the same thing as you, when I use your PDF file. If I open the PDF you sent me and re-print to PDF from my machine, it loads into eSL, just fine. The issue would appear to be with the tool that you are using to create the PDF not being recognized by eSL. I will talk to support about it. I have sent you a re-printed version of the PDF to try.

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Reply to: PDF appears corrupt in Sandbox

0 votes
Thanks Michael! Reprinted the PDF and saving the resulting PDF seems to have done the trick, and I can successfully submit these docs to the Java API and see them in the Silanis sandbox now!! It feels like it MAY be a bit of a bug in the API, since I can open those documents in other PDF reading type applications.

Reply to: PDF appears corrupt in Sandbox

0 votes
It also uploads, just fine, with the UI, so there's definitely an issue in there, somewhere. I have passed the information to support and they will look into it, with R&D. Glad we were able to get around it, for now. :)

- Michael Partner and Developer Technologies Manager, OneSpan Facebook - Twitter - LinkedIn


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off