OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



importing pdf with xml

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.

importing pdf with xml

Postby sarangi » Tue Dec 11, 2007 9:57 am

I have a pdf file for the article that I'm importing. Below the xml snippet that is being used to get the file into OJS. But after everything is imported and I go into OJS to try to view the pdf, it comes up as corrupted file.

<galley>
<label>text</label>
<file>
<embed encoding="base64" filename="528.pdf" mime_type="application/pdf"></embed>
</file>
</galley>


Could you tell me what mistake am I making here? Also the file 528.pdf is in the same folder as the xml file I have used for importing articles.
sarangi
 
Posts: 22
Joined: Mon Oct 22, 2007 11:01 am

Re: importing pdf with xml

Postby jmacgreg » Tue Dec 11, 2007 12:10 pm

Hi Sarangi,

You may find the following post helpful:

viewtopic.php?f=2&t=590&p=1751&hilit=embed#p1751

Since your pdf file is stored in the same place as the xml file rather than embedded within the xml itself, it looks like you'll need to switch from using the embed tag to an href tag, and point the href to the location of your pdf file.

Take care,

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

Re: importing pdf with xml

Postby sarangi » Tue Dec 11, 2007 12:27 pm

Can the href tag take my local address of my computer? I'm using web bases Article export import plugin.
sarangi
 
Posts: 22
Joined: Mon Oct 22, 2007 11:01 am

Re: importing pdf with xml

Postby jmacgreg » Tue Dec 11, 2007 1:09 pm

Hi Sarangi,

If you use the web-based article import plugin, the href tag will have to point to a web-based URL (as Alec's example says, http, https, ftp, ftps).

If you are using the command-line article import, you can point to local files stored on that server. At a previous institution we typically did this: we stored all ready-to-go files in one particular directory on the server (say /journals/files/); generated the xml file, with href tags pointing to those local files; and then imported the file using the command-line tool.

I don't believe you'll be able to point to files on your home machine, however.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests