Error Unable To Open File For Output Doc_data.txt
computer terminal or command prompt to try these examples. Synopsis pdftk [input_pw ][
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted https://www.pdflabs.com/docs/pdftk-man-page/ up and rise to the top PDFTK: unable to open file for output up vote 0 down vote favorite 1 I am making use of PDFTK to watermark PDF files using the following command: pdftk /tmp/55180af7c8c88.pdf stamp /tmp/stamp55180af7c95b84.58412952.pdf output /tmp/55180af7c95c81.06110501.pdf However the above results in: Error: Failed to open output file: /tmp/55180af7c95c81.06110501.pdf No output created. Error: unable to open file for output: /tmp/55180af7c95c81.06110501.pdf The above is a http://serverfault.com/questions/679095/pdftk-unable-to-open-file-for-output strange error because PDFTK should be creating that output file! If I put sudo infront of the command, no error is thrown. But I am writing to the tmp folder and this is writeable by all I thought? I am running PDFTK from PHP's exec command. To be 100% sure that this isn't a permissions issue, I made the /tmp folder owner and group to be www-data, which is the apache user but the same error is thrown. I now have no idea what is going on, I appreciate any help! permissions tmp share|improve this question asked Mar 29 '15 at 14:30 Abs 2853624 1 What is output of this command, please, ls -ld /tmp /tmp/55180af7c95c81.06110501.pdf –roaima Mar 29 '15 at 19:18 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote You should not be fiddling around with the permissions for /tmp. It's an important part of the system. I suspect that the reason your pdftk command is failing is because /tmp is incorrectly set up. To restore the permissions on tmp run the following commands as root: chown root:root /tmp chmod 1777 /tmp The result will leave the permissions and owner/group of /tmp lo
/* 00003 pdftk, the PDF Toolkit 00004 Copyright (c) 2003-2006 Sid Steward 00005 00006 https://sourcecodebrowser.com/pdftk/1.41plus-pdfsg/pdftk_8cc_source.html This program is free software; you can redistribute it and/or https://ubuntuforums.org/archive/index.php/t-1647350.html modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This error unable program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 Visit: http://www.gnu.org/licenses/gpl.txt 00017 for error unable to more details on this license. 00018 00019 Visit: http://www.pdftk.com for the latest information on pdftk 00020 00021 Please contact Sid Steward with bug reports: 00022 ssteward at AccessPDF dot com 00023 */ 00024 00025 // Tell C++ compiler to use Java-style exceptions. 00026 #pragma GCC java_exceptions 00027 00028 #include
Zeon100December 17th, 2010, 11:47 AMHi guys, I am using the Tesseract package which provides OCR (optical Character Recognition for electronic document images. The 10.04 repositories currently only have 2.04 however the latest version, 3.00 is out with many new features. Here is how I got everything working: 1. Install Imagemagick Imagemagick helps convert all the document images to a format Tesseract likes. We use PDFs. "sudo apt-get install imagemagick" Usage would be like "Convert -density 300 scanneddocument.pdf -depth 8 scanneddocument.tif" This converts to a good quality tiff image with 8 bit depth (required by Tesseract). You can change the density amount as you may get better results. 2. Install Tesseract Get the required packages available in the repositories: sudo apt-get install libpng12-dev sudo apt-get install libjpeg62-dev sudo apt-get install libtiff4-dev ("sudo apt-get install zlibg-dev" is suggested in the Tesseract readme but isn't available. I found I didn't need this.) I picked this up from a comment made, you need to be able to compile and make the software. Ubuntu needs some packages to help do this. For many of you these may already be present and installed but it doesn't hurt.. sudo apt-get install gcc sudo apt-get install g++ sudo apt-get install automake Download this program which can't be gained with apt-get: http://www.leptonica.org/ My link was here: http://www.leptonica.org/source/leptonlib-1.67.tar.gz wget http://www.leptonica.org/source/leptonlib-1.67.tar.gz tar -zxvf leptonlib-1.67.tar.gz cd leptonlib-1.67 ./configure make sudo checkinstall (follow the prompts and type "y" to create documentation directory. Enter a brief description then press enter twice) sudo ldconfig Now we can actually get and install Tesseract! Remember to go back one directory from the above install of Leptonica: cd .. wget http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz tar -zxvf tesseract-3.00.tar.gz cd tesseract-3.00 ./runautoconf ./configure make sudo checkinstall (follow the prompts and type "y" to create documentation directory. Enter a brief description then press enter twice) sudo ldconfig Now for whatever reason the training data isn't installed with this. I got mine straight from Tesseract's SVN: (This is fro