OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



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
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

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.


Thanks,
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>

<articles>
<article>
<title>SEA-ORCHID Project -- South East Asia: Optimising Reproductive and Child Health Outcomes in Developing Countries </title>
<file>
<embed filename="O14McDonald.pdf" mime_type="application/pdf"/>
</file>
<date_published>2005</date_published>
<abstract>
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 (http://www.sea-orchid.org). 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.
</abstract>
<author primary_contact="true">
<firstname>Steve</firstname>
<lastname>McDonald</lastname>
<affiliation>Australasian Cochrane Centre</affiliation>
<email>steve.mcdonald@med.monash.edu.au</email>
</author>
<galley>
<label>McDonald2004</label>
<file>
<href src="O14McDonald.pdf" mime_type="application/pdf"/>
</file>
</galley>
</article>
</articles>
jipser
 
Posts: 3
Joined: Wed Nov 23, 2005 6:35 am
Location: Cape Town, South Africa

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="http://www.myserver.com/import_files/my_file.pdf" 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.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: Bing [Bot] and 3 guests