Problem with XML import and blank PDFs

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
The Public Knowledge Project Support Forum is moving to

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: 3
Joined: Wed Nov 23, 2005 6:35 am
Location: Cape Town, South Africa

Problem with XML import and blank PDFs

Postby jipser » Wed Nov 23, 2005 7:12 am

Hello All,

I have recently installed OJS-2.0.2 as an interface to articles published at an colloquium. As such, I would like to upload pdf versions of the slides presented at the colloquium to a single journal that I have created for this purpose. I need to do this on a once-yearly basis, as the colloquium takes place annually.

I believe that the fastest way of importing articles into the OJS system is to use the XML import plugin. Unfortunately, when I import the document, as linked using embed tags within a XML file (the contents of which I have pasted below), I am presented with a blank pdf document (with a file of 0 bytes) when I select an article.

As far as I can tell, the usual suspects for problems of this nature are not to blame here: (1) The PHP safe mode directive is not activated, (2) the owner (and everybody else at the moment) have read, write and execute permissions enabled for the directory in which the articles are stored, as well as their parent directories.

Would anyone have any idea what the problem might be? At the moment, the only way I have managed to import a pdf document has been through the web interface. This is obviously not a viable alternative for what will amount to the importation of 100's of documents.

Another question I have is whether it is true, as suggested in the native.dtd document, that one can only import a maximum of 3 articles at a time when using the XML import facility?

I would be grateful for any help that someone could provide me.

Jonathan Ipser

P.S. The system I am using has Linux (Debian 2.4.6) installed on it, should that be of any help.

--------xml import document follows

<!DOCTYPE articles>

<title>SEA-ORCHID Project -- South East Asia: Optimising Reproductive and Child Health Outcomes in Developing Countries </title>
<embed filename="O14McDonald.pdf" mime_type="application/pdf"/>
Objective: The SEA-ORCHID project aims to find out if the health of mothers and babies in Thailand, Indonesia, the Philippines and Malaysia can be improved by increasing the capacity for research synthesis, improving the implementation of effective interventions and identifying gaps in knowledge needing further research.

Methods: The project is an interrupted time series comprising three phases over five years across seven centres (three in Australia and four in South East Asia). The project partners are all members of the Cochrane Collaboration and the project both extends and benefits from the existing Cochrane network. The pre-intervention phase (2004-2005) consists of measuring current practice and associated health outcomes for several important conditions in pregnancy and childbirth at the four SE Asian centres. The intervention phase (2005-2007) is being led by training lecturers based in SE Asia and Australia and consists of training practitioners in evidence-based practice, supporting the preparation of systematic reviews and the development of guidelines, promoting effective dissemination and identifying research priorities. The effect of this intervention will be evaluated in the final phase (2007-2008) by reassessing the practice and outcomes across the same health conditions measured in the pre-intervention phase.

Results: During 2004 the hospitals were selected, the data collection form and web-based collection process piloted and project website established ( Data collection began in early 2005 and we anticipate collecting data on up to 10,000 births by November 2005.

Conclusions: Basing health care practice and policy decisions on evidence ensures the maximal benefit for investment. This is important in all communities but particularly when resources are low and the threats to health are large. This project has the potential to impact significantly on the health of mothers and their babies in South East Asia by improving care during pregnancy and birth.
SEA-ORCHID is jointly funded by the Wellcome Trust, UK and the National Health and Medical Research Council, Australia.
<author primary_contact="true">
<affiliation>Australasian Cochrane Centre</affiliation>
<href src="O14McDonald.pdf" mime_type="application/pdf"/>

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby asmecher » Wed Nov 23, 2005 10:28 am

Hello Jonathan,

The <embed> tag is intended for base64-encoded data -- e.g.

Code: Select all

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

If you don't want to base64-encode your import files, the "href" tag provides an alternative:

Code: Select all

<href src="" mime_type="application/pdf"/>

During import, OJS fetches HREFs as follows:
  • Full URLS (http, https, ftp, ftps) are always supported, but this means you'll have to put your import files up on a server.
  • When using the command-line import/export tool (tools/importExport.php), local files are allowed (e.g. src="/home/bob/import/my_file.pdf"). Relative paths in your XML file are allowed (e.g. src="import/my_file.pdf") must be relative to the OJS base directory (this will be corrected in the next release of OJS).

When using the command-line import tool, the best way to maintain file permissions is to su to the web server user to perform the import.

Alec Smecher
Open Journal Systems Team

Return to “OJS Editorial Support and Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests