verypdf blog

Question regarding Encrypt PDF Command Line

Hello Customer Support!

I am developing a website where I would like to password protect (encrypt) a basic PDF file with passwords specifically assigned to each person that the PDF file is being supplied to.  The steps are that:
* Browser script validates that the requester is entitled to receive the encrypted PDF file.
* Browser sends message to Server through AJAX.
* Server creates a copy of the file using a php copy() function call to a unique filename.
* Server encrypts the newly created filename with a requestor specific password.
* Server send a header and file data to the browser to send to requestor.

Your site tells me that you anticipate using the Command Line version inside a PHP program.  Are there PHP callable routines to accomplish this or must there be a runtime image on the server. I have not found any further documentation or hints on your website.

Can you tell me if there is any way to accomplish my goals with your product?

Thank you!
=====================================
Thanks for your message, yes, our Encrypt PDF Command Line can be called from PHP code to encrypt your PDF files, you can download the trial version of Encrypt PDF Command Line from following URL,

https://www.verypdf.com/encryptpdf/encryptpdf_cmd.zip

you can use following sample PHP source code to call encryptpdf.exe application,

<?php
...script before...
exec("C:\test\EncryptPDF.exe -i c:\sample.pdf -o C:\out.pdf -w owner -u user -e 40 -p");
...script after
?>

VeryPDF
=====================================
Thank you for your quick response.  From what you sent as a code snippit assumes that your code is running Windows and that the pdf is on the machine with the code (probably where the browser is located).  In my case the browser can be cross platform and the pdf and any routines that modify the pdf need to be on the SERVER running under CGI.
=====================================
Thanks for your message, our Encrypt PDF Command Line is a Windows application, it doesn't support Linux system at the moment, however, we are planning release a Linux version of Encrypt PDF Command Line application in the future.

VeryPDF
=====================================

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to text converter

question: pdf2txt removes whitespaces in some PDFs ?

I find your pdf2txt.exe utility very useful and fast too, congratulations.

Before ordering I would like to make sure I can find a solution to the following problem:
with certain PDF files all white spaces are removed whether I use the -whitespace command line option or not.
See examples attached.

I'm I doing something wrong or is this a known limitation ?

thank you for your feedback,
best,
==============================
Please run following command line to convert your PDF file to text file to try again, (-breaker parameter will insert page breaker into converted .txt file),

"C:\Program Files\VeryPDF PDF2TXT v3.2\pdf2txt.exe" C:\in.pdf C:\out.txt -unicode -breaker

You can also run following command line to convert PDF file to text file without page breaker symbols,

"C:\Program Files\VeryPDF PDF2TXT v3.2\pdf2txt.exe" C:\in.pdf C:\out.txt -unicode

We hoping "-unicode" parameter will work better for you, please to try.

VeryPDF
==============================
thank you, -unicode is much better.
FYI: I don't see a difference with and without -breaker and also original formatting is also kept with or without -format.

But the result is OK for me. License purchased.

thanks again,
==============================
If you use -breaker parameter, PDF2TXT software will insert a page breaker symbol 0x0C after each page.
If you use -unicode parameter, the -format parameter will be ignored.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf print

Problems of PDF printing

Ive been very pleased with you software. I use stamp and print,

but a couple of questions.

1)
I use pdfprint from my program and run it via a dos command

xApuOhjPolku = '\\progress\'.

xPdfPrint = '_pdfprint\pdfprint.exe "-$" "XXXXXXXXXXXXXXXX"'.

xPdfprint = xApuohjPolku + xPdfPrint.

xDosCMD = xPdfPrint + ' -chgbin 15 -printermargins -paper 9' + ' c:\progress\test.pdf'.

DOS SILENT VALUE(xDosCMD).

most of the time it works but with some documents it doesn’t.

for example with this one some numbers appear in a completely different position than if I print it directly from windows.

2)
DO you have a suitable program for me.
Now I open a explorer browser from my program straight to the folder that contains the wanted pdf files.
Explorer is not good in showing previews of pdf files
What I would like to do, is to open a separate program where you would see a list of all the files and when clicking on it there would be a nice preview of the file. The possibility to do some small changes to the file would be nice. Is there a layer option in PDF files.
=====================================
1). This problem maybe caused by font issue, we suggest you may add -raster2 or -useembedfont parameter to try again, these parameters may work better for you,

pdfprint.exe -raster2 C:\test.pdf
pdfprint.exe -useembedfont C:\test.pdf

2). Thanks for your message, we haven’t a PDF Preview application, I’m using Windows 7 and Acrobat 10, I can preview the PDF files in Windows Explorer easily, so I suggest you may use Windows 7 and Acrobat 10 to preview your PDF files, this can be done easily.

VeryPDF
=====================================
xDosCMD = xPdfPrint + ' -chgbin 15 -printermargins -paper 9 -useembedfont' + ' c:\progress\kuva.pdf'.

and now it seems to work, at least with this one.
=========================
Thank you for your message.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to image converter

Returncodes / exit values from pdf2img. exe

I'm trying to integrate pdf2img in java code, using java.lang.Runtime.exec()

Runtime run = Runtime.getRuntime();
Process p = null;
try
{
p = run.exec("\"C:\\Program Files\\VeryPDF PDF2Image v2.1\\pdf2img.exe\" -m -i C:\\test.pdf -o C:\\test.pdf.tif");
int salida = p.waitFor();
System.out.println("exitValue: " + salida);
}
catch (Exception e)
{
e.printStackTrace();
}
It seems to work; i get the tiff output and an exit value of 0 (By convention, 0 indicates normal termination)

But! - if I provoke an error - specifying a non exitsting directory, I also get exit value 0 (and an empty tiff-file.!)

I have also invoked VeryDOC  doc2any the same way, and it returns 1 meening succes and 0 when an error occurred.

Can you help me how to detect errors using pdf2img?
==================================
We apologize for any inconvenience this may have caused to you, maybe this is a problem in the current version of pdf2img.exe application , we will research this problem shortly.

Additionally, I suggest you may simple check the input PDF file before you deliver it to pdf2img.exe application, if input PDF file is not exist, you needn’t call pdf2img.exe application for conversion, this can be done easily, is this solution okay to you?

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
docprint pro

docPrint Document Converter Command Line

I'm using the document converter via command line.

But I'm having the following problem. When we are generating a document from a .doc to a .pdf simultaneously, the doc2pdf.exe and pdfcp.exe get queue and won't generate any document, is there a way that I can solve this problem.

doc2pdf.exe -s permission=0 -s keylen=0 -i "D:\CRM_Documentos\Incidentes\928993\word\928993.doc" -o "D:\CRM_Documentos\Incidentes\928993\word\928993.pdf"

Thanks for your help.
=====================
Thanks for your message, doc2pdf.exe doesn’t support concurrent conversion, if you wish convert more DOC files to PDF files, you need convert these DOC files to PDF files one by one, please don't launch a new instances of doc2pdf.exe until previous doc2pdf.exe process exit, please understand this limitation.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)