Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DS-2224] PDF Citation Coverpage only supports metadata in ISO-8859-1 #5590

Closed
dspace-bot opened this issue Oct 28, 2014 · 9 comments
Closed

Comments

@dspace-bot
Copy link

Imported from JIRA [DS-2224] created by helix84

PDF Citation Coverpage is part of 5.0, but is severly limited in that it's only able to insert metadata into the citation page encoded in ISO-8859-1. This seems to be the only encoding supported by the font used by PDFbox.

To fix this, we need to use a different font, like Doulos SIL. Unfortunately, the latest stable PDFbox version 1.8.7 we use does not support changing fonts. PDFbox version 2.0 should support this, therefore we should upgrade as soon as practical.

More details here:
#678 (comment)

@dspace-bot
Copy link
Author

Is related to: DS-2175

@dspace-bot
Copy link
Author

Depends on: DS-3035

@dspace-bot
Copy link
Author

tdonohue said:

This seems to be dependent on PDFBox version 2.0 being released (as of yet, it is not: https://pdfbox.apache.org/).

Once PDFBox 2.0 is released, we will need a volunteer to upgrade us to resolve this.

@dspace-bot
Copy link
Author

bram said:

PDFBox 2.0 is available, creating a sub ticket specifically for the pdfbox bump

@dspace-bot
Copy link
Author

bram said:

My mistake, 2.0.0 is still under development, the latest stable one is 1.8.10 according to https://pdfbox.apache.org/download.cgi

@dspace-bot
Copy link
Author

helix84 said:

I'm confident that this actually works with PDFBox 2.0.0. I tried the official PDFBox example below and it actually embeds a subset of a font (only the characters actually used from that font). Liberation Sans is a multi-script font that covers latin, cyrilic and greek scripts. We may still need to find a more universal font to cover most world scripts (CJK, arabic, indian, ...), but Liberation Sans is a good start.

https://svn.apache.org/repos/asf/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFonts.java

1) comment out the package line
2) download the font and change path to font
3) build and run:
javac -classpath /dspace/lib/pdfbox-2.0.0-RC3.jar EmbeddedFonts.java && java -classpath .:/dspace/lib/pdfbox-2.0.0-RC3.jar:/dspace/lib/fontbox-2.0.0-RC3.jar:/dspace/lib/commons-logging-1.2.jar EmbeddedFonts

The text-generating code in this file will need to be updated (especially drawText() -> showText()):
https://github.com/DSpace/DSpace/pull/678/files#diff-40ec2520a0f7982fef5afc2038c46e3fR1

@dspace-bot
Copy link
Author

bram said:

Ivan Masár do you have any further information on this one? Reading your last reply, it sounds like the issue is currently not yet fixed in DSpace 6, correct?

@dspace-bot
Copy link
Author

helix84 said:

That's correct, Bram Luyten (Atmire).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant