0% found this document useful (0 votes)
48 views36 pages

Pdfcompress

Pdf compress

Uploaded by

Eisjsñ Ehaos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views36 pages

Pdfcompress

Pdf compress

Uploaded by

Eisjsñ Ehaos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Neevia PDFcompress v4.

4 user’s manual last modified: November 15, 2021

Neevia
PDFcompress
user’s manual
version 4.4
https://neeviaPDF.com/PDFcompress

neeviaPDF.com - high performance PDF tools Page 1 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

License Agreement
ELECTRONIC END USER LICENSE AGREEMENT

For One (1) Computer

This is an End User License Agreement. This is a contract. If you install this software, you must abide
by the terms of this agreement. This license is applicable to all software products sold by Neevia
Tech. The term software includes upgrades, modified versions or updates. This software is licensed
and not sold. Only a non-transferable and nonexclusive right to use the Neevia products is granted
to the end user.

The following are definitions that should be noted by the user:

a. COMPUTER/SERVER
This is a single computer owned, rented or leased by a single individual or entity on which one or
more applications load and execute software in the memory space of that computer. Software is
installed on a server for one or more users. All computers/servers must be licensed to utilize Neevia
software.

b. VIRTUAL SERVER
This is a single computer or a virtual machine (a software implementation of a machine that
executes programs like a physical machine) that is owned, rented or leased by an individual or entity
that turns around and rents or leases access to others. The virtual server may have one or more
applications on it for the end users to use. The purpose of the virtual server is to give multiple users
access to many software programs.

c. DEVELOPMENT
This means that you are programming a specific application or tool that will interact with the
software that you are licensing from Neevia Tech.

THIS IS A CONTRACT BETWEEN YOU AND NEEVIA TECH. YOU SHOULD CAREFULLY READ THIS
LICENSING AGREEMENT AND MUST ACCEPT ALL THE TERMS AND CONDITIONS BEFORE INSTALLING
THIS NEEVIA SOFTWARE. BY INSTALLING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE
TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE,
DO NOT INSTALL THE SOFTWARE, AND DO NOT USE THE SOFTWARE. IF YOU VIOLATE THIS
AGREEMENT, YOU WILL BE SUBJECT TO LEGAL ACTION BY NEEVIA TECH.

Subject to the payment of applicable license fees, Neevia Tech grants you a nonexclusive right to use
its accompanying Neevia software product and related documents (the Software) in the terms and
conditions provided as follow:

LICENSE
Until such time as Neevia has issued a valid serial number to you, you may only use this software for
a 30-day trial period. You agree to remove any copies of the software after the expiration of the trial
period. No license is issued to you until you are issued a valid serial number.

You cannot use a license for the software concurrently on different computers. You may install and
use the Software in a single location on a hard disk or other storage device of one computer only.

neeviaPDF.com - high performance PDF tools Page 2 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

(a) Home Use:


The primary user of each computer on which the Software is installed or used may also install the
Software on one home or portable computer. However another person may not use the Software on
a secondary computer at the same time the Software on the primary computer is being used.

(b) Server or Network Use:


You may keep one copy of the Software on a single file server only for the purposes of downloading
and installing the Software onto a hard disk of up to the Permitted Number of Computers that are
on the same network as the file server. No other network use is permitted.

(c) Operating system or Language versions:


If you receive two or more copies of the Software with different operating systems or language
versions, the total aggregate number of computers on which all versions of the Software are used
may not exceed the Permitted Number of Computers. You may not rent, lease, sublicense, lend or
transfer versions or copies of the Software you do not use, or Software contained on any unused
media.

(d) Archiving:
You may make one copy of the Software solely for archival purposes. If the Software is an upgrade,
you may use the Software only in conjunction with upgraded product. If you receive your first copy
of the Software electronically, and a second copy on media afterward, the second copy can be used
for archival purposes only.

For all Neevia Tech products, you agree that you will only use our software on a server and all
applications that will access the server will reside on the server and you will not permit remote
access to the software except through your application residing on the server. You agree to
surrender your license(s) if you violate this agreement. If you violate this agreement, you will not
receive a refund upon termination of this license. You agree not to utilize our software to violate the
copyright of any third parties. If you do violate the copyright of a third party utilizing our software,
you agree to hold Neevia Tech harmless and will indemnify Neevia Tech for any such activity even if
the violation is unintentional.

COPYRIGHT
The Software is owned by Neevia Tech and/or its suppliers, and is protected by the copyright and
trademark laws of the United States and related applicable laws. You may not copy the Software
except as set forth in the "License" section. Any copies that you are permitted to make pursuant to
this Agreement must contain the same copyright and other proprietary notices that appear on or in
the Software.

You may not rent, lease, sub-license, transfer, or sell the Software. You may not modify, translate,
reverse engineer, decompile, disassemble, or create derivative works based on the Software, except
to the extent applicable law expressly prohibits such foregoing restriction. You may use the
trademarks to identify the Software owner's name, or to identify printed output produced by the
Software. Such use of any trademark does not give you any rights of ownership in that trademark.

NO WARRANTY LICENSED SOFTWARE (S) - "AS IS"


The Software is provided AS IS. NEEVIA TECH AND ITS SUPPLIERS MAKE NO WARRANTIES, EXPRESS
OR IMPLIED, AS TO THE MERCHANTABILITY, QUALITY, NONINFRINGEMENT OF THIRD PARTY RIGHTS,
FITNESS FOR A PARTICULAR PURPOSE, AND THOSE ARISING BY STATUTE OR OTHERWISE IN LAW OR
FROM A COURSE OF DEALING OR USAGE OF TRADE. THE ENTIRE RISK AS TO THE QUALITY, RESULTS

neeviaPDF.com - high performance PDF tools Page 3 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

BY USING THE SOFTWARE, AND PERFORMANCE OF THE SOFTWARE IS WITH THE END USER. Some
states or jurisdictions do not allow the exclusion or limitation of incidental, consequential or special
damages, or the exclusion of implied warranties or limitations on how long an implied warranty may
last, so the above limitations may not apply to you or your company.

LIMITATION OF REMEDIES AND LIABILITY


NEEVIA TECH OR ITS SUPPLIERS OR RESELLERS SHALL NOT UNDER ANY CIRCUMSTANCE BE LIABLE TO
YOU FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INDIRECT, OR CONSEQUENTIAL
DAMAGES, LOST PROFITS OR LOST SAVINGS, OR FOR ANY CLAIM BY A THIRD PARTY, ARISING OUT
OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF NEEVIA TECHNOLOLGY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.

GENERAL
This Agreement shall be construed, interpreted, and governed by the laws of the State of Florida,
excluding the application of its conflicts of law rules. The United Nations Convention on Contracts of
the International Sale of Goods, will not govern this Agreement. If any part of this Agreement is
found void and unenforceable, it will not affect the validity of the rest of the Agreement, which shall
remain valid and enforceable according to its terms.

If you need to redistribute this product with your own software products, you need to contact
Neevia and negotiate a separate licensing and royalty agreement.

You may not ship, transfer, or export the Software into any country or used in any manner
prohibited by any export laws, restrictions or regulations.

UPGRADES
You must be properly licensed to install upgrades to Neevia Software products. Neevia upgrades
replace and or supplement the previous product that formed the basis for your eligibility to for the
upgrade. You may use the upgrade only in accordance with the terms of this Agreement. Upgrades
may not be separated and used on separate computers.

GOVERNEMENT USERS
For United States government users, the Software and associated Documentation are deemed to be
"commercial computer software" and "commercial computer documentation", respectively
pursuant to DFAR 227.7202 and FAR 12.212(b) as applicable.

ENTIRE AGREEMENT
You acknowledge that you have read this Agreement, understand it and agree to be bounded by its
terms and conditions. It is the complete and exclusive statement of the Agreement between us,
which supersedes any proposal or prior agreement, oral or written, and other communication
between us relating to the subject matter of this Agreement.

CONTACT INFORMATION
neeviaPDF.com
Tel: (954) 893.9343
Email: [email protected]
Web: http://neeviaPDF.com

neeviaPDF.com - high performance PDF tools Page 4 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Table of Contents

License Agreement .................................................................................................................. 2


Table of Contents .................................................................................................................... 5
Introduction ............................................................................................................................ 7
Installing and Uninstalling Neevia PDFcompress ....................................................................... 7
How to register Neevia PDFcompress ......................................................................................... 8
Using the Command Line Interface to compress PDF files ......................................................... 9
Supported Options ...................................................................................................................... 9
Using the COM Interface to compress PDF files ...................................................................... 13
Using the .NET assembly to compress PDF files ...................................................................... 13
Properties................................................................................................................................... 13
version................................................................................................................................. 13
Linearize .............................................................................................................................. 13
PDFPassword....................................................................................................................... 13
Optimize .............................................................................................................................. 13
UnembedFonts.................................................................................................................... 14
removeBookmarks .............................................................................................................. 14
removeAnnotations ............................................................................................................ 14
removeAcroForms .............................................................................................................. 14
removePageLabels .............................................................................................................. 14
removeLayers ...................................................................................................................... 14
removeArticleThreads......................................................................................................... 15
removeTaggedInfo .............................................................................................................. 15
removePageThumbnails ..................................................................................................... 15
removeDuplicates ............................................................................................................... 15
removeAltImages ................................................................................................................ 15
removeNamedDestinations ................................................................................................ 15
removeEmbeddedFiles ....................................................................................................... 15
PreservePDFA...................................................................................................................... 16
CreateObjectStreams .......................................................................................................... 16
CI ......................................................................................................................................... 16
CQ ........................................................................................................................................ 16
GI ......................................................................................................................................... 16
GQ ....................................................................................................................................... 17
MI ........................................................................................................................................ 17
MQ ...................................................................................................................................... 17
CRT ...................................................................................................................................... 17
CRR ...................................................................................................................................... 17
GRT ...................................................................................................................................... 17
GRR...................................................................................................................................... 18
MRT ..................................................................................................................................... 18
MRR ..................................................................................................................................... 18
PDF Encryption related properties ............................................................................................. 19
PDFEncrypt .......................................................................................................................... 19
PDFEncryptMetaData.......................................................................................................... 19
PDFEncryptionType ............................................................................................................. 19
PDFUserPassword ............................................................................................................... 19
PDFOwnerPassword............................................................................................................ 19
PDFPermissions ................................................................................................................... 20

neeviaPDF.com - high performance PDF tools Page 5 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

PDF Initial View & Metadata related properties ....................................................................... 21


DocumentTitle .................................................................................................................... 21
DocumentSubject................................................................................................................ 21
DocumentAuthor ................................................................................................................ 21
DocumentKeywords ............................................................................................................ 21
PageMode ........................................................................................................................... 21
PageLayout .......................................................................................................................... 21
OpenMagnification ............................................................................................................. 22
OpenAtPage ........................................................................................................................ 22
FitWindow ........................................................................................................................... 22
CenterWindow .................................................................................................................... 22
HideMenuBar ...................................................................................................................... 22
HideToolbar......................................................................................................................... 22
HideWindowUI .................................................................................................................... 22
Methods..................................................................................................................................... 23
CompressPDF ...................................................................................................................... 23
Using the graphic interface to compress PDF files ................................................................... 24
CODE SAMPLES ..................................................................................................................... 35

neeviaPDF.com - high performance PDF tools Page 6 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Introduction
Neevia PDFcompress is a software product that can be used to reduce the actual size of PDF files by
compressing text and graphics.
It comes as a command line tool, graphic interface application, COM object and .NET assembly

Supported platforms are: Windows 2003, Vista, 7, 2008, 2012, 8, 10, 2016, 2019, 11 - 32 and 64 bit.

Installing and Uninstalling Neevia PDFcompress


Before installing and/or using this product, please make sure you have carefully read the copyright
notice and agreed to all of its terms. If you have any questions about the licensing agreement, feel
free to call (954) 981.9252 or send an email to [email protected].

To install Neevia PDFcompress:


download and save the https://neeviapdf.com/prods/PDFcompress_setup.exe file onto your
hard drive. After downloading the file, double-click on it and follow the instructions. The
installation procedure automatically detects your operating system, copies the needed files
into your system directory and installs Neevia PDFcompress.

Unattended installation:
To perform an unattended (silent) installation launch the PDFcompress installer with /sp
/very silent /norestart command line switches. Here is the full list of supported switches:

/SP
Disables the "This will install... Do you wish to continue?" prompt at the beginning of
Setup.

/SILENT, /VERYSILENT
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the
background window are not displayed but the installation progress window is. When
Setup is very silent the installation progress window is not displayed. Everything else is
normal so for example error messages during installation are displayed and the startup
prompt is (if you haven't disabled it with '/SP' command line option explained above). If
a restart is necessary and the '/NORESTART' command is not used (see below) and
Setup is silent, it will display a “Reboot now?” dialog. If it's very silent it will reboot
without asking.

/NOCANCEL
Prevents the user from canceling during the installation process, by
disabling the Cancel button and ignoring clicks on the close button.
Useful along with /SILENT.

/NORESTART
Instructs Setup not to reboot even if it's necessary.

/DIR="x:\dirname"
Overrides the default directory name displayed on the Select Destination Directory
wizard page. A fully qualified pathname must be specified.

neeviaPDF.com - high performance PDF tools Page 7 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

/GROUP="folder name"
Overrides the default folder name displayed on the Select Start Menu Folder
wizard page.
/user="username", /company="company name", /serial="serial number"
Use these switches to pass the registration info (username, company name and serial
number) to the installer.

To remove Neevia PDFcompress from your computer:

1. Select Settings -> Control Panel from the Start menu.

2. In the Control Panel click Add/Remove programs and select Neevia PDFcompress from the
applications list.

3. Click the Add/Remove button to remove the program. A confirmation prompt is displayed.

Unattended uninstall:
To perform an unattended (silent) uninstall, launch unins000.exe from the folder where the
application has been installed with /verysilent /norestart command line switches. Here is the
full list of supported switches:

/SILENT, /VERYSILENT
When specified, the uninstaller will not ask the user for startup confirmation or a
message stating that uninstall is complete. Shared files that are no longer in use are
deleted automatically without prompting. Any critical error messages will still be shown
on the screen. When '/VERYSILENT' is specified, the uninstall progress window is not
displayed. If a restart is necessary and the '/NORESTART' command isn't used (see below)
and '/VERYSILENT' is specified, the uninstaller will reboot without asking.

/NORESTART
Instructs the uninstaller not to reboot even if it's necessary.

How to register Neevia PDFcompress


After you downloaded the product run the installer and at the end of the process enter your
registration info. If you do not have a serial number and simply want to test the product
select Evaluate Product then click Finish. To register via the graphic interface right click on
PDFcompress.exe select Run as administrator then click About -> Register -> copy and paste
your licensing info.

neeviaPDF.com - high performance PDF tools Page 8 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Using the Command Line Interface to compress PDF files


By default, the PDFcompress command line application is located in the c:\program files\neeviaPDF.com\
PDFcompress\cmdLine folder.

Usage: CLcompr.exe <inputfile> [outputfile] [options]

<inputfile> PDF file to compress.

[outputfile] Output PDF file. If left blank it will be the same as the input file

Supported Options

-u <password> user password to input PDF file

-lin linearizes output PDF file


Example:
CLcompr.exe c:\input.pdf c:\output.pdf -u password -lin

-cos creates object streams (slower compression but smaller output)


Example:
CLcompr.exe c:\input.pdf c:\output.pdf -cos

-ci <value> color image compression


possible values:
jpx - JPEG2000 compression (default)
jpg - JPEG compression
zip - Deflate (ZIP) compression
none - Image will be left uncompressed
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -ci jpx

-cq <value> color image compression quality


possible values: 0 .. 100 (default is 75)
this parameter applies only to jpx and jpg compressions
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -ci jpx -cq 80

-gi <value> grayscale image compression


possible values:
jpx - JPEG2000 compression (default)
jpg - JPEG compression
zip - Deflate (ZIP) compression
none - Image will be left uncompressed
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -gi jpx

-gq <value> grayscale image compression quality


possible values: 0 .. 100 (default is 75)
this parameter applies only to jpx & jpg compressions
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -gi jpx -gq 80

neeviaPDF.com - high performance PDF tools Page 9 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

-mi <value> monochrome image compression


possible values:
jbig2 - JBIG2 lossy compression (default)
jbig2l - JBIG2 lossless compression
fax - Group 4 CCITT facsimile (fax) compression
zip - Deflate (ZIP) compression
none - Image will be left uncompressed
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -mi jbig2l

-mq <value> monochrome image compression quality


possible values: 0 .. 10 (default is 5)
this parameter applies only to jbig2 and jbig2l compressions
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -mi jbig2l -mq 8

-crt <value> threshold in DPI to activate color images resampling


(default: 0 - no resampling)

-crr <value> color images resolution in DPI after resampling


(default: 150)

-grt <value> threshold in DPI to activate grayscale images resampling


(default: 0 - no resampling)

-grr <value> grayscale images resolution in DPI after resampling


(default: 150)

-mrt <value> threshold in DPI to activate monochrome images resampling


(default: 0 - no resampling)

-mrr <value> monochrome images resolution in DPI after resampling


(default: 150)
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -crt 225 -crr 150 -grt 225 -grr 150 -mrt 225 -mrr 150

Encryption settings:
-owner <value> owner password to use for encrypting output PDF file

-user <value> user password to use for encrypting output PDF file

-rc4 uses 128 bits RC4 encryption for encrypting output file

-aes uses 128 bits AES encryption for encrypting output file

-aes256 uses 256 bits AES encryption for encrypting output file

-aes256v2 uses 256 bits AES R6 encryption for encrypting output file

-nometa does not encrypt PDF Metadata

neeviaPDF.com - high performance PDF tools Page 10 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

-onlyattach encrypts only attachments

-perms <value> PDF security permissions to use for encrypting output file
flags:
p - document printing is denied
c - changing the document is denied
s - selection and copying of text and graphics is denied
a - adding or changing annotations or form fields is denied
The following flags are defined for 128 bits encryption:
i - disable editing of form fields
e - disable extraction of text and graphics
d - disable document assembly
q - disable high quality printing
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -owner test -aes -perms pcs

-ver <value> 2,...,7. Output PDF file version

-duplicates removes duplicate fonts and color profiles

-optimize optimizes page content streams

-lzw2flate in streams that use LZW encoding, use Flate instead

-unembedfonts unembeds the base 14 fonts

-forms removes forms from output PDF

-bookmarks removes bookmarks from output PDF

-annotations removes annotations from output PDF

-labels removes page labels from output PDF

-articlethreads removes article threads from output PDF

-layers removes hidden layers and flatten visible ones

-taggedinfo removes tagged info from output PDF

-thumbnails removes page thumbnails

-altimages removes alternate images and leave only the one for on-screen viewing

-dests removes named destinations from output PDF

-embeddedfiles removes embedded files (attachments) from output PDF


Example:
CLcompr.exe c:\input.pdf c:\output.pdf –forms –bookmarks -taggedinfo

neeviaPDF.com - high performance PDF tools Page 11 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

-title <value> sets output PDF file title to <value>

-author <value> sets output PDF file author to <value>

-creator <value> sets output PDF file creator to <value>

-subject <value> sets output PDF file subject to <value>

-keywords <value> sets output PDF file keywords to <value>


Example:
CLcompr.exe c:\input.pdf c:\output.pdf -title "Daily Report"

-openmagn <value> sets open magnification (in %) for output PDF file

-openpage <value> sets open page for output PDF file


Example:
CLcompr.exe c:\input.pdf c:\output.pdf -openmagn 50 -openpage 1

-pm <value> specifies how output file should be displayed when opened in PDF viewer.
Possible values:
0 - Default view
1 – Page only
2 - Outlines (bookmarks) visible
3 - Thumbnail images visible
4 - Optional content group panel visible
5 - Attachments panel visible
6 - Full screen mode

-pl <value> specifies page layout to use when output file is opened in PDF viewer.
Possible values:
1 - Displays one page at a time (default)
2 - Displays the pages in one column
3 - Displays the pages in two columns, with odd numbered pages on the left
4 - Displays the pages in two columns, with odd numbered pages on the right
5 - Displays the pages two at a time, with odd numbered pages on the left
6 - Displays the pages two at a time, with odd numbered pages on the right
Example:
CLcompr.exe c:\input.pdf c:\output.pdf -pm 2 -pl 1

-hidemenubar specifies if PDF viewer should hide menu bar when output file is displayed

-hidetoolbar specifies if PDF viewer should hide toolbar when output file is displayed

-hidewindowui specifies if PDF viewer should hide user interface elements when output file is
displayed

-fitwindow specifies if PDF viewer should resize the document's window to fit the size of
the first displayed page

-centerwindow specifies if PDF viewer should position the document's window in the center of
the screen
Example: CLcompr.exe c:\input.pdf c:\output.pdf -hidetoolbar -hidemenubar

neeviaPDF.com - high performance PDF tools Page 12 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Using the COM Interface to compress PDF files

Class ID
PDFcompress.Neevia
Example:
Visual Basic: Set NVcomp = CreateObject("PDFcompress.Neevia")
Delphi: NVcomps := CreateOLEObject("PDFcompress.Neevia")

Using the .NET assembly to compress PDF files


To use the PDFcompress.NET interface for compressing PDF files, in Visual Studio go Project -> Add
Reference ->.NET and select PDFcompressNET from the list. After this:
Visual Basic: Dim NVcomp As New PDFcompress.Neevia
Visual C#: PDFcompress.Neevia NVcomp = new PDFcompress.Neevia();

Properties
version
Returns the PDFcompress version
Syntax
value = NVcomp.version
Data Type: String

Linearize
Specifies whether the compressed PDF file should be linearized (Optimized for fast Web View).
Possible values: true, false (Default value: false)
Syntax
NVcomp.Linearize = value
Data Type: Boolean

PDFPassword
Specifies the open password to use when compressing an encrypted PDF file.
Syntax
NVcomp.PDFPassword = value
Data Type: String

Optimize
Specifies whether to optimize page content streams in the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.Optimize = value
Data Type: Boolean

neeviaPDF.com - high performance PDF tools Page 13 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

LZWtoFlate
In streams that use LZW encoding, use Flate instead
Possible values: true, false (Default value: false)
Syntax
NVcomp.LZWtoFlate = value
Data Type: Boolean

UnembedFonts
Specifies whether to unembed the base 14 fonts from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.UnembedFonts = value
Data Type: Boolean

removeBookmarks
Specifies whether to remove bookmarks from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeBookmarks = value
Data Type: Boolean

removeAnnotations
Specifies whether to remove text annotations from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeAnnotations = value
Data Type: Boolean

removeAcroForms
Specifies whether to remove PDF forms from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeAcroForms = value
Data Type: Boolean

removePageLabels
Specifies whether to remove page labels from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removePageLabels = value
Data Type: Boolean

removeLayers
Specifies whether to remove layers from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeLayers = value
Data Type: Boolean

neeviaPDF.com - high performance PDF tools Page 14 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

removeArticleThreads
Specifies whether to remove article threads from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeArticleThreads = value
Data Type: Boolean

removeTaggedInfo
Specifies whether to remove tagged information from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeTaggedInfo = value
Data Type: Boolean

removePageThumbnails
Specifies whether to remove page thumbnails from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removePageThumbnails = value
Data Type: Boolean

removeDuplicates
Specifies whether to remove duplicate fonts and color profiles from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeDuplicates = value
Data Type: Boolean

removeAltImages
Specifies whether to remove alternate images from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeAltImages = value
Data Type: Boolean

removeNamedDestinations
Specifies whether to remove named destinations from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeNamedDestinations = value
Data Type: Boolean

removeEmbeddedFiles
Specifies whether to remove embedded files (attachments) from the compressed PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.removeEmbeddedFiles = value
Data Type: Boolean

neeviaPDF.com - high performance PDF tools Page 15 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

PreservePDFA
Specifies whether to preserve the PDF/A standard when compressing the PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.PreservePDFA = value
Data Type: Boolean

CreateObjectStreams
Specifies whether to create object streams when compressing the PDF file.
Possible values: true, false (Default value: false)
Syntax
NVcomp.CreateObjectStreams = value
Data Type: Boolean
Note: An object stream represents a stream that contains a sequence of PDF objects. This allows a greater
number of PDF objects to be compressed.

CI
Specifies the color image compression algorithm.
Possible values:
jpx - JPEG2000 compression (default)
jpg - JPEG compression
zip - Deflate (ZIP) compression
none - Image will be left uncompressed
Syntax
NVcomp.CI = value
Data Type: String

CQ
Specifies the color image compression quality. Possible values: 0 .. 100 (default is 75).
Syntax
NVcomp.CQ = value
Data Type: Integer
Note: this parameter applies only to jpx and jpg compressions.

GI
Specifies the grayscale image compression algorithm.
Possible values:
jpx - JPEG2000 compression (default)
jpg - JPEG compression
zip - Deflate (ZIP) compression
none - Image will be left uncompressed
Syntax
NVcomp.GI = value
Data Type: String

neeviaPDF.com - high performance PDF tools Page 16 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

GQ
Specifies the color image compression quality. Possible values: 0 .. 100 (default is 75).
Syntax
NVcomp.GQ = value
Data Type: Integer
Note: this parameter applies only to jpx and jpg compressions.

MI
Specifies the monochrome image compression algorithm.
Possible values:
jbig2 - JBIG2 lossy compression (default)
jbig2l - JBIG2 lossless compression
fax - Group 4 CCITT facsimile (fax) compression
zip - Deflate (ZIP) compression
none - Image will be left uncompressed
Syntax
NVcomp.MI = value
Data Type: String

MQ
Specifies the color image compression quality. Possible values: 0 .. 10 (default is 5).
Syntax
NVcomp.MQ = value
Data Type: Integer
Note: this parameter applies only to jbig2 and jbig2l compressions.

CRT
Specifies the threshold in DPI to activate color images resampling.
Default value: 0 - no resampling
Syntax
NVcomp.CRT = value
Data Type: Integer

CRR
Specifies the color image resolution in DPI after resampling.
Default value: 150
Syntax
NVcomp.CRR = value
Data Type: Integer

GRT
Specifies the threshold in DPI to activate grayscale images resampling.
Default value: 0 – no resampling
Syntax
NVcomp.GRT = value
Data Type: Integer

neeviaPDF.com - high performance PDF tools Page 17 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

GRR
Specifies the grayscale image resolution in DPI after resampling.
Default value: 150
Syntax
NVcomp.GRR = value
Data Type: Integer

MRT
Specifies the threshold in DPI to activate monochrome images resampling.
Default value: 0 – no resampling
Syntax
NVcomp.MRT = value
Data Type: Integer

MRR
Specifies the grayscale image resolution in DPI after resampling.
Default value: 150
Syntax
NVcomp.MRR = value

neeviaPDF.com - high performance PDF tools Page 18 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

PDF Encryption related properties

PDFEncrypt
Specifies whether the output PDF file should be encrypted.
Possible values: true, false (Default value: false)
Syntax
NVcomp.PDFEncrypt = value

PDFEncryptMetaData
Specifies whether the metadata in the output PDF file should be encrypted.
Possible values: true, false (Default value: true)
Syntax
NVcomp.PDFEncrypt = value

PDFEncryptionType
Specifies the encryption algorithm
Possible values: "rc4" (high - 128 bits RC4 encryption - Acrobat 5-and-later compatible)
"aes" (high - 128 bits AES encryption - Acrobat 6-and-later compatible)
"aes256" (high - 256 bits AES encryption - Acrobat 9-and-later compatible)
"aes256v2" (high - 256 bits AES R6 encryption - Acrobat X-and-later compatible)

Syntax
NVcomp.PDFEncryptionType = value
Data Type: String
Note: will have effect only if PDFEncrypt = true.

PDFUserPassword
Sets the user password in the output document. Users will be asked to enter this password before Acrobat
Reader allows them to view the document.
Syntax
NVcomp.PDFUserPassword = value
Data Type: String
Note: will have effect only if PDFEncrypt = true.

PDFOwnerPassword
Sets the output document owner password. This option will force the user of the PDF to enter a password
before Acrobat Reader allows them to change the user password and security permissions.
Syntax
NVcomp.PDFOwnerPassword = value
Data Type: String
Note: will have effect only if PDFEncrypt = true.

neeviaPDF.com - high performance PDF tools Page 19 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

PDFPermissions
PDF security permissions to use for encrypting output file. Possible values:
p - document printing is denied
c - changing the document is denied
s - selection and copying of text and graphics is denied
a - adding or changing annotations or form fields is denied
The following flags are defined for 128 bits encryptions:
i - disables editing of form fields
e - disables extraction of text and graphics
d - disables document assembly
q - disables high quality printing
Syntax
NVcomp.PDFPermissions = value
Data Type: String
Example:
NVcomp.PDFPermissions = "pcsaiedq"

neeviaPDF.com - high performance PDF tools Page 20 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

PDF Initial View & Metadata related properties


DocumentTitle
Sets the output document Title field.
Syntax
NVcomp.DocumentTitle = value
Data Type: String

DocumentSubject
Sets the output document Subject field.
Syntax
NVcomp.DocumentSubject = value
Data Type: String

DocumentAuthor
Sets the output document Author field.
Syntax
NVcomp.DocumentAuthor = value
Data Type: String

DocumentKeywords
Sets the output document Keywords field.
Syntax
NVcomp.DocumentKeywords = value
Data Type: String

PageMode
Specifies how output file should be displayed when opened in PDF viewer. Possible values:
0 - Default view
1 - Page only
2 - Outlines (bookmarks) visible
3 - Thumbnail images visible
4 - Optional content group panel visible
5 - Attachments panel visible
6 - Full screen mode
Syntax
NVcomp.PageMode = value
Data Type: Long

PageLayout
Specifies page layout to use when output file is opened in PDF viewer. Possible values:
1 - Displays one page at a time (default)
2 - Displays the pages in one column
3 - Displays the pages in two columns, with odd numbered pages on the left
4 - Displays the pages in two columns, with odd numbered pages on the right
5 - Displays the pages two at a time, with odd numbered pages on the left
6 - Displays the pages two at a time, with odd numbered pages on the right
Syntax
NVcomp.PageLayout = value
Data Type: Long

neeviaPDF.com - high performance PDF tools Page 21 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

OpenMagnification
Specifies the open magnification (in %) for output PDF file. Default value: 100
Syntax
NVcomp.OpenMagnification = value
Data Type: Long

OpenAtPage
Specifies the open page for output PDF file. Default value: 1 (first page)
Syntax
NVcomp.OpenAtPage = value
Data Type: Long

FitWindow
Specifies if PDF viewer should resize the document's window to fit the size of the first displayed page.
Possible values: true, false
Syntax
NVcomp.FitWindow = value
Data Type: Boolean

CenterWindow
Specifies if PDF viewer should position the document's window in the center of the screen.
Possible values: true, false
Syntax
NVcomp.CenterWindow = value
Data Type: Boolean

HideMenuBar
Specifies if Acrobat Reader should hide the menu bar when displaying the output PDF document.
Possible values: true, false
Syntax
NVcomp.HideMenuBar = value
Data Type: Boolean

HideToolbar
Specifies if Acrobat Reader should hide the toolbar when displaying the output PDF document.
Possible values: true, false
Syntax
NVcomp.HideToolbar = value
Data Type: Boolean

HideWindowUI
Specifies if Acrobat Reader should hide the user interface when displaying the output PDF document.
Possible values: true, false
Syntax
NVcomp.HideWindowUI = value
Data Type: Boolean

neeviaPDF.com - high performance PDF tools Page 22 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Methods

CompressPDF
Compresses the specified PDF file.
Syntax
Res = NVcomp.CompressPDF( fileToCompress, outputFile )
Parameters
fileToCompress - PDF file to compress.
outputFile - output PDF file name.
Example
Res = NVcomp.CompressPDF("c:\input.pdf", "c:\out.pdf")
Remarks
Res<>0 on error
Return codes
0 - Success
-1 - General compression error
-109 - Input PDF has no pages (most likely a corrupt PDF file)
-200 ... -299 - these error codes are related to the input PDF parsing process (most likely the input PDF file is
corrupted or has syntax errors);
-300 ... -399 - these error codes are related to the output PDF creation process (most likely the user account
PDFcompress is called from doesn’t have write permissions to the destination folder).

neeviaPDF.com - high performance PDF tools Page 23 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Using the graphic interface to compress PDF files


In order to compress files using the graphic interface you need to run PDFcompress.exe located, by
default, under C:\program files (x86)\neeviaPDF.com\PDFcompress\apps.

Click Add files to select the PDF file(s) to be compressed. In case you want to compress all PDF files
in a folder simply click Add Folder to select the folder or Add Folders for multiple folders.

neeviaPDF.com - high performance PDF tools Page 24 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Output Settings
Before compressing PDF files you need to specify the output settings. To do that click on the Settings
button. The interface below will be displayed:

General Settings
In this window you can specify the compression settings to be used during the file
compression process.

First you need to select the compression compatibility level. There are three options:
1. Acrobat 4 (PDF v1.3)
2. Acrobat 5 (PDF v1.4)
3. Acrobat 6 (PDF v1.5 and higher)

neeviaPDF.com - high performance PDF tools Page 25 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Image Settings - the following options can be specified:

ZIP compression - this is a lossless algorithm which means that the content of your images will not
change by compressing them. Basically ZIP works like this: it scans an image to detect patterns
in it and replaces them by a single token. It can compress color, grayscale and monochrome
images.

JPEG compression - designed specifically for compression of sampled continuous-tone


(photographic) images and not for general data compression, JPEG is a lossy compression
method. The compression results you can obtain using the JPEG algorithm depend on the
image being compressed and the amount of loss that is acceptable. When JPEG is selected you
can set the Image quality using values from 0 to 100. It can be used for color and grayscale
images only.

Fax compression - designed to achieve efficient compression of monochrome (1 bit per pixel)
image data at relatively low resolutions which means that it is useful only for bitmap image
data, not for color images, grayscale images, or general data.

JPEG2000 compression - defines a wavelet-based method for image compression. Compared to


other methods such as regular JPEG or CCITT, JPEG2000 gives a better size reduction. Although
the filter can reproduce samples that are losslessly compressed, it is recommended only for
use with color and grayscale images and not for general data compression. When JPEG2000 is
selected you can set the Image quality using values from 0 to 100.

JBIG2 compression - designed for both lossless and lossy compression. Useful only for
monochrome images, not for color images, grayscale images, or general data. Compared to
CCIT, JBIG2 provides considerably better compression. The compression it achieves depends
strongly on the nature of the image. Even though the best compression level is achieved for
images of text, JBIG2 also includes algorithms for compressing sections of an image that
contain dithered halftone images (valid mainly for photographs). When JBIG2 is selected (lossy
or lossless) you can set the Image quality using values from 0 to 10.

Downsample - decreases the number of pixels in the image which in turn makes the file smaller.
By default, all images above 225 dpi will be downsampled to 150 dpi using a bicubic algorithm.

Output File(s) Settings – use this option to specify where to save the compressed file. Select next to
the input file(s) if you want to place the ouput file(s) in the same folder with the original
document(s). In case you’d like to overwrite the input file(s) select Replace input file(s). To specify a
different folder select Place output in folder and click Browse to open the folder.

neeviaPDF.com - high performance PDF tools Page 26 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Discard Objects
After you select your compression types click this tab to specify what to keep and what to remove
from the input file during the compression process:

All objects listed in the above interface, when checked, will be removed if they are present in the
input file.

neeviaPDF.com - high performance PDF tools Page 27 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Miscelaneous Settings.

• Optimize output file(s) for Fast Web Viewing - this option restructures the resulting PDF
document for page-at-a-time downloading (byte-serving) which is especially important with
large documents that can take a long time to download from a server.

• Create Object Streams - valid only with Acrobat 6 (PDF v1.5) and higher. An object stream
represents a stream that contains a sequence of PDF objects. This allows a greater number
of PDF objects to be compressed.

• Optimize page content streams - this option restructures the page content to save space.

• Preserve PDF/A - keeps the PDF/A standard specified in the original document.

• Remove duplicate images, fonts and color profiles - removes redundant images, fonts and
color profiles.

neeviaPDF.com - high performance PDF tools Page 28 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

• In streams that use LZW encoding use Flate instead - applies Flate compression to all
images and streams that use LZW.

• Unembed the base 14 fonts - removes any of the 14 base fonts that are emdedded.

PDF Information
In the interface below you can specify Title, Author, Subject and Keywords for the compressed file.

neeviaPDF.com - high performance PDF tools Page 29 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

PDF Security

To encrypt the output PDF file(s), check Encrypt Document then select the encryption level from the
Compatibility drop down box. There are 6 options:
a. Acrobat 3.0 and later (PDF 1.2) enables 40 bit RC4 encryption (weak - not recommended)
b. Acrobat 5.0 and later (PDF 1.4) enables 128 bit RC4 encryption
c. Acrobat 6.0 and later (PDF 1.5) enables 128 bit RC4 encryption
d. Acrobat 7.0 and later (PDF 1.6) enables 128 bit AES encryption
e. Acrobat 9.0 and later (PDF 1.7) enables 256 bit AES encryption
f. Acrobat X and later (PDF 1.7 ext 3) enables 256 bit AES R6 encryption

Encrypt All Document Contents


When you select this option both the document and document metadata will be encrypted. Search
engines will not be able to access the document metadata when this option is used.

neeviaPDF.com - high performance PDF tools Page 30 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Encrypt All Document Contents Except Metadata


It is valid for Acrobat 6 and later. Only the content of a PDF document will be encrypted. Metadata
remains fully accesible for search engines.

Require a Password to Open the Document


This allows you to set a password for opening the encrypted PDF.

Change Permissions Password


This password prevents users from changing the permission settings. The user can view the file in
Acrobat Reader but must enter the specified Permissions password in order to change the file’s
Security and Permissions settings.

Permissions

Printing Allowed - Specifies the level of printing that users are allowed for the PDF document.
Possible values:
None - Disables printing.
Low Resolution (150 dpi) - Users can print but the resolution will not be higher than 150-dpi.
Each page is printed as a bitmap image which may cause files to print at a slower
speed. To make this option available set the Compatibility option to Acrobat 5 (PDF 1.4)
or later.
High Resolution - Allow users to print at any resolution. PostScript and other printers that
come with high-quality printing features can be used.

Changes Allowed - Enables the editing actions that are allowed in the PDF document. Possible values:

None - when selected none of the changes listed in Changes Allowed drop down box, such as
filling in form fields and adding comments are permitted.

Inserting, Deleting, And Rotating Pages - allows users to insert, delete, and rotate pages. Also
bookmarks and thumbnails creation are permitted. This option works only for high
(128-bit RC4 or AES) encryption.

Filling in Form Fields and Signing Existing Signature Fields - when selected users can fill in
forms and add digital signatures. Adding comments or creating form fields is not
permitted. This option works only for high (128-bit RC4, AES or AES256) encryption.

Commenting, Filling In Form Fields and Signing Existing Signature Fields - users are allowed
to add comments, digital signatures and fill in forms. Moving page objects or create
form fields is not permitted.

Page Layout, Filling in Form Fields and Signing - users can insert, rotate or delete pages and
create bookmarks or thumbnail images, fill out forms, and add digital signatures.
Creating form fields is not permitted. This option works only for low (40-bit RC4)
encryption.

Any Except Extracting Pages - allows users to edit the document, create and fill in form fields,
add comments and digital signatures.

neeviaPDF.com - high performance PDF tools Page 31 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Enable Copying of Text, Images, and Other Content - allows users to select and copy the contents of
a PDF.

Enable Text Access For Screen Reader Devices For The Visually Impaired - when selected visually
impaired users can read the document with screen readers. It doesn’t allow users to copy or
extract the document’s contents. This option works only for high encryption (128-bit RC4, AES,
AES256, AES256v2 ).

PDF Initial View


In this window you can set the PDF Initial View options:

Navigation Tab - Specifies which panels are displayed in the PDF viewer navigation pane.

Page Layout - Specifies how document pages are arranged.

Magnification - use this to select at what zoom level the document will appear when opened.

neeviaPDF.com - high performance PDF tools Page 32 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Open To Page - Specifies the page that appears when the PDF document opens.

Window Options - these options allow you to specify how the PDF viewer window adjusts in the
screen area when a PDF document is opened.

Resize Window To Initial Page - adjusts the document window to fit snugly around the opening
page, taking into account the options that you selected under
Document Options.

Center Window On Screen - instructs the PDF viewer to position the window in the center of
the screen area.

Open In Full Screen Mode - maximizes the document window and displays the document
without the menu bar, toolbar, or window controls.

User Interface Options


These options allow you to specify which parts of the PDF viewer interface - the menu bar, the
toolbars, and the window controls - are hidden.
Note: take into account that if you hide the menu bar and toolbars users cannot apply commands
and select tools unless they know the keyboard shortcuts.

neeviaPDF.com - high performance PDF tools Page 33 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

GUI - Graphic User Interface

In this window you can select the Graphic User Interface themes. Check Use GUI Themes to enable
the Color Scheme. Once that is enabled check either Gradient fill or Solid fill to specify how the color
will be displayed.

neeviaPDF.com - high performance PDF tools Page 34 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

CODE SAMPLES

For a full and updated list of PDFcompress code samples please visit
http://neeviaPDF.com/support/examples/pdfcompress/

Example 1vb. Compress a PDF file (high image quality, low compression) (Visual Basic)
Dim NVcomp : Set NVcomp = CreateObject("PDFcompress.Neevia")

NVcomp.CI = "jpx"
NVcomp.CQ = 75

NVcomp.GI = "jpx"
NVcomp.GQ = 75

NVcomp.MI = "jbig2l"
NVcomp.MQ = 5

'For better compression uncomment the line below


' NVcomp.CreateObjectStreams = true

Dim retVal : retVal = NVcomp.CompressPDF("c:\in.pdf","c:\out.pdf")


If retVal <> 0 Then
MsgBox("Error code=" & CStr(retVal))
Else
MsgBox("Done")
End If

Example 1delphi. Compress a PDF file (high image quality, low compression) (Delphi)
procedure TForm1.Button1Click(Sender: TObject);
var
NVcomp : Variant;
retVal : Integer;
begin
NVcomp := CreateOleObject('PDFcompress.Neevia');

NVcomp.CI := 'jpx';
NVcomp.CQ := 75;

NVcomp.GI := 'jpx';
NVcomp.GQ := 75;

NVcomp.MI := 'jbig2l';
NVcomp.MQ := 5;

// For better compression uncomment the line below


// NVcomp.CreateObjectStreams := true;

retVal := NVcomp.CompressPDF('c:\in.pdf', 'c:\out.pdf');


if retVal <> 0 then
Application.MessageBox(PChar('Error code=' + IntToStr(retVal)),'',0)
else
Application.MessageBox('Done','',0);
end;

neeviaPDF.com - high performance PDF tools Page 35 of 36


Neevia PDFcompress v4.4 user’s manual last modified: November 15, 2021

Example 2vb. Compress a PDF file (low image quality, MAX compression) (Visual Basic)
Dim NVcomp : Set NVcomp = CreateObject("PDFcompress.Neevia")

NVcomp.CI = "jpx"
NVcomp.CQ = 10

NVcomp.GI = "jpx"
NVcomp.GQ = 10

NVcomp.MI = "jbig2"
NVcomp.MQ = 1

NVcomp.CreateObjectStreams = true

NVcomp.removePageLabels = true
NVcomp.removeArticleThreads = true

Dim retVal : retVal = NVcomp.CompressPDF("c:\in.pdf","c:\out.pdf")


If retVal <> 0 Then
MsgBox("Error code=" & CStr(retVal))
Else
MsgBox("Done")
End If

Example 2delphi. Compress a PDF file (low image quality, MAX compression) (Delphi)
procedure TForm1.Button1Click(Sender: TObject);
var
NVcomp : Variant;
retVal : Integer;
begin
NVcomp := CreateOleObject('PDFcompress.Neevia');

NVcomp.CI := 'jpx';
NVcomp.CQ := 10;

NVcomp.GI := 'jpx';
NVcomp.GQ := 10;

NVcomp.MI := 'jbig2';
NVcomp.MQ := 1;

NVcomp.CreateObjectStreams := true;

NVcomp.removePageLabels := true;
NVcomp.removeArticleThreads := true;

retVal := NVcomp.CompressPDF('c:\in.pdf', 'c:\out.pdf');


if retVal <> 0 then
Application.MessageBox(PChar('Error code=' + IntToStr(retVal)),'',0)
else
Application.MessageBox('Done','',0);
end;

neeviaPDF.com - high performance PDF tools Page 36 of 36

You might also like