Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Archive:Files/CoverPDF
(section)
Archive
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Troubleshooting== ===GIF image not appearing on cover page=== pdflatex does not support gif images - convert the gif image to a supported format such as png. The default cover page uses the site_logo setting defined in cfg.d/branding.pl. By default the logo is a gif image: $c->{site_logo} = "/images/sitelogo.gif"; To create a png version of the logo: cd /opt/eprints3/archives/ARCHIVEID/cfg/static/images/ convert sitelogo.gif sitelogo.png Edit branding.pl and change sitelogo.gif to sitelogo.png. "Touch" coverpage.xml so that cover pages will be regenerated: touch /opt/eprints3/archives/ARCHIVEID/cfg/lang/en/phrases/coverpage.xml The logo should now appear on the cover page. ==="Check that coverpage content is valid LaTeX" error message in log=== This can sometimes appear after touching/editing coverpage.xml even if the LaTeX code is correct. Restart Apache and try again. Check for any mktexfmt error messages in the log - see below. If the problem persists, try running pdflatex against the cover page template manually: cd /tmp mkdir coverpage-test cd coverpage-test vi cover.tex (copy LaTeX code from coverpage.xml into cover.tex) pdflatex cover.tex Examine the pdflatex output for errors. This problem can also appear because of an intermittent bug in pdflatex. The symptom is that cover pages generally work, but occasionally (and transiently) either fail to appear or, more rarely, cause an internal server error. In this case, a workaround is to use latex and dvipdf instead of pdflatex. A (clumsy) way to do this is to modify CoverPDF.pm, replacing the line system( $pdflatex, "-interaction=nonstopmode", "-output-directory=$latex_dir", $latex_file ); with system( "latex", "-interaction=nonstopmode", "-output-directory=$latex_dir", $latex_file ); system( "cd $latex_dir && dvipdf cover.dvi" ); ==="fmtutil: format directory does not exist" error message in log=== Full error message: kpathsea: Running mktexfmt pdflatex.fmt fmtutil: format directory `/.texlive2007/texmf-var/web2c' does not exist. Some texlive packages do not include all the necessary TeX format files to run. To generate the missing files, run the following as the "eprints" user (or the user you configured EPrints to run as): fmtutil --missing Under Fedora 10, the home directory seen by the EPrints web server differs from that of the eprints user, so as root you may need to do mkdir /.texlive2007 chown eprints.eprints /.texlive2007 chmod g+w /.texlive2007 and then as the eprints user HOME=/ fmtutil --missing ===Encrypted PDFs / "Check the PDF is not password-protected" error message in log=== If a PDF document is encrypted (password protected), a cover page cannot be added. To check for encrypted PDFs during the deposit process (and display a '''warning''' message) add the following to cfg.d/eprint_warnings.pl: foreach my $doc ( @docs ) { if( $doc->get_type eq 'application/pdf' ) { use PDF::API2; my $pdf = PDF::API2->open( $doc->local_path.'/'.$doc->get_main ); if( defined $pdf && $pdf->isEncrypted ) { my $fieldname = $session->make_element( "span", class=>"ep_problem_field:documents" ); push @problems, $session->html_phrase( "validate:encrypted_pdf", fieldname => $fieldname ); } } } '''Note: You will need to install the PDF::API2 Perl module. '''Hint: If you want to prevent depositors from submitting encrypted PDFs, adapt the code to cfg.d/eprint_validate.pl instead. ===Ampersands and other characters do not render correctly on cover sheet=== Some characters, such as ampersands and copyright symbols, need to be quoted to render correctly in LaTeX. Try adding the following local subroutine to $coverpage->{getcontent}: $coverpage->{get_content} = sub { [...] my $latex_encode = sub { my ($string) = @_; utf8::decode($string); return TeX::Encode::encode( "latex", $string ); }; [...] }; You can then use &$latex_encode() to wrapper the strings in %bits: my %bits = ( citation => &$latex_encode( EPrints::Utils::tree_to_utf8( $eprint->render_citation() ) ), [...] ); ===Older versions of pdflatex do not support -output-directory=== Error messages in the log like: /usr/bin/pdflatex: unrecognized option `-output-directory=/tmp/1cS5K8nVch' In CoverPDF.pm, try replacing: system( $pdflatex, "-interaction=nonstopmode", "-output-directory=$latex_dir", $latex_file ); with: use Cwd; my $prev_dir = getcwd; chdir( $latex_dir ); system( $pdflatex, "-interaction=nonstopmode", $latex_file ); chdir( $prev_dir );
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)