summaryrefslogtreecommitdiff
path: root/source/fitz/output-pcl.c
AgeCommit message (Collapse)Author
2016-10-12Change code from using bandheight to using band_height.Robin Watts
Keep to our naming conventions.
2016-10-12Regularize band writer interface.Robin Watts
We have various functions that, for different image formats, write a header, then a band, then (sometimes) a trailer. Push them all through a single interface. This change also fixes potential problems caused by the trailer writing being an implicit destructor, which can cause problems in cleanup code if the trailer writing throws an error.
2016-06-28Fix inconsistency in band handling.Robin Watts
In an earlier commit, I changed some of the band writing functions to take the band starting offset, rather than the band number. This was done to accomodate the idea of rendering the page in bands of different heights. Sadly, it seems I didn't push this all the way through, and had different band writing functions still taking the band number. Fix all the band writing functions to be consistent.
2016-05-24fz_pixmap revamp: add stride and make alpha optionalRobin Watts
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
2016-03-25Refactor pcl output to work in bands.Robin Watts
2016-03-25Tweak the PCL page size handling/options.Robin Watts
Introduce a 'generic' PCL setting (basically ljet4 with custom page sizes for now). Ensure we send explicit sizes before the custom page sizes, and don't use Ricoh page sizes unless we are allowed to.
2016-03-25Add 24 bit RGB PCL output mode.Robin Watts
Output uses adaptive compression mode.
2016-03-15Fix mode2compress for PCL.Robin Watts
Previously this would overrun buffers in the pathological case (ABBABBABB...). We now only break from literals to runs for a run of at least 3 (except at the start).
2016-03-01Fix bug in pcl page size finding code.Robin Watts
Don't bale on the first 'large enough' match.
2016-03-01PCL output: Add code to guess paper sizes.Robin Watts
Guess paper sizes from bitmap dimensions unless the paper size has been specified. If unknown, depending on the properties of the printer, we'll either send a 'custom' paper size (followed by the page size in decipoints), or the next size up. Depending on the capabilities of the printer, we can optionally send orientation too.
2016-02-12Fix PCL output (monochrome).Robin Watts
The PCL monochrome output code was unfinished. This now produces PCL accepted by ghostpcl for ljet4 and dj500 presets at least.
2015-12-15Rename fz_output_x to fz_write_pixmap_as_x etc.Tor Andersson
2015-12-15Rename fz_write_x to fz_save_pixmap_as_x or fz_save_bitmap_as_x.Tor Andersson
Separate naming of functions that save complete files to disk from functions that write data to streams.
2015-12-11Use fz_output instead of FILE* for most of our output needs.Tor Andersson
Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj.
2015-05-15Support pdf files larger than 2Gig.Robin Watts
If FZ_LARGEFILE is defined when building, MuPDF uses 64bit offsets for files; this allows us to open streams larger than 2Gig. The downsides to this are that: * The xref entries are larger. * All PDF ints are held as 64bit things rather than 32bit things (to cope with /Prev entries, hint stream offsets etc). * All file positions are stored as 64bits rather than 32. The implementation works by detecting FZ_LARGEFILE. Some #ifdeffery in fitz/system.h sets fz_off_t to either int or int64_t as appropriate, and sets defines for fz_fopen, fz_fseek, fz_ftell etc as required. These call the fseeko64 etc functions on linux (and so define _LARGEFILE64_SOURCE) and the explicit 64bit functions on windows.
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
2015-02-17Rename fz_close_* and fz_free_* to fz_drop_*.Tor Andersson
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
2014-09-02Clean some whitespace.Tor Andersson
2013-06-20Rearrange source files.Tor Andersson