Re: Editing PDF files

2010-01-05 Thread Jorge Castillo
Last time I needed to fill a form I used Evince (in Ubuntu before I started 
using OpenBSD) it apparently worked fine, why don't you try it.



- Original Message 
 From: Predrag Punosevac punoseva...@gmail.com
 To: misc@openbsd.org
 Sent: Mon, January 4, 2010 10:20:52 PM
 Subject: Editing PDF files
 
 I hope, I am not going to annoy too many people with this rather general
 question. 
 
 I have some PDF form that I need to fill in. I thought that I would be 
 able to accomplish the job in couple of minutes. Namely, my idea was
 to convert PDf file to PS file and then to use pstoedit to convert the
 PostScript file into fig file. Then like in old good times I would just
 add text to fig file and export to PDF. Just to be on the safe side I 
 was to do the above process a single page at the time. 
 
 My problem is that pstoedit is producing a huge non-usable fig file.
 
 What would be more claver way to accomplish above task short of buying
 Acrobat or using on-line PDF editing tools and exposing my private 
 information.
 
 I heard that KOffice and Scribe have the ability to edit PDF file as
 well as Gimp. I am somewhat familiar with PDFEdit even though it is not
 ported to OpenBSD and not very enthusiastic about its abilities.
 
 Most Kind Regards,
 Predrag Punosevac



Re: Editing PDF files

2010-01-05 Thread ropers
2010/1/5 Predrag Punosevac punoseva...@gmail.com:
 I have some PDF form that I need to fill in.

Just to make sure we're on the same page here, are you talking about a
PDF that makes use of Adobe's PDF form field features? (Cf.
http://en.wikipedia.org/wiki/PDF#Interactive_elements and
http://www.google.com/search?hl=ensafe=offq=PDF+form+fields .)
Or are you trying to edit a static PDF that only happens to render
(things that look like) form fields, but that don't actually make use
of the said features?

regards,
--ropers



Re: Editing PDF files

2010-01-05 Thread Predrag Punosevac
ropers rop...@gmail.com wrote:

 2010/1/5 Predrag Punosevac punoseva...@gmail.com:
  I have some PDF form that I need to fill in.

 Just to make sure we're on the same page here, are you talking about a
 PDF that makes use of Adobe's PDF form field features? (Cf.
 http://en.wikipedia.org/wiki/PDF#Interactive_elements and
 http://www.google.com/search?hl=ensafe=offq=PDF+form+fields .)

I believe so but I am using mupdf to see the document so I am not 100%
sure. From mupdf the document looks static.

 Or are you trying to edit a static PDF that only happens to render
 (things that look like) form fields, but that don't actually make use
 of the said features?

 regards,
 --ropers



Re: Editing PDF files

2010-01-05 Thread Christoph Leser
Take a look at pdftk. It is a simple command line tool, that can do a lot of
things with pdf files: merge, split, rotate, fill forms etc.

http://www.accesspdf.com/pdftk/

Regards



 -Urspr|ngliche Nachricht-
 Von: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org]
 Im Auftrag von Predrag Punosevac
 Gesendet: Dienstag, 5. Januar 2010 06:21
 An: misc@openbsd.org
 Betreff: Editing PDF files


 I hope, I am not going to annoy too many people with this
 rather general question.

 I have some PDF form that I need to fill in. I thought that I
 would be
 able to accomplish the job in couple of minutes. Namely, my
 idea was to convert PDf file to PS file and then to use
 pstoedit to convert the PostScript file into fig file. Then
 like in old good times I would just add text to fig file and
 export to PDF. Just to be on the safe side I
 was to do the above process a single page at the time.

 My problem is that pstoedit is producing a huge non-usable fig file.

 What would be more claver way to accomplish above task short
 of buying Acrobat or using on-line PDF editing tools and
 exposing my private
 information.

 I heard that KOffice and Scribe have the ability to edit PDF
 file as well as Gimp. I am somewhat familiar with PDFEdit
 even though it is not ported to OpenBSD and not very
 enthusiastic about its abilities.

 Most Kind Regards,
 Predrag Punosevac



Re: Editing PDF files

2010-01-05 Thread ropers
2010/1/5 Predrag Punosevac punoseva...@gmail.com:
 ropers rop...@gmail.com wrote:

 2010/1/5 Predrag Punosevac punoseva...@gmail.com:
  I have some PDF form that I need to fill in.

 Just to make sure we're on the same page here, are you talking about a
 PDF that makes use of Adobe's PDF form field features? (Cf.
 http://en.wikipedia.org/wiki/PDF#Interactive_elements and
 http://www.google.com/search?hl=ensafe=offq=PDF+form+fields .)

 I believe so but I am using mupdf to see the document so I am not 100%
 sure. From mupdf the document looks static.

Well, you need to know whether you want to fill in existing PDF form
fields or edit a regular, static PDF file, otherwise a discussion is
pointless. The difference is broadly similar to the difference between
a PDF containing text or an image of text. Entirely different problem
domain.

Find out what you're looking at. Evince has had forms support for
quite some time. This file contains an example Forms.pdf:
http://www.pdfonline.com/easypdf/sdk/programming-pdf/java/sample-projects/document.zip
Also see 
http://www.mjmwired.net/linux/2009/04/10/evince-and-acrobat-pdf-form-edits/
. See how that Forms.pdf and your file compare, both in evince and
mupdf. Mupdf does not appear to support PDF form fields.

If you want to edit or annotate a regular pdf, pdfedit and flpsed are
GUI programs that allow you to do that -- but I've actually never
tried to build them on OpenBSD, nor am I sure if anyone else has.
Scratch your itch and the community may welcome new ports. (
http://en.wikipedia.org/wiki/PDFedit ,
http://www.ecademix.com/JohannesHofmann/flpsed.html ) The capabilities
of flpsed are very limited, but it does allow you to add arbitrary
text in arbitrary places, which may be enough for your purposes.
PDFedit is not what I would describe as completely easy to use, and it
too has its limits. I have not, for instance, found a way to replace
an existing image in a PDF with another one with PDFedit.

And yeah, Christoph's suggestion is also good, if a command-line tool
is what you're looking for.

regards,
--ropers



Editing PDF files

2010-01-04 Thread Predrag Punosevac
I hope, I am not going to annoy too many people with this rather general
question. 

I have some PDF form that I need to fill in. I thought that I would be 
able to accomplish the job in couple of minutes. Namely, my idea was
to convert PDf file to PS file and then to use pstoedit to convert the
PostScript file into fig file. Then like in old good times I would just
add text to fig file and export to PDF. Just to be on the safe side I 
was to do the above process a single page at the time. 

My problem is that pstoedit is producing a huge non-usable fig file.

What would be more claver way to accomplish above task short of buying
Acrobat or using on-line PDF editing tools and exposing my private 
information.

I heard that KOffice and Scribe have the ability to edit PDF file as
well as Gimp. I am somewhat familiar with PDFEdit even though it is not
ported to OpenBSD and not very enthusiastic about its abilities.

Most Kind Regards,
Predrag Punosevac



Re: Editing PDF files

2010-01-04 Thread Chazza
 I heard that KOffice and Scribe have the ability to edit PDF file as
 well as Gimp. 

Gimp will work for short forms.  I'm pretty sure Gimp necessarily
converts the image to a bitmap; then you can just use the Text tool to
add stuff.  Then print to PDF.  It's clunky but will work in a pinch.



Re: Editing PDF files

2010-01-04 Thread Predrag Punosevac
I just want to document the simplest solution for editing PDF files.

Step 1: Convert the file to PostScript

Step 2: Directly edit PostScript file

In particular to add the text to specific position you will need to 
upload the file to gv and use the cursor to find the coordinates of 
the position where you want to add the text.
Then fire up that vi editor and add something like

gsave
/Times-Roman findfont 24 scalefont setfont
100 250 moveto
(Your text here) show
% more moveto/show pairs for the remainder of the page
grestore

before the last showpage in your PostScript file.

Step 3 Convert PostScript file back to PDF file.

Cheers,
Predrag



Re: Editing PDF files

2010-01-04 Thread Antoine Jacoutot
On Tue, 5 Jan 2010, Predrag Punosevac wrote:

...
 What would be more claver way to accomplish above task short of buying
 Acrobat or using on-line PDF editing tools and exposing my private 
 information.

OpenOffice.org and enable the pdfimport extension.

-- 
Antoine