Embeding a file

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 22
Joined: Mon Oct 22, 2007 11:01 am

Embeding a file

Postby sarangi » Wed Dec 12, 2007 9:23 am

How do I use the embed tag in the xml file to import the articles?
What are the different attributes of the tag referring to and what is the text in between opening and closing tag?

Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: Embeding a file

Postby jmacgreg » Wed Dec 12, 2007 11:28 am

Hi Sarangi,

To use the embed tag, you'll have to base64 encode your HTML or PDF file. Base64 encoding can be used in conjunction with an XML file to embed binary data. You'll have to find a way to encode your pdf into base64, but there are online tools available -- check out, for example, http://www.google.ca/search?hl=en&q=bas ... arch&meta=

The base64 encoded text (which looks like a stream of characters, like PGxpPjxCPlc8Zm9udCBzaXplPS0xPkVJTkVSPC9mb250PjwvQj4sIEU ... etc.) goes between the <embed> tags. So you would have something like

<embed encoding="base64" filename="my_file.pdf" mime_type="application/pdf">PGxpPjxCPlc8Zm9udCBzaXplPS0xPkVJTkVSPC9mb250PjwvQj4sIEU...(and so on)...</embed>

Where the character stream is actually your base64-encoded PDF.


Return to “OJS Technical Support”

Who is online

Users browsing this forum: No registered users and 3 guests