Index: head/print/Makefile =================================================================== --- head/print/Makefile (revision 520568) +++ head/print/Makefile (revision 520569) @@ -1,269 +1,270 @@ # $FreeBSD$ # COMMENT = Desktop publishing SUBDIR += R-cran-knitr SUBDIR += R-cran-tinytex SUBDIR += a2pdf SUBDIR += a2ps SUBDIR += abcm2ps SUBDIR += adobe-cmaps SUBDIR += afm SUBDIR += alignmargins SUBDIR += ansiprint SUBDIR += asprint SUBDIR += auctex SUBDIR += bibcursed SUBDIR += biblio-py SUBDIR += bibview SUBDIR += c2ps SUBDIR += catdvi SUBDIR += cdlabelgen SUBDIR += cloud-print-connector SUBDIR += cloudprint SUBDIR += cups SUBDIR += cups-bjnp SUBDIR += cups-cloud-print SUBDIR += cups-filters SUBDIR += cups-fxlinuxprint SUBDIR += cups-pdf SUBDIR += cups-pk-helper SUBDIR += cups-smb-backend SUBDIR += deforaos-pdfviewer SUBDIR += derelict-ft SUBDIR += detex SUBDIR += dot2tex SUBDIR += dvi2tty SUBDIR += dvips2ascii SUBDIR += dvisvg SUBDIR += dymo-cups-drivers SUBDIR += easylatex SUBDIR += enscript-a4 SUBDIR += enscript-letter SUBDIR += enscript-letterdj SUBDIR += epson-inkjet-printer-201401w SUBDIR += epson-inkjet-printer-201601w SUBDIR += epson-inkjet-printer-escpr SUBDIR += epsonepl SUBDIR += fig2dev SUBDIR += flpsed SUBDIR += font-amsfonts SUBDIR += font2svg SUBDIR += fontforge SUBDIR += foo2zjs SUBDIR += foomatic-db SUBDIR += foomatic-db-engine SUBDIR += foomatic-db-hpijs SUBDIR += foomatic-filters SUBDIR += foxitreader SUBDIR += fpdf SUBDIR += freetype SUBDIR += freetype2 SUBDIR += frescobaldi SUBDIR += ft2demos SUBDIR += ghostscript7-base SUBDIR += ghostscript7-commfont SUBDIR += ghostscript7-jpnfont SUBDIR += ghostscript7-korfont SUBDIR += ghostscript7-x11 SUBDIR += ghostscript8-base SUBDIR += ghostscript8-x11 SUBDIR += ghostscript9-agpl-base SUBDIR += ghostscript9-agpl-x11 SUBDIR += ghostscript9-base SUBDIR += ghostscript9-x11 SUBDIR += gimp-gutenprint SUBDIR += gl2ps SUBDIR += gsfonts SUBDIR += gspdf SUBDIR += gtklp SUBDIR += gutenprint SUBDIR += gv SUBDIR += harfbuzz SUBDIR += harfbuzz-hb-view SUBDIR += harfbuzz-icu SUBDIR += hp2xx SUBDIR += hplip SUBDIR += hplip-plugin SUBDIR += hs-hscolour SUBDIR += html2latex SUBDIR += html2ps SUBDIR += hyperlatex SUBDIR += indexinfo SUBDIR += jabref SUBDIR += kde_poster SUBDIR += latex-beamer SUBDIR += latex-biber SUBDIR += latex-ltablex SUBDIR += latex-resume SUBDIR += latex2rtf SUBDIR += latexdiff SUBDIR += lgrind SUBDIR += libgnomecups SUBDIR += libgnomeprint SUBDIR += libgnomeprint-reference SUBDIR += libgnomeprintmm SUBDIR += libharu SUBDIR += libijs SUBDIR += libmspub01 SUBDIR += libotf SUBDIR += libpagemaker SUBDIR += libpaper SUBDIR += libraqm SUBDIR += libspectre SUBDIR += lilypond SUBDIR += lilypond-devel SUBDIR += linux-c6-cups-libs SUBDIR += linux-c7-cups-libs SUBDIR += linux-c7-freetype SUBDIR += linux-c7-harfbuzz SUBDIR += lout SUBDIR += lprps SUBDIR += lyx SUBDIR += magicfilter SUBDIR += makeindex SUBDIR += mftrace SUBDIR += min12xxw SUBDIR += mp-a4 SUBDIR += mp-letter SUBDIR += mpage SUBDIR += muttprint SUBDIR += nenscript SUBDIR += okc321 SUBDIR += openprinting SUBDIR += p5-Font-FreeType SUBDIR += p5-Net-CUPS SUBDIR += p5-Net-Printer SUBDIR += p5-PDF-Template SUBDIR += p5-PDFLib SUBDIR += p5-PostScript SUBDIR += p5-PostScript-PPD SUBDIR += p5-PostScript-Simple SUBDIR += p5-Text-PDF SUBDIR += p5-XML-ApacheFOP SUBDIR += p5-XML-Handler-AxPoint SUBDIR += p910nd SUBDIR += panda SUBDIR += papersize-default-a4 SUBDIR += papersize-default-letter SUBDIR += paps SUBDIR += pcal SUBDIR += pdf-redact-tools SUBDIR += pdf-renderer SUBDIR += pdf-tools SUBDIR += pdf4tcl SUBDIR += pdfbox SUBDIR += pdfcube SUBDIR += pdflib SUBDIR += pdflib-perl SUBDIR += pdfstitch SUBDIR += pdftk SUBDIR += pear-File_PDF SUBDIR += pecl-pdflib SUBDIR += pfbtopfa SUBDIR += photoprint SUBDIR += pic2fig SUBDIR += pkfonts118 SUBDIR += pkfonts240 SUBDIR += pkfonts300 SUBDIR += pkfonts360 SUBDIR += pkfonts400 SUBDIR += pkfonts600 SUBDIR += pkipplib SUBDIR += pkpgcounter SUBDIR += pmw SUBDIR += pnm2ppa SUBDIR += print-manager SUBDIR += ps2eps SUBDIR += pscal SUBDIR += psdim SUBDIR += pslib SUBDIR += pstotext SUBDIR += psutils SUBDIR += py-fontaine SUBDIR += py-fonttools SUBDIR += py-fpdf SUBDIR += py-pdf SUBDIR += py-pdf2 SUBDIR += py-pollyreports SUBDIR += py-preppy SUBDIR += py-psautohint SUBDIR += py-pycups SUBDIR += py-pyscript SUBDIR += py-python-ly SUBDIR += py-qt5-printsupport SUBDIR += py-relatorio SUBDIR += py-reportlab SUBDIR += py-rtf SUBDIR += py-stapler SUBDIR += py-trml2pdf SUBDIR += py-ttfautohint-py SUBDIR += py-weasyprint SUBDIR += qpdf SUBDIR += qpdfview SUBDIR += qt5-printsupport SUBDIR += rlpr SUBDIR += rprint SUBDIR += rtf2latex2e SUBDIR += rubygem-afm SUBDIR += rubygem-color SUBDIR += rubygem-color-tools SUBDIR += rubygem-pdf-core SUBDIR += rubygem-pdf-reader SUBDIR += rubygem-pdf-writer SUBDIR += rubygem-prawn SUBDIR += rubygem-prawn-core SUBDIR += rubygem-prawn-flexible-table SUBDIR += rubygem-prawn-format SUBDIR += rubygem-prawn-graph SUBDIR += rubygem-prawn-js SUBDIR += rubygem-prawn-layout SUBDIR += rubygem-prawn-security SUBDIR += rubygem-prawn-svg SUBDIR += rubygem-prawn_shapes SUBDIR += rubygem-rbpdf SUBDIR += rubygem-rbpdf-font SUBDIR += rubygem-ttfunk SUBDIR += scribus-devel SUBDIR += sgf2tex + SUBDIR += shrinkpdf SUBDIR += splix SUBDIR += system-config-printer SUBDIR += t1utils SUBDIR += tex-aleph SUBDIR += tex-basic-engines SUBDIR += tex-dvipdfmx SUBDIR += tex-dvipsk SUBDIR += tex-formats SUBDIR += tex-jadetex SUBDIR += tex-luatex SUBDIR += tex-ptexenc SUBDIR += tex-xdvik SUBDIR += tex-xetex SUBDIR += tex-xmltex SUBDIR += texinfo SUBDIR += texlive-base SUBDIR += texlive-docs SUBDIR += texlive-full SUBDIR += texlive-texmf SUBDIR += texlive-texmf-source SUBDIR += texlive-tlmgr SUBDIR += texvc SUBDIR += tgif2tex SUBDIR += transfig SUBDIR += trueprint SUBDIR += ttf2pt1 SUBDIR += ttfautohint SUBDIR += ttfquery SUBDIR += ttftot42 SUBDIR += txtbdf2ps SUBDIR += typetools SUBDIR += utopia SUBDIR += xfce4-print SUBDIR += xmbibtex SUBDIR += xpdfopen SUBDIR += xpp SUBDIR += xtexsh SUBDIR += yatex .include Index: head/print/shrinkpdf/Makefile =================================================================== --- head/print/shrinkpdf/Makefile (nonexistent) +++ head/print/shrinkpdf/Makefile (revision 520569) @@ -0,0 +1,41 @@ +# $FreeBSD$ + +PORTNAME= shrinkpdf +PORTVERSION= 20191221 +CATEGORIES= print graphics +MASTER_SITES= http://www.alfredklomp.com/programming/shrinkpdf/ +DISTNAME= ${PORTNAME}.sh +EXTRACT_SUFX= # none +EXTRACT_ONLY= # none + +MAINTAINER= grembo@FreeBSD.org +COMMENT= Simple wrapper around Ghostscript to reduce the file size of PDFs + +LICENSE= BSD3CLAUSE + +USES= ghostscript:run +SUB_FILES= ${PORTNAME}.1 + +#RUN_DEPENDS= ${JAVALIBDIR}/bcmail.jar:java/bouncycastle15 \ +# ${JAVALIBDIR}/commons-logging.jar:java/apache-commons-logging \ +# ${JAVALIBDIR}/commons-io.jar:devel/apache-commons-io + +NO_BUILD= yes +NO_ARCH= yes + +PLIST_FILES= bin/${PORTNAME} man/man1/${PORTNAME}.1.gz + +do-install: + ${INSTALL_SCRIPT} ${DISTDIR}/${PORTNAME}.sh \ + ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + ${INSTALL_MAN} ${WRKDIR}/shrinkpdf.1 ${STAGEDIR}${MANPREFIX}/man/man1 + +# @${ECHO_MSG} -n ">> Installing JAR files in ${JAVAJARDIR}..." +# @${MKDIR} ${STAGEDIR}${JAVAJARDIR} +#.for f in ${JAR_NAMES} +# ${INSTALL_DATA} ${DISTDIR}/${f}-${PORTVERSION}.jar \ +# ${STAGEDIR}${JAVAJARDIR}/${f}.jar +#.endfor +# @${ECHO_MSG} " [ DONE ]" + +.include Property changes on: head/print/shrinkpdf/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/print/shrinkpdf/distinfo =================================================================== --- head/print/shrinkpdf/distinfo (nonexistent) +++ head/print/shrinkpdf/distinfo (revision 520569) @@ -0,0 +1,3 @@ +TIMESTAMP = 1576932323 +SHA256 (shrinkpdf.sh) = 2aa47759a945165e119b84b99d1042c63fceb1ec2692145e250b4f78ec032662 +SIZE (shrinkpdf.sh) = 3114 Property changes on: head/print/shrinkpdf/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/print/shrinkpdf/files/shrinkpdf.1.in =================================================================== --- head/print/shrinkpdf/files/shrinkpdf.1.in (nonexistent) +++ head/print/shrinkpdf/files/shrinkpdf.1.in (revision 520569) @@ -0,0 +1,79 @@ +.\" +.\" Copyright (c) 2014-2019 Alfred Klomp +.\" Copyright (c) 2019 Michael Gmelin +.\" +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 21, 2019 +.Dt SHRINKPDF 1 +.Os +.Sh NAME +.Nm shrinkpdf +.Nd A simple wrapper around Ghostscript to reduce the file size of PDFs +.Sh SYNOPSIS +.Nm +.Ar infile +.Op outfile +.Op resolution_in_dpi +.Sh DESCRIPTION +Inspired by some code found in an OpenOffice Python script, +.Nm +feeds a PDF through Ghostscript, which performs lossy recompression +by such methods as downsampling the images to a lower resolution. +The result should be (but not always is) a much smaller file. +.Pp +If invoked without +.Op outfile , +the shrunk file is written to standard output. +If invoked without +.Op resolution_in_dpi , +a default resolution of 72 dpi is used. +.Pp +If both +.Op infile +and +.Op outfile +are regular files, the script checks if the shrunk output file is actually +smaller than the input file. +If it is not, it writes a message to stderr and copies the input to output. +.Sh EXAMPLES +Reduce PDF resolution to 72 dpi: +.Dl $ shrinkpdf myfile.pdf >myfile-72dpi.pdf +.Pp +Reduce PDF resolution to 300 dpi: +.Dl $ shrinkpdf myfile.pdf - 300 >myfile-300dpi.pdf +.Pp +Reduce PDF resolution to 150 dpi, specify +.Op outfile : +.Dl $ shrinkpdf myfile.pdf myfile-150dpi.pdf 150 +.Sh SEE ALSO +.Xr gs 1 +.Sh AUTHORS +.An -nosplit +.Nm +was written by Alfred Klomp. +This manual page was written by +.An Michael Gmelin Aq Mt grembo@FreeBSD.org +based on content written by Alfred Klomp. Property changes on: head/print/shrinkpdf/files/shrinkpdf.1.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/print/shrinkpdf/pkg-descr =================================================================== --- head/print/shrinkpdf/pkg-descr (nonexistent) +++ head/print/shrinkpdf/pkg-descr (revision 520569) @@ -0,0 +1,6 @@ +A simple wrapper around Ghostscript to shrink PDFs (as in reduce filesize). +The script feeds a PDF through Ghostscript, which performs lossy +recompression by such methods as downsampling the images to 72dpi. The +result should be (but not always is) a much smaller file. + +WWW: http://www.alfredklomp.com/programming/shrinkpdf/ Property changes on: head/print/shrinkpdf/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property