Print form filled pdf to pdf file

If none of the more specific forums is the right place to ask

Print form filled pdf to pdf file

Postby schwing » 2006-06-06 22:25

First of all, I'm new to Debian pure. I migrated from windblows to Xandros since Xandros met the claims that it just works and everything for microjunk windblows was breaking my wallet. :P I've always wanted to move to Debian pure, but I got frustrated easily with it. This time I stuck it out, and I'm happy with it. I've since moved from Sarge to Etch because I upgraded Open Office to 2.0 while using Xandros, and most of my spreadsheets that I use for business were subsequently saved in OO 2.0. I am very pleased with Etch, and it is proving to be more stable than Xandros. Although Xandros is easier to use, Debian pure is noticeably faster. Nautilus is much faster than the Xandros file manager although XFM is very robust.

Sorry for the rambling, but I feel that sort of pride for being one who is sticking it out with Linux, and I feel myself in no-mans-land as I move from all the windows users to the dark side. lol.

Anyway, without getting into too much detail about my fondness of Debian, I have been struggling with printing a pdf document from Acroread to a pdf file. In Xandros, which comes with a modified version of KDE, the print dialog had the option of doing so, but Gnome does not, and I can't figure out how to do it. When I first installed Etch, I installed the KDE desktop, but some problems started to occur. I removed KDE, and it appeared that I did something irrepairable, so I reinstalled Debian (for about the 15th time I might add), so I won't do that again. I have also tried to add a printer using the detected pdf printer, but part two of the add dialog always asks for a manufacturer and driver which doens't make sense to me. Anyway, that didn't work eiteher. It continues to print as post script.

I appologize if this is a redundant or boneheaded question, but I've searched high and low for a resolve, and I've found no advice that has worked for me yet.

I see that I can print to a pdf with Abiword or export an OO doc as a pdf, but I need to be able to use Acroread, since it seems to be the only reader that I can fill out, say, tax forms, and then be able to print to a file as a pdf.

I'm tired. My eyes are swollen from searching the net, and any direction to help will surely be appreciated.

Mucho Gracias
schwing
 
Posts: 14
Joined: 2006-06-06 21:42

go figure

Postby schwing » 2006-06-06 23:34

It figures that just after I post this question, I finally got it to work.

By selecting a Custom printer and changing the command to /usr/bin/ps2pdf, it worked.

I did, however, have to leave print to file unchecked, and it generated a filename and placed it in my home directory.

It would be nice to be able to save it to a directory and a filename of choice though.
schwing
 
Posts: 14
Joined: 2006-06-06 21:42

Postby nayoo » 2006-06-07 02:58

schwing wrote:First of all, I'm new to Debian pure. I migrated from windblow...but I feel that sort of pride for being one who is sticking it out with Linux, and I feel myself in no-mans-land as I move from all the windows users to the dark side. lol.

Welcome to Debian World. I'm also new to Debian too and started not very long ago. We share the same feelings. Don't feel yourself in no-mans-land. Here in this forums, you can discuss and exchange ideas and solutions to numerious problems. :)

schwing wrote:Anyway, without getting into too much detail about my fondness of Debian, I have been struggling with printing a pdf document from Acroread to a pdf file.

After reading your post today, I decided to give a try and I have had some findings for you which I will mention later.

schwing wrote:When I first installed Etch, I installed the KDE desktop, but some problems started to occur. I removed KDE, and it appeared that I did something irrepairable...

Ok.. can you use KDE nowadays? or was it removed now? If you wanna install KDE without reinstalling Debian, you may post a separate thread titled with "KDE reinstallation" or something like that. I'm sure someone here can definitely help you out. I,myself did that not long ago with some kind helps from gurus here. You may refer to my thread too.
viewtopic.php?t=4632

schwing wrote:I have also tried to add a printer using the detected pdf printer, but part two of the add dialog always asks for a manufacturer and driver which doens't make sense to me. Anyway, that didn't work eiteher. It continues to print as post script.

I'm not sure how you added a printer using the detected pdf printer.

schwing wrote:I see that I can print to a pdf with Abiword or export an OO doc as a pdf, but I need to be able to use Acroread, since it seems to be the only reader that I can fill out, say, tax forms, and then be able to print to a file as a pdf.

Ok..I am also not sure how you are going to use Acroread. To me, Acroread is just a Acrobat Reader if I'm not wrong. But I have figure out how you can convert "ps" (Postscript) file to "pdf" (Printable Document Format) using a command line only. I will mention it below.

schwing wrote:I'm tired. My eyes are swollen from searching the net, and any direction to help will surely be appreciated.

I will try to help you since I have some spare time to work on it. Also please take a rest too. I'm sure those can be done.


---------TECHNICAL------------
Debain Etch:
Kernel : 2.6.15-1-686

Installing Acroread
Code: Select all
apt-get install acroread


Acroread after installation
Code: Select all
debian:/home/nayoo# dpkg -l acroread
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  acroread       7.0.5-0.3      Adobe Acrobat Reader: Portable Document Form
debian:/home/nayoo#


Where is Acroread in Menu?
Menu > Office > Adobe Reader (PDF Viewer)

Converting ".ps" POSTSCRIPT file to ".pdf" file using command line
I assume that you have ".ps" file already printed.

<Step 1>
Open your Shell.

<Step 2>
go to the directory where your .ps file is.

<Step 3>
Let say..
print.ps = your postscript file
print.pdf = your final pdf output file
Please type this
Code: Select all
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=print.pdf print.ps


That's all. For example, you may take a look my testing outputs for this command.

Code: Select all
debian:/home/nayoo/Testing# ls
print.ps
debian:/home/nayoo/Testing# gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=print.pdf print.ps
GPL Ghostscript 8.50 (2005-12-31)
Copyright (C) 2005 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
debian:/home/nayoo/Testing# ls
print.pdf  print.ps
debian:/home/nayoo/Testing# ls -la
total 128
drwxr-xr-x  2 nayoo nayoo  4096 2006-06-06 10:50 .
drwxr-xr-x 53 nayoo nayoo  4096 2006-06-06 10:26 ..
-rw-r--r--  1 root  root  32037 2006-06-06 10:50 print.pdf
-rw-r--r--  1 nayoo nayoo 85446 2006-06-06 10:47 print.ps
debian:/home/nayoo/Testing#


So this command should work irregardless of Gnome or KDE. This can convert ps file to pdf file.
nayoo
 
Posts: 320
Joined: 2006-03-28 01:51

Re: go figure

Postby nayoo » 2006-06-07 03:30

schwing wrote:It figures that just after I post this question, I finally got it to work.

By selecting a Custom printer and changing the command to /usr/bin/ps2pdf, it worked.

I did, however, have to leave print to file unchecked, and it generated a filename and placed it in my home directory.

It would be nice to be able to save it to a directory and a filename of choice though.


Finally, I understood what you tried to say and tested it out for Acroread.

Thanks for sharing the tip too. I did not know it before.

---------- TECHNICAL ----------------
Printing form-filled pdf to pdf using Acroread

Acroread Menu > File > Print
Printer > Name > Choose "Custom" > Enter "/usr/bin/ps2pdf"
(Default is : /usr/bin/lp)

<OPTION 1: DIRECT PRINTING>
Uncheck "Print to File".
And Press "OK".
It will print the ".pdf" file to your /home/ directory.

<OPTION 2 : PRINTING TO POSTSCRIPT AND CONVERT TO PDF>
Check "Print to File"
Clock "Browse"
Point to the folder(directory) where you want to output .ps file.
And Press "OK"
Then you will find ".ps" file is printed in your pointed directory.
Now you've got PostScript file (.ps) and you need to convert it to (.pdf) file.
So open shell and go to that pointed directory.
Again type this
Code: Select all
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=print.pdf print.ps

After that, you will find your pdf in your pointed directory.

Hope it helps.
:D
nayoo
 
Posts: 320
Joined: 2006-03-28 01:51

Thank you, that was quick

Postby schwing » 2006-06-07 05:18

1. Welcome to Debian World....

First, thank you for your help, and I'm making Debian work for what I need as best I can. I may have posted my first question today, but I sure have browsed this forum a lot... a whole lot. lol. When I say no-mans-land, I mean the learning curve editing configuration files, console commands, Apache, etc. But with the help of people who share, I'm managing.

2. Ok.. can you use KDE nowadays? or was it removed now?...

To be honest, I'm adjusting to Gnome, and I never really cared for the redundancy of having two or more desktops. I've tried fluxbox too. I guess the ideal desktop to me would be one that integrates features that I like in both KDE and Gnome.

3. I'm not sure how you added a printer using the detected pdf printer...

At one time, I installed numerous packages to deal with pdf's since I didn't find out about Acroread until I read a thread about Marillat where I found Acroread 7. In my Gnome menu - Desktop > Administration > Printing - is where I add a printer, and in the listbox below the radio "Use a detected printer," is where "PDF Printer" is listed.

4. I assume that you have ".ps" file already printed...

When I print a pdf file from Acroread, the print dialog launches, and I tried to print to a file which defaults to a *.ps. It would print, but only the text entered into the form in the pdf file printed... exactly where it appeared in the original doc, but the but the rest of the text within the original pdf file is missing so I would end up with a file that has all the filled fields, but nothing from the original pdf.

5. Where is Acroread in Menu?

Menu > Office > Adobe Reader

Thank you, nayoo
schwing
 
Posts: 14
Joined: 2006-06-06 21:42

Postby nayoo » 2006-06-07 05:51

schwing wrote:When I print a pdf file from Acroread, the print dialog launches, and I tried to print to a file which defaults to a *.ps. It would print, but only the text entered into the form in the pdf file printed... exactly where it appeared in the original doc, but the but the rest of the text within the original pdf file is missing so I would end up with a file that has all the filled fields, but nothing from the original pdf.

Has that problem been solved? If solved, how did you solve it? Is the method you mentioned in your previous post solved the problem?

I could not test out or simulate here b'cos I dont have that form.
nayoo
 
Posts: 320
Joined: 2006-03-28 01:51

Kinda Sorta

Postby schwing » 2006-06-07 07:16

Yes, changing custom printer command /usr/bin/lpr to /usr/bin/ps2pdf made it print as a pdf.

It seems as though this is only a problem with the print dialog that acroread uses. And since Acroread is the only pdf reader I've used so far that allows me to enter text into form fields, I spose I'll have to live with it. I can open the pdf with the document viewer, and it uses a different print dialog which gives me the option to print to filename.pdf.

Thanks again. Tis late here :P
schwing
 
Posts: 14
Joined: 2006-06-06 21:42


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable