Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - pdf generation issues
pdf generation issues
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NeoOffice Forum Index -> OpenOffice.org MacOS X X11 Support
View previous topic :: View next topic  
Author Message
roberts
Agent


Joined: Dec 13, 2004
Posts: 13

PostPosted: Mon Dec 13, 2004 7:13 pm    Post subject: pdf generation issues Reply with quote

I'm trying to use the extendedPDF macro to generate structured pdf's. I don't have/can't afford acrobat writer. I don't own a printer.

Marc Lyangage's instructions recommend the use of "generic printer". According to the Font Trouble Shooting guide, this produces ugly pdf's. http://www.openoffice.org/FAQs/fontguide.html#7 My own experience confirms the unsuitability of the pdfs.

Another option is to configure Generic Printer (T42 enabled). Attempting to configure this printer causes spadmin to use 99% of CPU and hang -- this printer is broken in the mac port.

Another option is to configure some other printer, following the Trouble Shooting Guide recommendations. Unfortunately, all printers that I've attempted to add print only blocks for characters. I am using regular fonts (Times New Roman) that should be supported. I tried downloading new PPDs, installing Gimp-Print, etc, with no success. Going through the forum, I haven't found anyone who has gotten printing to work without exporting as a pdf or without using the generic printer. These two workarounds are not work arounds when pdf generation is the goal. Neither is neoffice, as I've found no way to get it to work with extended PDF.

So, a solution to my problem would be any of the following:
*find a printer driver that supports type 4 postscript and prints characters instead of blocks.
*get generic printer (T42 enabled) to not hang openoffice

I'm comfortable with tweaking with configuration files, etc. I am also willing to pay around 100 dollars or so for software to achieve either of these two goals.
Back to top
View user's profile Send private message
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Dec 13, 2004 11:27 pm    Post subject: Reply with quote

Hmm, the root of the problem is definitely not having a printer Sad

When you have a printer installed/set up before installing OOo, the OOo installation process does some great magic (thanks Dan!, I believe) and creates printers in OOo like <name_of_printer> that map directly to the Mac printers and pick up at least some of their settings/options.

So I substituted "<hp_LaserJet_1300>" for "Generic Printer" in the extendedPDF config box and noticed for the first time improved text quality in Preview (also, the text is selectable in Preview; it always has been in Acrobat), although I think it looks slightly worse in Acrobat and is still not editable. (Still, thanks for the tip!)

The best--by leaps and bounds--text quality comes from using NeoOffice/J. The trick to getting this to work (besides setting up a "dummy" printer, which I assume--but don't know--is still possible under OS X; if not, perhaps you can borrow a printer from a friend and set it up?) is getting the right file saved at the right place with the right name. Since Neo/J uses the native print engine to generate files, I just ignored the "Generic Printer" in extendedPDF.

I have extendedPDF set to dump the .ps files to the Desktop. When I run the macro in Neo/J, it pops up the native print dialogue. Select "Output Options" from the bottom drop-down box. Check "Save as File" and switch the format to "PostScript." (I have a preset set up for this purpose.) Click "Save..." The resulting dialogue suggests a terribly useless name "name_of_file.sxw - NeoOffice/J 1.1 Alpha 2 ", and this has to be renamed to "name_of_file" (or "name_of_file.ps"--strangely, both work) and saved on the Desktop (or wherever you have extendedPDF set to dump the .ps/temporary files). Voilà, a structured PDF of much better quality (though slightly larger size), is searchable in Preview (OOo-generated ones were not), and one which has the advantage of being properly editable in Acrobat (changing/unembedding fonts, editing text, etc., if your recipient needs to do that).

This all is based on my having Acrobat Distiller, but I assume everything will be the same with GhostScript (I tried replacing Marc's script to call Distiller with the default "gs", but it threw errors about the syntax of the commands passed, so perhaps the version of gs Apple ships is older/newer...Marc got fink's gs to work in his tutorial, so that should work even though Apple's gs is not working for me). I was going to suggest you spend your $100 on Acrobat, given how helpful it is, but I see Adobe has realized how helpful Acrobat is and now charges two arms and a leg for it! (It used to retail for slightly less than $100) Sad

Anyway, I hope this is helpful....

Smokey
Back to top
View user's profile Send private message Visit poster's website
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Thu Dec 16, 2004 5:33 pm    Post subject: Reply with quote

sardisson wrote:
The best--by leaps and bounds--text quality comes from using NeoOffice/J. The trick to getting this to work (besides setting up a "dummy" printer, which I assume--but don't know--is still possible under OS X; if not, perhaps you can borrow a printer from a friend and set it up?) is getting the right file saved at the right place with the right name. Since Neo/J uses the native print engine to generate files, I just ignored the "Generic Printer" in extendedPDF.


OK, I follow you so far...

sardisson wrote:
I have extendedPDF set to dump the .ps files to the Desktop. When I run the macro in Neo/J, it pops up the native print dialogue. Select "Output Options" from the bottom drop-down box. Check "Save as File" and switch the format to "PostScript." (I have a preset set up for this purpose.) Click "Save..."


I am still stuck because I can't find that "Output Options" that you mentioned - there's no "Save as File" or "Postscript" (only "Save as PDF").
Maybe I am getting narrowsighted, but the options don't seem to be there in my native print dialog. I don't have a printer installed and can't borrow one either, so no dummy...

sardisson wrote:
The resulting dialogue suggests a terribly useless name "name_of_file.sxw - NeoOffice/J 1.1 Alpha 2 ", and this has to be renamed to "name_of_file" (or "name_of_file.ps"--strangely, both work) and saved on the Desktop (or wherever you have extendedPDF set to dump the .ps/temporary files). Voilà, a structured PDF of much better quality (though slightly larger size), is searchable in Preview (OOo-generated ones were not), and one which has the advantage of being properly editable in Acrobat (changing/unembedding fonts, editing text, etc., if your recipient needs to do that).


OK, I get this bit. You use Marc's script to move the .ps to distiller and then it works automagically, right?

I'm thinking this macro probably doesn't integrate with Patrick's neat new slimline PDF generation code..

Would have been really nice. Not that I need to make many bookmarked and linked PDFs but it is nice to be able to make them, however huge they get.

sardisson wrote:
Anyway, I hope this is helpful....


Ehm, not quite yet.. Help appreciated.

Best wishes,
Oscar
Back to top
View user's profile Send private message
roberts
Agent


Joined: Dec 13, 2004
Posts: 13

PostPosted: Thu Dec 16, 2004 5:48 pm    Post subject: Reply with quote

Thanks to the ancestor posters. I set up a dummy postscript printer:

open up print center. click add. select IP printing. set printer type to "Internet Printing Protocol" set printer address to "localhost" (localhost). Leave printer model as "generic". Then, I can save as a postscript file by selecting "output options" and then postscript.

Next, I reinstalled openoffice (there must be a better way!). I can confirm that when I enter <localhost> as the printer name in the ExtendedPDF dialog, pdf quality greatly improves, but there are still some difficulties with kerning and resolution.

I haven't yet tried using NeoOffice, but I was using it before and the stability/performance was not good for long documents with lots of embedded graphics.

Martin Brown helpfully gave me a tip that the only difference between generic printer.ppd and the generic printer type 42.ppd was the line
*TTRasterizer: Type42
However, when I manually added the line, it made no difference. Perhaps the ppd is not being used? Anyways, it's still a mystery as to why attempting to add generic printer (type 42) should hang open office. I tried it both as root and as a regular user, with the same outcome.

It still also leaves the mystery of why I can't print with anything other than a generic printer -- no printer ppd produces anything for me other than boxes for characters, although graphics print fine. I'm using arial and times new roman in all of these test docs.

Anyways, thanks for the tip of entering <localhost>.
Back to top
View user's profile Send private message
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Dec 17, 2004 1:08 am    Post subject: Reply with quote

ovvldc wrote:
sardisson wrote:
I have extendedPDF set to dump the .ps files to the Desktop. When I run the macro in Neo/J, it pops up the native print dialogue. Select "Output Options" from the bottom drop-down box. Check "Save as File" and switch the format to "PostScript." (I have a preset set up for this purpose.) Click "Save..."


I am still stuck because I can't find that "Output Options" that you mentioned - there's no "Save as File" or "Postscript" (only "Save as PDF").
Maybe I am getting narrowsighted, but the options don't seem to be there in my native print dialog. I don't have a printer installed and can't borrow one either, so no dummy...


It's the third entry in the bottom drop-down box (the one that defaults to "Copies & Pages"). I suppose it's possible you need a dummy PS printer, but I get that entry/pane when I switch to an Epson Stylus inkjet....

ovvldc wrote:
OK, I get this bit. You use Marc's script to move the .ps to distiller and then it works automagically, right?


Yep. It [extendedPDF automagic] should work for GhostScript, too, for non-Acrobat-owners, though as I noted above, perhaps not the stock Apple gs...

ovvldc wrote:
I'm thinking this macro probably doesn't integrate with Patrick's neat new slimline PDF generation code..


I don't think so...but, aside from the slight bit of extra markup needed for the structured part, I think these PDFs are smaller than the heavyweight PDFs we used to get from Neo/J or Apple's "Save as PDF." Smile

Since PDF is a more-or-less open format, I would be surprised if there weren't FOSS third-party PDF optimizers--maybe even GhostScript itself can do that. I seem to recall doing stuff like that with MacGSView under OS 9 before I decided that Acrobat, as part of the academic rate for one of the Adobe 7 suites, was really worth its $90 street price. Too bad it now costs three times that much Sad

ovvldc wrote:
sardisson wrote:
Anyway, I hope this is helpful....


Ehm, not quite yet.. Help appreciated.


I think we were crossing paths on the location of that Output Options/Save as File/Format: PS stuff before. But even if not, roberts's last post now tells us how to make a dummy local PS printer. I really do believe this can work for you Smile

Smokey
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Dec 17, 2004 1:40 am    Post subject: Reply with quote

roberts wrote:
Thanks to the ancestor posters. I set up a dummy postscript printer:

open up print center. click add. select IP printing. set printer type to "Internet Printing Protocol" set printer address to "localhost" (localhost). Leave printer model as "generic". Then, I can save as a postscript file by selecting "output options" and then postscript.


Thanks for posting that info! I searched a bit the other day for info on how to do it, but came up empty; I'm glad you succeeded! I've marked this tip for inclusion in the wiki the next time I edit it Smile

roberts wrote:
Next, I reinstalled openoffice (there must be a better way!).


Maybe Ed can tell us when these printers that are links to the CUPS queues get created. It would certainly be nice not to have to reinstall OOo! Sad

roberts wrote:
I can confirm that when I enter <localhost> as the printer name in the ExtendedPDF dialog, pdf quality greatly improves, but there are still some difficulties with kerning and resolution.


This may be the "fault" of FreeType and the other X11 stuff. Marc Liyanage's patched FreeType is certainly better than the font rendering, kerning, etc., of the stock FreeType, but even the version that has Apple's patented hinting enabled still leaves something to be desired in comparison with "native" OS X rendering. What's that old programmer's maxim, GIGO?

roberts wrote:
I haven't yet tried using NeoOffice, but I was using it before and the stability/performance was not good for long documents with lots of embedded graphics.


Anecdotal reports seem to indicate patch 9 has helped performance, but Ed and Patrick are still chasing down a random crash. It should be fixed before Neo/J 1.1 Beta, which bugs permitting, is scheduled to arrive in time for Christmas Smile, so you might check it out again then. Smile The (extended) PDF quality really is night and day.

roberts wrote:
Martin Brown helpfully gave me a tip that the only difference between generic printer.ppd and the generic printer type 42.ppd was the line
*TTRasterizer: Type42
However, when I manually added the line, it made no difference. Perhaps the ppd is not being used? Anyways, it's still a mystery as to why attempting to add generic printer (type 42) should hang open office. I tried it both as root and as a regular user, with the same outcome.


I'd say file a bug on it in the OOo IssueZilla, though I'm not sure the chances of it getting fixed Sad

roberts wrote:
It still also leaves the mystery of why I can't print with anything other than a generic printer -- no printer ppd produces anything for me other than boxes for characters, although graphics print fine. I'm using arial and times new roman in all of these test docs.


I really never had much luck with that, either, for the brief time I really actively used OOo. My completely unsubstantiated opinion is that our brave band of Mac porters (all two or three of them) did what they could to get the "baseline" of printing working and then pulled in the CUPS queues when 10.2 arrived, which essentially provided native PPD support in one step rather than having to fight OOo's printing architecture.

Do the above issues go away when you use your <localhost> printer--or do I have the two instances of "generic printer" confused here?

Smokey
Back to top
View user's profile Send private message Visit poster's website
roberts
Agent


Joined: Dec 13, 2004
Posts: 13

PostPosted: Sun Dec 19, 2004 9:41 am    Post subject: Reply with quote

Quote:
Do the above issues go away when you use your <localhost> printer--or do I have the two instances of "generic printer" confused here?


When I enter <localhost> as the printer, pdf quality goes up. It's quite different in Preview vs Acrobat (Acrobat is better). There are still some font issues which makes the pdf not so good.

Since then, I've been using neooffice and it is better. Perhaps some of the problems with using X11 is the plethora of fonts: ghostscript has it's own font directory, OOO has it's own font directory, and the system has it's own font directories. Then there is fondu, and user installed TTF fonts in the X11 directories. I'm completely confused. I can't imagine how passing postscript from OOO to an apple driver and then to ghostscript can even work. Razz And who knows what kind of magic is going on with the apple OOO customizations and font substitutions. Oy.

Since then, I'm reasonably happy with NeoOffice. Hopefully if 2.0 comes out for X11, I wont be tempted to switch back.
Back to top
View user's profile Send private message
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Sun Dec 19, 2004 11:16 am    Post subject: Reply with quote

roberts wrote:
Since then, I'm reasonably happy with NeoOffice. Hopefully if 2.0 comes out for X11, I wont be tempted to switch back.


Well, if Patrick and Ed keep doing their wizardry, NeoOffice will be up to speed even as the first update comes out. Experience has taught me that any software connected to a commercial company is still a tad buggy on the first whole version number release...

Thanks for the tips! I'll go and look in to it.
Back to top
View user's profile Send private message
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Sun Dec 19, 2004 1:30 pm    Post subject: Aaargh! Still not working... Reply with quote

OK, I cobbled together a step-bye-step guide for the Wiki and decided to try it out. So here it goes:

-----------------------------------------------------------------------------------

Set up a dummy printer (if you have none):

* Open up print center.
* Click add.
* Select IP printing.
* Set printer type to "Internet Printing Protocol".
* Set printer address to "localhost" (localhost).
* Leave printer model as "generic" (do not use Adobe PDF, it will crash Distiller 6.0.0 when you export the extendedPDF manual document).

Install the ExtendedPDF macro as indicated in the manual (available from the same website you got the macro itself): http://www.jdisoftware.co.uk/pages/epdf-home.php

Look at the tutorial provided my Marc Liyanage, which can be found at: http://www.entropy.ch/software/macosx/docs/openoffice-mac/
* Copy the script file as a text file on your system, like "NeoOffice_PDF_helper.pl".
* Adapt the Acrobat/GS application name to reflect your own.
* Make it executable, for instance "chmod 755 NeoOffice_PDF_helper.pl".

Start the ExtendedPDF macro.

* Enter whatever you like in the "PDF Settings" and "PDF bookmarks" tabs.
* Go to the "File Settings" tab.
* Set the "Output folder" to your desktop.
* Set the "Temporary folder" to your desktop.
* Unless testing, turn on "Delete temporary files".
* Go to the "Configuration" tab.
* Click browse for the "Path to Ghostscript" and select the "NeoOffice_PDF_helper.pl" executable.

Now select "OK". The native print dialog comes up.

* Select a printer.
* Select the third entry in the bottom drop-down box (the one that defaults to "Copies & Pages").
* Choose "Save as File".
* For structure, choose "Postscript".
* Save the settings for later quick access.

-----------------------------------------------------------------------------------

And then I got the error:

No PostScript file was created.
It should be located at file:///Users/oscarvanvliet/Desktop/extendedPDF%20Open%20Edition%201.2.ps.
Check the configuration of extendedPDF.

The upside is that a postscript file *is* actually created and dropped onto my desktop. And this .ps file works cheerfully when I drop it into Acrobat. Several expletives later, I tried again. And again. And again...

But I can't get them there, even if I call the file "extendedPDF%20Open%20Edition%201.2.ps"

Anyone have a clue?
Back to top
View user's profile Send private message
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Sun Dec 19, 2004 2:08 pm    Post subject: Reply with quote

Do you know much of anything about the macro itself? The first thing that comes to my mind would be to replace its use of spaces (the %20 encoding is a space) with a non-space character like an underscore. That'll isolate whether it's a problem in URL handling of spaces to files or the like.

ed
Back to top
View user's profile Send private message Visit poster's website AIM Address
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Sun Dec 19, 2004 3:21 pm    Post subject: Reply with quote

OPENSTEP wrote:
Do you know much of anything about the macro itself? The first thing that comes to my mind would be to replace its use of spaces (the %20 encoding is a space) with a non-space character like an underscore. That'll isolate whether it's a problem in URL handling of spaces to files or the like.


Hey, you were right on that one. It did work. I can use only one name, which sucks.. And now, the script I copied from Mac Liyanage's site is definetely not working. Oh well, another day, it is not like a need it badly.
Back to top
View user's profile Send private message
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sun Dec 19, 2004 5:37 pm    Post subject: Reply with quote

Hmm. My test doc is "Heading test.sxw", so spaces shouldn't be the issue. For comparison, here's my working ooo_pdf_helper.pl:
Code:
#!/usr/bin/perl
#
# OpenOffice helper script to invoke Adobe Acrobat Distiller
# in place of ghostscript on Mac OS X from the extendedPDF
# Macro (http://www.jdisoftware.co.uk/pages/epdf-home.php).
#
# Install this somewhere on your machine, make it executable
# and then configure its path instead of the "gs" command
# in the "Configuration" dialog of the extendedPDF GUI.
#
# Written by Marc Liyanage, see http://www.entropy.ch
#
#
use warnings;
use strict;

use IO::File;

my ($outputfile) = map {/^-sOutputFile=(.+$)/; $1 ? $1 : ()} @ARGV;
my ($inputfile) = $ARGV[-1];


my $applescript = <<"EOF";

tell application "Acrobat Distiller 6.0.2"
        Distill destinationPath "$outputfile" sourcePath "$inputfile"
end tell

EOF

my $pipe = IO::File->new("|/usr/bin/osascript");
print $pipe $applescript;
$pipe->close();


Have you updated Acrobat to 6.0.3? That might break things, becuse the script is calling 6.0.2--or if you haven't updated and Marc has updated his script since I got it....

The other thing I'm wondering--because it was the big gotcha I had when initially getting this to work in Neo/J (not needed for OOo), and because that step seems to be missing from your list--is the proper naming of the .ps file:

sardisson wrote:
The resulting dialogue suggests a terribly useless name "name_of_file.sxw - NeoOffice/J 1.1 Alpha 2 ", and this has to be renamed to "name_of_file" (or "name_of_file.ps"--strangely, both work) and saved on the Desktop (or wherever you have extendedPDF set to dump the .ps/temporary files).


Smokey
Back to top
View user's profile Send private message Visit poster's website
roberts
Agent


Joined: Dec 13, 2004
Posts: 13

PostPosted: Sun Dec 19, 2004 8:41 pm    Post subject: Reply with quote

My experience is a little different. Here is my set up.

*Went out and bought Acrobat (standard, not professional) (ouch)
*made sure to include the font I used in setting up acrobat
*set up an Adobe PDF preset to save files as postscript via the now well document procedure (it does *not* crash distiller for me to do this, and produces better output.)

In NeoOffice, I ignore the printer name, as it is not used anyways.
When I run the pdf macro, the dialog comes up to save file and I select my Adobe PDF printer with the aforementioned preset.
The name it gives is the title bar of the NeoOffice window ("$title of document -- $Neooffice label") This needs to be renamed to $filename.ps

Unfortunately, after I click "save" (after renaming) it gives me the whole save as dialog *again*. Wierd. I again replace the name and click save. The second time it works.

Lyanage's macro does not work for me. I only managed to get the ps file, which I drag to distiller.

Then, I get good output (good enough to use for work, so maybe they'll chip in for Acrobat, too Wink

Here are the problems I had with the macro:
First, the application needs to be "Adobe Distiller 6.0", not 6.0.2. I don't know which version you guys are running. I updated acrobat, but there was no option to update Distiller. I just go by the name as reported in the dock, and it seems to work, whereas 6.0.2 does not work for me.

Next, the console records "user interaction not allowed"
As I don't know anything about applescript, I tried modifying it to have hardcoded names and feeding it into osascript. Still, "user interaction not allowed". Then, I cut and paste it into Apple's Script editor. Success! Untill... I get a timeout error (very long doc). Then, I try to fix the timeout with no success and go to sleep. Ugh.
Back to top
View user's profile Send private message
roberts
Agent


Joined: Dec 13, 2004
Posts: 13

PostPosted: Sun Dec 19, 2004 10:59 pm    Post subject: Reply with quote

Success! The following applescript works for me:

Quote:

#!/usr/bin/perl
#
# OpenOffice helper script to invoke Adobe Acrobat Distiller
# in place of ghostscript on Mac OS X from the extendedPDF
# Macro (http://www.jdisoftware.co.uk/pages/epdf-home.php).
#
# Install this somewhere on your machine, make it executable
# and then configure its path instead of the "gs" command
# in the "Configuration" dialog of the extendedPDF GUI.
#
# Written by Marc Liyanage, see http://www.entropy.ch
#
# Modified by Robert Sussland (who knows nothing about applescript)
# in order to address timeouts for long documents, and deal with
# Acrobat 6.0

use warnings;
use strict;

use IO::File;

my ($outputfile) = map {/^-sOutputFile=(.+$)/; $1 ? $1 : ()} @ARGV;
my ($inputfile) = $ARGV[-1];


my $applescript = <<"EOF";

with timeout of 600 seconds
tell application "Acrobat Distiller 6.0"
Distill destinationPath "$outputfile" sourcePath "$inputfile"
end tell
end timeout
EOF

my $pipe = IO::File->new("|/usr/bin/osascript");
print $pipe $applescript;
$pipe->close();



I modified the application name to read "Acrobat Distiller 6.0" even though I have 6.0.1 -- I have Acrobat Standard, not professional. My sense is to use whatever name appears above the distiller application in the dock.

Also, I added a timeout for long documents.

To recap, there are three steps to generating marked up PDFs.

1. generate a postscript file from your openoffice document
the postscript file must be placed in a location that matches ExtendedPDF configuration dialog (File Settings --> Temporary Folder)

2. ExtendedPDF will add markup to the postscript, producing a new postscript file in the same folder as the temporary one.

3. A program must convert the marked up postscript to pdf format.

I use Acrobat Distiller for steps 1 and 3. This is done by selecting the printer to be "Adobe PDF" in the print dialog, and then passing the marked up postscript to distiller again via the perl script.


==============
gotchas:

*spaces
I don't have spaces in my filenames, so this is not an issue for me.

*which driver to use to generate the postscript
I use "Adobe PDF" to both generate the original postscript file (put in the temp directory) as well as to generate the pdf from the marked up postscript produced by the ExtendedPDF macro. I am no longer using the localhost printer approach.

*Acrobat level and resolution
When the first postscript is created, make sure that the same Acrobat Level is used by the ExtendedPDF and the printer driver that produces the postscript as well as the one that produces the pdf. I have mine set to 1.4 (Acrobat 5 or later). You should also set the "quality" level (e.g. prepress, screen) to be the same across the board. Just make an "Adobe PDF" preset to match your ExtendedPDF options.

*link boxes
I unselect the "show link boxes" option, as the link boxes are misaligned, and appear higher than the actual text, looking ugly.

*Print Dialog (when generating the initial postscript)
**must have the right name
When I run this, I get the print dialog, which I assume is launched by NeoOffice/J. It helpfully(!) fills in the name from whatever window title bar has focus at the time (sometimes this is "paragraph styles -- NeoOffice J 1.1/Alpha 2" and sometimes it is "$document_title -- NeoOffice J 1.1/Alpha 2"). As my docs have different filenames and titles, I have to replace this each time.
**must be a postscript file
Regardless of the preset I use, I have to manually select "output options --> save as --> postscript" -- Does anyone know how to make the preset remember the output options?

**must be saved twice(!)
After telling the print dialog to save the file as a postscript with the right name, and clicking "save" a brand new print dialog pops up and I have to repeat the process. Second time is the charm.

=====================
However, at the end of the day, I get the pdf generated with no errors from ExtedndedPDF, and it is placed in the right location, and looks good.
Back to top
View user's profile Send private message
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Dec 20, 2004 12:54 am    Post subject: Reply with quote

roberts wrote:
Success! The following applescript works for me:
[...]
I modified the application name to read "Acrobat Distiller 6.0" even though I have 6.0.1 -- I have Acrobat Standard, not professional. My sense is to use whatever name appears above the distiller application in the dock.

Right...the name in the script needs to match the name of the app you have; ordinarily it would be the name displayed by the Finder (as well as in the Dock), but because Adobe puts a decimal version number in the app name and the Mac OS X Finder is so #$#@%#$ broken--I made a copy of a folder named "NeoJ icons 2.0" today and it was named "NeoJ icons 2 copy.0"!--the Finder ends up displaying the otherwise hidden .app bundle extension. There is a way for AppleScript to call the application by creator code and not have to worry about the name, but it's clumisier and more complex than simply making sure that the name matches in the script Smile

Need to drop a line to Marc and let him know he needs to make a note about that--and your timeout issue, too; I haven't done long enough docs, I guess.

roberts wrote:
To recap, there are three steps to generating marked up PDFs.

1. generate a postscript file from your openoffice document
the postscript file must be placed in a location that matches ExtendedPDF configuration dialog (File Settings --> Temporary Folder)

2. ExtendedPDF will add markup to the postscript, producing a new postscript file in the same folder as the temporary one.

3. A program must convert the marked up postscript to pdf format.


A minor quibble, but step 1 and 2 are the same. extendedPDF/OOo/printer generates only one .ps file with the markup (or at least only one that's ever visible to the user...I don't know the specifics of the innards of the macro, but it AFAIK OOo passes "printing" code to the print driver ordinarily; ePDF intercepts it, adds its markup, and then sends it on to the printer).

roberts wrote:
**must be saved twice(!)
After telling the print dialog to save the file as a postscript with the right name, and clicking "save" a brand new print dialog pops up and I have to repeat the process. Second time is the charm.


This comes from using AdobePDF as your printer...it wants to save your document (as a PDF) because that's the way it works, but you've also invoked the standard print dialogue's "Output Options" pane and told it to save the document as PS. This really shouldn't be allowed to happen, but whether it's Apple's bug or Adobe's I'm not sure.

This doesn't happen when you interface PS creation through a "real" printer instead of AdobePDF. Is there any reason you discontinued use of your dummy printer <localhost>? (The actual printer "used" to create the PS is irrelevant--it's all Apple's standard OS routines--except if the printer is one that is designed, like AdobePDF, to save files instead of "printing" them. The printer selection in the native print dialogue is as useless as the "Printer Name" in the ePDF config tab when running in Neo/J; neither are really involved, aside from the AdobePDF caveat, which does attempt to get involved and causes problems as a result.)

roberts wrote:
**must be a postscript file
Regardless of the preset I use, I have to manually select "output options --> save as --> postscript" -- Does anyone know how to make the preset remember the output options?


Hmm, this works fine for me with a real printer. Might be an issue with AdobePDF again. You set those options and chose "Save" from the presets window, right?

roberts wrote:
**must have the right name
When I run this, I get the print dialog, which I assume is launched by NeoOffice/J. It helpfully(!) fills in the name from whatever window title bar has focus at the time (sometimes this is "paragraph styles -- NeoOffice J 1.1/Alpha 2" and sometimes it is "$document_title -- NeoOffice J 1.1/Alpha 2"). As my docs have different filenames and titles, I have to replace this each time.


Yep. I assume this window-titling behavior is standard on Windows and maybe other UNIX platforms, but it's a definite no-no on the Mac. I keep meaning to file a bug about this--the document window's title should be the name of the document, not some first line as saved by the bozo in Windows who wrote the Word doc I've been sent, not the file name and the name of the program, and not any other wacky combination. Just the filename. Since the Mac OS X "save as .ps/.pdf" code grabs the document window title assuming it is displaying the document filename just like every other Mac app, we get this issue in our save as .ps step.

roberts wrote:
I use Acrobat Distiller for steps 1 and 3. This is done by selecting the printer to be "Adobe PDF" in the print dialog, and then passing the marked up postscript to distiller again via the perl script.

[...]

*which driver to use to generate the postscript
I use "Adobe PDF" to both generate the original postscript file (put in the temp directory) as well as to generate the pdf from the marked up postscript produced by the ExtendedPDF macro. I am no longer using the localhost printer approach.

*Acrobat level and resolution
When the first postscript is created, make sure that the same Acrobat Level is used by the ExtendedPDF and the printer driver that produces the postscript as well as the one that produces the pdf. I have mine set to 1.4 (Acrobat 5 or later). You should also set the "quality" level (e.g. prepress, screen) to be the same across the board. Just make an "Adobe PDF" preset to match your ExtendedPDF options.


I honestly think that using AdobePDF as the printer is a bad idea and overcomplicates things and creates lots of problems that aren't otherwise present in the process Smile Unless you were unable to get things working with the dummy printer, I'd use that instead for all the initial steps (it most certainly won't try to grab control like AdobePDF) and only let Adobe (Distiller) get involved for creating the final structured PDF. I just created a dummy printer (chose HP LJet 6MP for the PPD) and all worked well.

roberts wrote:
However, at the end of the day, I get the pdf generated with no errors from ExtedndedPDF, and it is placed in the right location, and looks good.


Glad you have it working--but I do think it is possible to have it working without most of your gotchas for an even smoother experience Wink

Now lets see if we can't get Oscar creating extendedPDFs successfully, even if it involves extra complications at first Smile

Smokey
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NeoOffice Forum Index -> OpenOffice.org MacOS X X11 Support All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.05 Seconds