File preview (binocular) content

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
rkarthy
User
Posts: 39
Joined: Mon Feb 11, 2008 12:49 pm
Location: Wakefield, MA, USA

File preview (binocular) content

Post by rkarthy » Wed Nov 07, 2012 11:24 am

Hi,

How do I get the file preview content (resume preview showed in the Binocular tool) using the WebServices API? I want to use this info for my Candidate's Description field.

Thanks,
Karthik
Karthik
Randstad USA

c.choy
User
Posts: 49
Joined: Wed Dec 31, 1969 8:00 pm

Re: File preview (binocular) content

Post by c.choy » Wed Nov 07, 2012 11:48 am

Usually the binoculars refer to the description field of the candidate.

However, you're more likely looking to grab the file contents of an attached resume. You'll want to identify the file by getEntityFiles, and then you can use getFile to actually get the contents of the file.

The returned contents will be binary(base64), so you'll need to convert that to a string for you to place in the description field.

Hope that helps

rkarthy
User
Posts: 39
Joined: Mon Feb 11, 2008 12:49 pm
Location: Wakefield, MA, USA

Re: File preview (binocular) content

Post by rkarthy » Wed Nov 07, 2012 12:43 pm

If you check the binocular preview in the candidate search result, it'll refer the candidate description field. But if you check the binocular in the "Files" tab result, it shows the entire resume in HTML format.

The WebService API's "ResumeParsing" metod returns only hrXML result. So we have to manually convert this hrXML to HTML using XSLT and update it on the candidate's description field. But It'll loose the original resume formatting. I want to avoid that. That's why I'm searching for a way to get the "Binocular Preview (HTML)" data from the "Files" tab section and use it for my candidate's description field.

Any idea?
Karthik
Randstad USA

c.choy
User
Posts: 49
Joined: Wed Dec 31, 1969 8:00 pm

Re: File preview (binocular) content

Post by c.choy » Thu Nov 08, 2012 5:50 pm

Hi,

So I would not use the output of the hrXML result at all to store into the resume field of candidate record. That hrxml is more useful for mapping the contents to specific fields on the candidate/education/work history dto, such as address, name, etc.

I would actually just read in the contents of the file (resume) as a string (apparently utf-8) and place that into the Resume field for the candidatedto. Depending on how you read in the content, it should also take in any formatting codes that's in the file and just have that included in the string.

Bullhorn might not be able to render all the formatting, but it'll handle some.

Sorry for some of the confusion, I apparently just read your intial post too quickly and did not note that you were referring specifically to the preview off the files page. My apologies.

rkarthy
User
Posts: 39
Joined: Mon Feb 11, 2008 12:49 pm
Location: Wakefield, MA, USA

Re: File preview (binocular) content

Post by rkarthy » Fri Nov 09, 2012 10:37 am

FYI. I've tried the following code but it's having some invalid characters and got failed to update it on BH.

File.ReadAllText(filePath, System.Text.Encoding.UTF8);

Do you have any other sample code that shows how to read the formatted resume Contents? I'm using ASP.NET with C#.
Karthik
Randstad USA

c.choy
User
Posts: 49
Joined: Wed Dec 31, 1969 8:00 pm

Re: File preview (binocular) content

Post by c.choy » Mon Nov 12, 2012 5:51 pm

Unfortunately not. I have some code that will handle a plaintext file, but that's not what you're looking for, and it sounds like you've already reached that part.

I dug around and we use tm-extractors (http://mvnrepository.com/artifact/org.t ... extractors), and fall back to the commercial Aspose (http://www.aspose.com/). Both have native Java APIs

Not sure of an equivalent for C#, but hopefully that'll help to get you started.

Post Reply