This patch touches a lot of code, but basically it removes version
information from use C4::* in our code.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
All script still compiles after the patch (confirmed by pre-applypatch hook)
Enabling compression gives a ~26% *reduction* over non-compressed Type 3 font embedding.
ie. 4.5 K/pg (compressed graphic) vs. 17.5 K/pg (uncompressed Type 3 font) vs 111 K/pg
(uncompressed graphic).
It also appears that most other applications that export in pdf use compression by
default. (OO Writer, etc.) So this approach appears justified. One could always add code
to allow the user to select embedding mode and compression.
Also correcting mode parameter value.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Label pdfs containing barcodes generated by Koha do not display barcodes
properly in Adobe Reader >v7.0.
This does not appear to be a bug in Koha code nor in PDF::Reuse::Barcode code,
but rather in the backward compatibility of Adobe Reader.
This patch changes the barcode embedding method from a Type3
font to graphical embedding which appears to work around the issue.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Presently 252.051 T147 v.1-2 is split as
252.051
T147
v.1
-2
This patch corrects the algorithm so that it splits as
252.051
T147
v.1-2
It also updates Labels_split_ddcn.t to include this particular case.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Allow a call number of the form MP3-CD F PARKER to be split as
MP3-CD
F
PARKER
instead of
MP
3
-CD
F
PARKER
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
If a call number prefix contains a hyphen, try not to
split on the hyphen. For example, rather than
splitting the call number 'CD-ROM 787.87 EAS'
like this:
CD
-ROM
787.87
EAS
it should be
CD-ROM
787.87
EAS
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Similar to previous patch for LCCN splitting, this patch incorporates
changes to split_ddcn and supplies a test file for verifying proper
operation. Note that the only previously documented example for intended
operation is included as one of the tests.
This regexps are created to be rather forgiving. For example, the function
will not choke if two spaces were included where the "spec" (such as it is)
expects one. Obviously this is because for CN splitting purposes, it doesn't
matter, we're not going to ever split in the middle of whitespace.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This corresponds with the test I submitted earlier and essentially
overrides the partial improvement from Nighswonger under Bug 2500.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The current regexp used to split fiction call numbers does not handle the '.' char well. This patch corrects the regexp so that it behaves as expected.
This patch should be ported to the 3.0.x branch.
[fbcbug 5]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Consolidated error catching after evals.
Removed unnecessary $sth->finish calls and some unused variables.
Pulled query for itemtype mappings outside DrawSpineText and added
a class level caching variable to eliminate repeated queries for
*each piece of text* on *each label*! This was a major performance
downside.
Note: this does not fix Unicode problems, but it does add some notes
on unsuccessful attempted workaround using utf8::encode.
C4::Labels should likely be broken up to separate out the pieces that
do not touch the database (wrappers of PDF::Reuse) and those that are
CRUD API for table data.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This is a stop-gap fix intended for 3.0 maintenance release.
3.2 should include a label_batches table which will allow named
batches to be associated with a template & layout, and fix the
column definition of batch_id here to be an auto_incr int.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch allows use of "952a" e.g. in labels format string, getting the item-level
data from the correct MARC tag. Previously it just grabbed the data from the first item tag.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch adds the callnum_split and text_justify options to the templates,
fixes bad javascript to switch between 'formatstring' and fixed-field means of specifying labels content,
fixes csv output when fixed-fields specifiers are used, and adds some help text for the formatstring case.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch also looks for the call number type in items.cn_source and if
that is NULL, falls back to the DefaultClassificationSource syspref.
Splitting algorithms need to be written for other known/supported call
number systems (ie. sudocs, udc, generic, etc.)
Documentation Notes:
For now, if a call number falls through the regex checking for formal lccn or ddcn,
it is passed through the regex for a fiction call number; if it falls through that,
it is returned unsplit.
If a call number does not split, please update enhancement request 2500 with the
requested information.
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2500
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch corrects the csv field list processing alogrithm in two areas:
1. It adjusts the regexp to handle quoted fields with embedded spaces.
2. It adds descrimination for individual 952 subfields.
Documentation needs to be written for the label layout editor.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch removes unlinked fields from the 'Choose Order Of Text Fields to Print'
option on label-edit-layout.pl
It also adds code to make the 'Itemtype' field respect the item-level_itypes syspref.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch ports LCCN splitting code from Koha 2.2.9 to Koha 3.0
This algorithm has been ported just as it appears on some production
systems. LCCNs that do not split correctly should have a bug opened
and include an exact example so that the regexp's can be adjusted.
This patch also adds code to split DDCNs using the *loosest* possible
interpretation of DDCN rules. On the simple end, the DDCN split
algorithm will handle being passed just a Dewey call number.
However, there may be some unusually complex DDCNs that will not
split properly. These will need to have a bug submitted for them
including a specific example so that the regexp's can be adjusted.
The correct choice of splitting alogrithm is determimed by the
item level classification source (items.cn_source).
Documentation should be updated to reflect these changes. Please include
the bit about complex call numbers and the need of a bug report.
[LL Bug 26]
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Major FIXME's still remain, like the use of GET instead of POST.
The code is also a bit too INCLUDE-happy to net good performance.
The entire mechanism of adding to a batch should probably be proper
AJAX instead of the GET-centric opener.location approach.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
In fact, the double reference is useless overkill for this and another arg.
This patch relieves the error seen in logs as:
label-print-pdf.pl: Not a HASH reference at /home/atz/koha/production/intranet/modules/C4/Labels.pm line 1007., referer: http://staff-atz.dev.kohalibrary.com/cgi-bin/koha/labels/label-manager.pl?type=labels
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Make any MARC data available to labels module;
Also add a csv output option, allowing export of relevant
biblio data do a 3rd party label layout application.
Note: This patch REQUIRES a forthcoming updatedatabase patch !
Signed-off-by: Joshua Ferraro <jmf@liblime.com>