Right, that wasn't ever an option on the PDF "packager". That
class was really written as a demonstration of the package ingester
and a proof-of-concept, but it was allowed to escape.
The package ingester never sees the original filename; it is given
an open InputStream created by the Packager application. Package
ingesters run from a stream so they don't have to care if their input
is from a file or a network connection, that way remote ingestion just works.
However, you've already figured out most of what is needed to add the
option you want. Just add some code to look for the "name" option
and if found, set the bitstream's name to that. Make sure the
disseminator will find custom-named PDFs, perhaps by looking for the
first bitstream with a name ending in ".pdf" if there is no
"package.pdf".
Please submit the change as a patch through Sourceforge, so it can get
adopted into the source, see the wiki page "How to contribute".
-- Larry
> I'm trying to ingest a whole bunch of pdf's using the packager.
>
> The syntax used is /dspace/bin/dsrun org.dspace.app.packager.Packager -c
> hp/548 -e b
> [EMAIL PROTECTED] -w -t PDF /home/dspace/HPL-2007-2.pdf
>
> The problem is that the files get renamed to "package.pdf"
> (even if I add -o "name=blah.pdf" to the command.).
>
> This seems to happen in the class
> org.dspace.content.packager.PDFPackager
>
>
> bs = original.createBitstream(pkg);
> pkg.close();
> bs.setName("package.pdf");
>
>
> Does anyone have a workaround that keeps the original pdf file name? is
> there something I'm not doing quite right?
> Thanks,
> Ben Weinberg
> HP Digital Library
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech