~ubuntu-branches/ubuntu/jaunty/cups/jaunty

« back to all changes in this revision

Viewing changes to debian/local/filters/pdf-filters/filter/pdfutils.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2009-02-15 18:39:03 UTC
  • mfrom: (6.1.30 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090215183903-i0nhvqyqj4vyn52a
Tags: 1.3.9-13
[ Till Kamppeter ]
* debian/local/filters/pdf-filters/filter/imagetopdf.c: Added support for
  the new "fit-to-page" option (new, more intuitive name for "fitplot").
* debian/filters/pstopdf: Only apply paper size if the "fitplot" or the
  "fit-to-page" option is set.
* debian/local/filters/cpdftocps: Only the last digit of the number of
  copies was used (LP: #309314).
* debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Do not preceed the
  PDF output with a newline (LP: #303691). Only impose the page size from
  the PPD file to all pages if the "fitplot" or the "fit-to-page" option is 
  set. This prevented from automatic paper tray switching to the correct paper
  sizes when a multiple-page-size document is printed (partial fix for
  LP: #310575).
* debian/patches/pdftops-cups-1.4.dpatch: Updated from CUPS 1.4 SVN. Contains
  fixes for multiple-page-size document printing (partial fix for
  LP: #310575).
* debian/patches/pdftops-dont_fail_on_cancel.dpatch: Removed, should be
  fixed in the new upstream version of pdftops.

[ Martin Pitt ]
* debian/patches/pdftops-cups-1.4.dpatch: Add definition of
  HAVE_PDFTOPS and CUPS_PDFTOPS, so that the filter actually gets
  again built with pdftops support. (Fixes Till's change from above).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   PDF file output routines.
 
3
 *
 
4
 *   Copyright 2008 by Tobias Hoffmann.
 
5
 *
 
6
 *   This file is licensed as noted in "LICENSE.txt" 
 
7
 *   which should have been included with this file.  If this file is
 
8
 *   file is missing or damaged, see the license at "http://www.cups.org/".
 
9
 *
 
10
 */
 
11
#include <time.h>
 
12
 
 
13
struct keyval_t {
 
14
  char *key,*value;
 
15
};
 
16
 
 
17
typedef struct {
 
18
  long filepos;
 
19
 
 
20
  int pagessize,pagesalloc;
 
21
  int *pages;
 
22
 
 
23
  int xrefsize,xrefalloc;
 
24
  long *xref;
 
25
 
 
26
  int kvsize,kvalloc;
 
27
  struct keyval_t *kv;
 
28
} pdfOut;
 
29
 
 
30
/* allocates a new pdfOut structure
 
31
 * returns NULL on error
 
32
 */
 
33
pdfOut *pdfOut_new();
 
34
void pdfOut_free(pdfOut *pdf);
 
35
 
 
36
/* start outputting a pdf
 
37
 * returns false on error
 
38
 */
 
39
int pdfOut_begin_pdf(pdfOut *pdf);
 
40
void pdfOut_finish_pdf(pdfOut *pdf);
 
41
 
 
42
/* General output routine for our pdf.
 
43
 * Keeps track of characters actually written out
 
44
 */
 
45
void pdfOut_printf(pdfOut *pdf,const char *fmt,...);
 
46
 
 
47
/* write out an escaped pdf string: e.g.  (Text \(Test\)\n)
 
48
 * >len==-1: use strlen(str) 
 
49
 */
 
50
void pdfOut_putString(pdfOut *pdf,const char *str,int len);
 
51
void pdfOut_putHexString(pdfOut *pdf,const char *str,int len);
 
52
 
 
53
/* Format the broken up timestamp according to
 
54
 * pdf requirements for /CreationDate
 
55
 * NOTE: uses statically allocated buffer 
 
56
 */
 
57
const char *pdfOut_to_pdfdate(struct tm *curtm);
 
58
 
 
59
/* begin a new object at current point of the 
 
60
 * output stream and add it to the xref table.
 
61
 * returns the obj number.
 
62
 */
 
63
int pdfOut_add_xref(pdfOut *pdf);
 
64
 
 
65
/* adds page dictionary >obj to the global Pages tree
 
66
 * returns false on error
 
67
 */
 
68
int pdfOut_add_page(pdfOut *pdf,int obj);
 
69
 
 
70
/* add a >key,>val pair to the document's Info dictionary
 
71
 * returns false on error
 
72
 */
 
73
int pdfOut_add_kv(pdfOut *pdf,const char *key,const char *val);
 
74
 
 
75
/* Writes the font >emb including descriptor to the pdf 
 
76
 * and returns the object number.
 
77
 * On error 0 is returned.
 
78
 */
 
79
struct _EMB_PARAMS;
 
80
int pdfOut_write_font(pdfOut *pdf,struct _EMB_PARAMS *emb);