Re: vim | editing pdf files with vim

2006-10-10 Thread Mike Williams

Nikolaos A. Patsopoulos did utter on 10/10/2006 14:58:

Hi all,

is there a way to edit pdf files with vim? If not pdf as is, then eps or 
postscript? I tried with either format but the text kept been converted 
to sthl ike ASCII code.


In general trying to edit PDF or PostScript files is a non-starter, 
unless you have a lot of knowledge about how the files were constructed. 
 In particular, text depends on the font encoding used.  It will be 
much easier to go back to the original application that generated the 
PDF/PS and edit the document there.


TTFN

Mike
--
Free the bound periodicals!


Re: vim | editing pdf files with vim

2006-10-10 Thread Nikolaos A. Patsopoulos

Mike Williams wrote:

Nikolaos A. Patsopoulos did utter on 10/10/2006 14:58:

Hi all,

is there a way to edit pdf files with vim? If not pdf as is, then eps 
or postscript? I tried with either format but the text kept been 
converted to sthl ike ASCII code.


In general trying to edit PDF or PostScript files is a non-starter, 
unless you have a lot of knowledge about how the files were 
constructed.  In particular, text depends on the font encoding used.  
It will be much easier to go back to the original application that 
generated the PDF/PS and edit the document there.


TTFN

Mike
You are 100% right. But what if you cannot access the original file? 
Lets say you want to edit a pdf you downloaded from internet. Isn't 
there a way to do this with vim? I haven't tried emacs or sed but 
probably they will fail too. I was just wondering if there some way out 
there.



Nikos



RE: vim | editing pdf files with vim

2006-10-10 Thread Max Dyckhoff
PDF files need to be edited with a specific editor, because they contain 
non-human readable structure and encodings. Your request is similar to asking 
if you could edit a JPEG with vim.

If it is just a PDF of a text file then you should simply be able to copy/paste 
the text into your favourite text editor (vim!), and edit it there, but if you 
want to edit the PDF file then you will need to search for a PDF editor. I 
don't know of any off-hand, but I'm sure a quick Google search will turn one up.

Max


 -Original Message-
 From: Nikolaos A. Patsopoulos [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 10, 2006 9:20 AM
 To: [EMAIL PROTECTED]; vim@vim.org
 Subject: Re: vim | editing pdf files with vim

 Mike Williams wrote:
  Nikolaos A. Patsopoulos did utter on 10/10/2006 14:58:
  Hi all,
 
  is there a way to edit pdf files with vim? If not pdf as is, then eps
  or postscript? I tried with either format but the text kept been
  converted to sthl ike ASCII code.
 
  In general trying to edit PDF or PostScript files is a non-starter,
  unless you have a lot of knowledge about how the files were
  constructed.  In particular, text depends on the font encoding used.
  It will be much easier to go back to the original application that
  generated the PDF/PS and edit the document there.
 
  TTFN
 
  Mike
 You are 100% right. But what if you cannot access the original file?
 Lets say you want to edit a pdf you downloaded from internet. Isn't
 there a way to do this with vim? I haven't tried emacs or sed but
 probably they will fail too. I was just wondering if there some way out
 there.


 Nikos



Re: vim | editing pdf files with vim

2006-10-10 Thread A.J.Mechelynck

Nikolaos A. Patsopoulos wrote:

Hi all,

is there a way to edit pdf files with vim? If not pdf as is, then eps or 
postscript? I tried with either format but the text kept been converted 
to sthl ike ASCII code.


Thanks,

Nikos




Vim is a text editor. PDF files contain both text data and binary data. I 
woudn't try editing them with Vim: too much risk of f...ouling it all up by 
not knowing what I'm doing.


If you want to see what PDF looks like when printed, use Acrobat Reader. If 
you want to edit it, I guess you'll have to buy some PDF editor from Adobe.


PostScript can, IIUC, be viewed in Vim, and even with syntax highlighting -- 
but as PostScript code, not as WYSIWYG rendered text. That's great if you want 
to program in PostScript.



Best regards,
Tony.


Re: vim | editing pdf files with vim

2006-10-10 Thread Alan Young
Nikolaos A. Patsopoulos wrote:
 is there a way to edit pdf files with vim? If not pdf as is, then eps or
 postscript? I tried with either format but the text kept been converted
 to sthl ike ASCII code.

Not really.  But you can use a program called pdftk that will help you
along those lines.

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


Re: vim | editing pdf files with vim

2006-10-10 Thread Alan Young
Nikolaos A. Patsopoulos wrote:
 is there a way to edit pdf files with vim? If not pdf as is, then eps or
 postscript? I tried with either format but the text kept been converted
 to sthl ike ASCII code.

Woops ... just found this by accident:

http://www.pdfhacks.com/pdftk/#vim_plugin

From the description: Vim users can also install my plug-in for easily
editing PDF code. When you open a PDF in Vim, the plug-in calls pdftk to
uncompress the page streams, so they are editable. When you save the
PDF, the plug-in uses pdftk to repair and re-compress the PDF.

Don't know how well it works.


Re: vim | editing pdf files with vim

2006-10-10 Thread Charles E Campbell Jr

Nikolaos A. Patsopoulos wrote:,

is there a way to edit pdf files with vim? If not pdf as is, then eps 
or postscript? I tried with either format but the text kept been 
converted to sthl ike ASCII code.


For purposes of visualization, using netrw's browser and, with the 
cursor on the pdf file, pressing x will (usually) bring up a tool to 
visualize the pdf file.  For editing (as in changing file contents), I'm 
afraid I don't know.


Regards,
Chip Campbell



Re: vim | editing pdf files with vim

2006-10-10 Thread Yakov Lerner

On 10/10/06, Nikolaos A. Patsopoulos [EMAIL PROTECTED] wrote:

is there a way to edit pdf files with vim? If not pdf as is, then eps or
postscript? I tried with either format but the text kept been converted
to sthl ike ASCII code.


Try to find pdf-to-word  conversion tool (openoffice can edit
word files), or pdf-to-rtf conversion tool. Then you edit word file or rtf
fle, then openoffice can export file into pdf format back again.

Yakov