Re: PDF to Word ( docx) Conversion

2017-01-25 Thread Peter Hudson
Interesting insight. 
Thanks Charles. 


> On 25 Jan 2017, at 12:39, Charles Jenkins  wrote:
> 
> Just my two cents, but I find .RTF way more arcane than .DOCX, and I don’t 
> think Apple’s exporters for .RTF and .DOC produce high-quality documents. If 
> users are only going to read the documents you produce—they will not be 
> edited or reformatted in any way—then Apple-generated .RTFD (which can 
> include graphics) is probably okay. But if you’re producing something 
> intended to be edited or formatted for publishing, you should seriously 
> consider .DOCX, because with it you can easily define and export powerful 
> styles. I mean, you could also create high-quality .DOC files, but you’d have 
> to use an external package to do it, not the functions Apple provides.
> 
>> On Tue, Jan 24, 2017 at 3:58 PM, Peter Hudson  wrote:
>> Hi Jens
>> 
>> I wondered about RTF - but I've built everything into a view and I can't see 
>> a method on NSView to produce rtf.
>> I've done it previously with, I think, an NSText.
>> 
>> Peter
>> 
>> > On 24 Jan 2017, at 20:27, Jens Alfke  wrote:
>> >
>> >
>> >> On Jan 24, 2017, at 11:54 AM, Peter Hudson  wrote:
>> >>
>> >> But the bottom line is, I think, to get a Word doc that really behaves 
>> >> like a
>> >> Word doc ( in word ) I need to export straight to docx format.
>> >
>> > Have you tried exporting to RTF? It’s a simple text-based markup format, 
>> > and imports well into Word. (In fact Microsoft invented RTF back in the 
>> > ‘80s as an interchange format for Word.)
>> >
>> > —Jens
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/cejwork%40gmail.com
>> 
>> This email sent to cejw...@gmail.com
> 
> 
> 
> -- 
> 
> Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-25 Thread Charles Jenkins
Just my two cents, but I find .RTF way more arcane than .DOCX, and I don’t
think Apple’s exporters for .RTF and .DOC produce high-quality documents.
If users are only going to read the documents you produce—they will not be
edited or reformatted in any way—then Apple-generated .RTFD (which can
include graphics) is probably okay. But if you’re producing something
intended to be edited or formatted for publishing, you should seriously
consider .DOCX, because with it you can easily define and export powerful
styles. I mean, you could also create high-quality .DOC files, but you’d
have to use an external package to do it, not the functions Apple provides.

On Tue, Jan 24, 2017 at 3:58 PM, Peter Hudson  wrote:

> Hi Jens
>
> I wondered about RTF - but I've built everything into a view and I can't
> see a method on NSView to produce rtf.
> I've done it previously with, I think, an NSText.
>
> Peter
>
> > On 24 Jan 2017, at 20:27, Jens Alfke  wrote:
> >
> >
> >> On Jan 24, 2017, at 11:54 AM, Peter Hudson  wrote:
> >>
> >> But the bottom line is, I think, to get a Word doc that really behaves
> like a
> >> Word doc ( in word ) I need to export straight to docx format.
> >
> > Have you tried exporting to RTF? It’s a simple text-based markup format,
> and imports well into Word. (In fact Microsoft invented RTF back in the
> ‘80s as an interchange format for Word.)
> >
> > —Jens
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/cejwork%40gmail.com
>
> This email sent to cejw...@gmail.com
>



-- 

Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread じょいすじょん
You might take a look back at the TextEdit source.
It should be pretty straight forward to save as .rtf or .rtfd, if by table you 
mean you have a rich text table.


> On Jan 25, 2017, at 6:35, Peter Hudson  wrote:
> 
> I was trying to avoid having to go to Direct RTF markup. But as you say, it 
> may be the answer. 
> 
> Peter
> 
>> On 24 Jan 2017, at 21:13, Jens Alfke  wrote:
>> 
>> 
>>> On Jan 24, 2017, at 12:58 PM, Peter Hudson  wrote:
>>> 
>>> I wondered about RTF - but I've built everything into a view and I can't 
>>> see a method on NSView to produce rtf. 
>>> I've done it previously with, I think, an NSText. 
>> 
>> I meant producing it programmatically. It’s a markup language, around the 
>> same order of complexity as HTML (although it looks more like TeX.)
>> 
>> [Fun fact: My first paying job after college, in 1987, was to write a 
>> translator program that parsed a weird old phototypesetter markup language 
>> and generated RTF that could be imported into PageMaker.]
>> 
>> —Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/dangerwillrobinsondanger%40gmail.com
> 
> This email sent to dangerwillrobinsondan...@gmail.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Peter Hudson
I was trying to avoid having to go to Direct RTF markup. But as you say, it may 
be the answer. 

Peter

> On 24 Jan 2017, at 21:13, Jens Alfke  wrote:
> 
> 
>> On Jan 24, 2017, at 12:58 PM, Peter Hudson  wrote:
>> 
>> I wondered about RTF - but I've built everything into a view and I can't see 
>> a method on NSView to produce rtf. 
>> I've done it previously with, I think, an NSText. 
> 
> I meant producing it programmatically. It’s a markup language, around the 
> same order of complexity as HTML (although it looks more like TeX.)
> 
> [Fun fact: My first paying job after college, in 1987, was to write a 
> translator program that parsed a weird old phototypesetter markup language 
> and generated RTF that could be imported into PageMaker.]
> 
> —Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Jens Alfke

> On Jan 24, 2017, at 12:58 PM, Peter Hudson  wrote:
> 
> I wondered about RTF - but I've built everything into a view and I can't see 
> a method on NSView to produce rtf. 
> I've done it previously with, I think, an NSText. 

I meant producing it programmatically. It’s a markup language, around the same 
order of complexity as HTML (although it looks more like TeX.)

[Fun fact: My first paying job after college, in 1987, was to write a 
translator program that parsed a weird old phototypesetter markup language and 
generated RTF that could be imported into PageMaker.]

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Peter Hudson
Hi Jens

I wondered about RTF - but I've built everything into a view and I can't see a 
method on NSView to produce rtf. 
I've done it previously with, I think, an NSText. 

Peter 

> On 24 Jan 2017, at 20:27, Jens Alfke  wrote:
> 
> 
>> On Jan 24, 2017, at 11:54 AM, Peter Hudson  wrote:
>> 
>> But the bottom line is, I think, to get a Word doc that really behaves like 
>> a 
>> Word doc ( in word ) I need to export straight to docx format.
> 
> Have you tried exporting to RTF? It’s a simple text-based markup format, and 
> imports well into Word. (In fact Microsoft invented RTF back in the ‘80s as 
> an interchange format for Word.)
> 
> —Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Jens Alfke

> On Jan 24, 2017, at 11:54 AM, Peter Hudson  wrote:
> 
> But the bottom line is, I think, to get a Word doc that really behaves like a 
> Word doc ( in word ) I need to export straight to docx format.

Have you tried exporting to RTF? It’s a simple text-based markup format, and 
imports well into Word. (In fact Microsoft invented RTF back in the ‘80s as an 
interchange format for Word.)

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Peter Hudson
Many thanks for this Charles. I'll check it out. 

Peter 

> On 24 Jan 2017, at 20:11, Charles Jenkins  wrote:
> 
> There is an open specification for the file format, which will allow you to 
> easily (if tediously) write your own exporter.
> 
> The spec is at: 
> http://www.ecma-international.org/publications/standards/Ecma-376.htm
> 
> (These are huge downloads)
> 
> If you have access to a Windows PC, there is a Windows-based software 
> development kit INCLUDING an inspector that will let you open and inspect 
> documents. It is invaluable to be able to create a document in Word similar 
> to the one you need to generate, then save and inspect it to see what files 
> actually go inside. Unfortunately the inspector often refuses to open 
> malformed files, so you’ll be using it to see what you need to imitate, not 
> to gauge how far off you are from the mark.
> 
> Those tools are at: 
> https://www.microsoft.com/en-us/download/details.aspx?id=30425
> 
> 
>> On Tue, Jan 24, 2017 at 2:54 PM, Peter Hudson  wrote:
>> Hi All
>> 
>> I have a report that I currently print to PDF.
>> Its a simple table with text ( varying fonts ) in the table.
>> 
>> I have tried to convert it to docx with a variety of proprietary converters.
>> One or two of them do a reasonable job.
>> 
>> But the bottom line is, I think, to get a Word doc that really behaves like a
>> Word doc ( in word ) I need to export straight to docx format.
>> 
>> I’ve hunted around - but turned up little.
>> Does anyone know of a library that could do it ?
>> 
>> Peter
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/cejwork%40gmail.com
>> 
>> This email sent to cejw...@gmail.com
> 
> 
> 
> -- 
> 
> Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Charles Jenkins
There is an open specification for the file format, which will allow you to
easily (if tediously) write your own exporter.

The spec is at:
http://www.ecma-international.org/publications/standards/Ecma-376.htm

(These are huge downloads)

If you have access to a Windows PC, there is a Windows-based software
development kit INCLUDING an inspector that will let you open and inspect
documents. It is invaluable to be able to create a document in Word similar
to the one you need to generate, then save and inspect it to see what files
actually go inside. Unfortunately the inspector often refuses to open
malformed files, so you’ll be using it to see what you need to imitate, not
to gauge how far off you are from the mark.

Those tools are at:
https://www.microsoft.com/en-us/download/details.aspx?id=30425


On Tue, Jan 24, 2017 at 2:54 PM, Peter Hudson  wrote:

> Hi All
>
> I have a report that I currently print to PDF.
> Its a simple table with text ( varying fonts ) in the table.
>
> I have tried to convert it to docx with a variety of proprietary
> converters.
> One or two of them do a reasonable job.
>
> But the bottom line is, I think, to get a Word doc that really behaves
> like a
> Word doc ( in word ) I need to export straight to docx format.
>
> I’ve hunted around - but turned up little.
> Does anyone know of a library that could do it ?
>
> Peter
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/cejwork%40gmail.com
>
> This email sent to cejw...@gmail.com




-- 

Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

PDF to Word ( docx) Conversion

2017-01-24 Thread Peter Hudson
Hi All

I have a report that I currently print to PDF.
Its a simple table with text ( varying fonts ) in the table.

I have tried to convert it to docx with a variety of proprietary converters.
One or two of them do a reasonable job.

But the bottom line is, I think, to get a Word doc that really behaves like a 
Word doc ( in word ) I need to export straight to docx format.

I’ve hunted around - but turned up little.
Does anyone know of a library that could do it ?

Peter
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com