Section:

Frequently Asked Questions

Is DocPub available as a toolkit (SDK) for integration with third party applications?

For developers who are looking for more control over the conversion process than a command-line utility can provide, developers can also license DocPub functionality as part of our PDF SDK and the applicable add-ons for the required conversions (such as WebViewer Add-on for conversion to XOD, or the PDF to HMTL Add-on, etc.). Apryse's PDF SDK is an industry-leading, high-quality document core technology platform powering mobile, server, desktop, web, and cloud-based apps. Using the Apryse library, developers can create powerful PDF document solutions and applications that can convert, generate, manipulate, optimize, print, view, and markup PDF documents without any third-party software dependencies.

Apryse's PDF SDK is available as a .NET component, and as a cross-platform C/C++, Java, Ruby, Python, PHP and Objective-C, PDF library, that is available on a wide range of platforms (i.e. Windows, Linux, Mac OS X, Android, iOS, Windows 8/RT, etc).

For more details, please contact an Apryse representative via info@apryse.com or sales@apryse.com.

What is XPS?

"XPS" stands for "XML Paper Specification" and is a new document format as well as the native print spooler format in Microsoft® Windows. The XPS document format consists of XML markup that defines the layout of a document and the visual appearance of each page along with rendering rules for distributing, archiving, rendering, processing and printing the documents. Just like PDF, the XPS document format enables users to view, print, and archive any type of documents without the original program that created them and without loss of fidelity.

What is XOD?

XOD is a web optimized Open XPS format developed for hosting documents online. It facilitates fast viewing of large size files while ensuring high quality display.

XOD documents can be stored locally as well, and can also be viewed by any XPS viewer. Any PDF, XPS, or any printable document, can be converted to XOD format with Apryse's command-line DocPub utility.

Does DocPub have any dependencies on third party components/software?

For most conversions, including PDF, SVG, XPS, XOD, PNG, JPG, etc, DocPub is a completely stand-alone application and does not include any dependencies on third-party components or software. For some other types of conversion, external programs are required, see below.

How do I convert Microsoft Office formats on Windows?

To convert Word, Excel, PowerPoint, Publisher and Visio files, you need either the respective Microsoft application (which we will call Office for short), or another program that can print them, installed on the computer doing the conversion. For best performance, and results, install Microsoft Office. Otherwise, see below.

How do I convert other file formats not listed on Windows?

Finally, to convert any (proprietary or non-standard) document on Windows, you need to have an application that can print the file type.

See the custom conversions forum post for more information.

How do I save converted files in a given folder?

By default, DocPub saves converted files in the current working folder. To specify another output location, use the '-o' (or --output) parameter. For example:

DocPub --o "c:\My Output" 1.xps 2.jpg 3.doc

Note: If the specified path does not exist, DocPub will attempt to create the necessary folders.

How can I control the output name for the converted files?

DocPub will, by default, create a single file with the name of the input file. The output filename can be changed using the '--suffix' option. For example, the following command-line generates an output document named mydoc_mysuffix.xps:

DocPub -f xod ---suffix _mysuffix mydoc.pdf

How do I specify which files to convert?

DocPub provides the "---extension" option to filter out the specific file types. For example, the following command-line will process only PDF files and will convert them to XOD format.

DocPub -f xod "c:\My Input" ---extension pdf --o "c:\My Output"

How do I batch convert files?

DocPub supports batch conversion of many files in a single pass. To convert all files in a given folder(s) you can use the following syntax:

DocPub -f pdf "c:\My Input" -- o "c:\My Output"

The '--subfolders' option can be used to recursively process all subfolders. For example, the following line will convert all documents in 'myfolder1' and 'myfolder2' as well as all subfolders:

DocPub --subfolders myfolder1 myfolder2

The use of wild characters is also allowed. For example, to convert all PDF files starting with 'x' in the current folder to XOD format use:

DocPub -f xod x*.pdf

How do I convert a password protected PDF?

DocPub will, without user intervention, convert PDF documents secured with a master/owner password. If the document is secured using a user (or 'file open') password, DocPub will prompt you to enter the password.

For unattended conversion, the password can also be specified directly on the command-line using the '-p' (or --pass) option. For example:

DocPub -f xod -p secret secured.pdf

The above command line will convert PDF to XOD and will use the provided password ('secret') to open the secured document (i.e. 'secured.pdf').

Note: DocPub supports all standard security options available in PDF, including 40 and 128 bit RC4 encryption, Crypt filters, and AES (Advanced Encryption Standard) encryption.

How do I create an encrypted XOD file?

To create a XOD file where the individual parts are encrypted with AES 128.

DocPub -f xod -xod_encrypt secret license.pdf

The generated XOD file can be used with one of the Apryse WebViewer's to decrypt using the password 'secret'.

What quality can I expect from the output XOD document?

Since DocPub always attempts to maintain the original document appearance, the vast majority of output files will successfully preserve the appearance and quality of the original documents. Occasionally, there will be elements that can't be accurately converted. In these cases DocPub will by default render the necessary elements at 150 dpi or at the resolution given by the --dpi parameter. Note though that there is a cap on how large an image can be, controlled by --max_image_pixels parameter, which by default is 2 megapixels. For this example we will set the cap at 5 megapixels:

DocPub -f xod --dpi 200 --max_image_pixels 5000000 doc.pdf

would render those elements at 200 dots per inch.

In other select cases, to generate the exact appearance of the original PDF document, an entire page may need to be rendered. In these cases rendering can be disabled using the '--norender' option as in the following example:

DocPub -f xod --norender doc.pdf

This option will preserve resolution independent properties of input documents (including fonts, paths, and shadings) as well as text selection and extraction capability in the processing software.

Finally, there is the option to 'flatten' content. The default when converting to XOD is 'fast' flatten mode, which try to generate a PDF that renders faster on limited speed/memory devices. This can include changing color spaces, to converting complex paths to an image. You can also turn this off to help ensure that as much content is preserved as is.**

DocPub -f xod --flatten off doc.pdf

If you want to flatten, there is a way to control how much is flattened, or not, by adjusting the flatten threshold. The images below demonstrate how --flatten_threshold can affect flattening. Notice that the large text is never flattened, only the text occluded by the rectangle.

Apryse Docs Image

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales