Please enable JavaScript to view this site.

Navigation: Developer Information > Command Line Interface

Command Line PDF Add File Attachment

Scroll Prev Top Next More

PDF Add File Attachment Command Line Format win2pdf-pro-feature

 

win2pdfd.exe addfileattachment "sourcepdf" "filetoattach" "destpdf"

 

Attaches an external file specified by "filetoattach" to the PDF specified by "sourcepdf", and saves the modified PDF to "destpdf". If "sourcepdf" and "destpdf" are the same file, the file is modified in place. The file is added as a shared attachment, and is not visible in the destination PDF. The PDF can still be viewed in any PDF viewer, but attached files can only be opened in a viewer that supports attachments such as Adobe Reader.

 

To view shared attachments in Adobe Reader, go to  " View Show/Hide Side panels Attachments"

 

For security reasons, files that could potentially contain malicious code, like .zip, .exe, and .bat, are not allowed. You can still easily attach and include a variety of files within your PDF, including images, documents, spreadsheets, audio, and video.

 

Any file names that contain spaces must be enclosed with quotation marks. The "sourcepdf" can be a local file path, or an web address (URL) to an existing PDF.

 

This feature requires a licensed version of Win2PDF Pro. Contact us for a time limited evaluation license.

 

Returns 0 on success, and a Windows system error code on failure.