You are viewing the PKP Support Forum | PKP Home Wiki

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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

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: 22
Joined: Mon Oct 22, 2007 11:01 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.

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

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest