开发者

pdftk unable to save on different folder

I'm using pdftk for flattening PDF files on server. For this purpose I use PHP. This is my code in PHP. Btw, I'm using this on WAMP.

passthru("pdftk editable开发者_如何学Pythonpdf/jason.pdf output flattenpdf/flattened.pdf flatten");

The pdftk.exe file and the accompanying .dll file both exist in the www directory. editablepdf and flattenpdf are two separate directories in the www directory.

After executing the script and checking, i find the pdfs haven't been saved. When i tried running pdftk via command prompt, it worked fine. But the same is not happening here. Is it something that's gotta do with passthru??

Thanks and Regards Sameer


was able to solve after looking around. Here's the working line -

passthru("pdftk editablepdf\\jason.pdf output flattenpdf\\flattened.pdf flatten");

Since \ acts as escape sequence character, i'm using "\ \" to denote the folder levels.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜