473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to prevent DISTILLER from propting output filename ?

Hi

I am creating a pdf by just printing on Acrobat Distiller. This is
fine.

I need to create a pdf which has a given prespecified name and I do not
wish that
Distiller prompts me for a name.

Does anyone know how to pass the output file name (thus avoiding that
Distiller open the open file dialog) ?

-tom

Jun 18 '06 #1
6 3353
tld

to**************@uniroma1.it wrote:
Hi

I am creating a pdf by just printing on Acrobat Distiller. This is
fine.

I need to create a pdf which has a given prespecified name and I do not
wish that
Distiller prompts me for a name.

Does anyone know how to pass the output file name (thus avoiding that
Distiller open the open file dialog) ?

-tom


You may not want to dig this deep for this project but here is what I
did (I was too cheap to buy adobe)........

I had this same problem when I was trying to automate pdf creation. I
used GhostScript and Redmon. I created a custom vb application that
reads a text file for the file name and path and then creates a PDF
with that path and name. Pretty much you set up a postscript printer,
with a redirected port, you then set up the port to be redirected to
Redmon, from there you use a custom app that accepts a single command
line argument (you put the path to this custom app in the arugment
section for Redmon followed by a %1). This custom app will get the
path to the postscript document(in the windows temp folder) via the
argument passed from redmon, so then your custom app would call
Ghostscript to convert the postscript file to PDF to whatever name you
wanted. It sounds complicated but if you read the website and wrap
your head around actually what to do and what its doing it is pretty
simple. I have some instructions written up that I need to post on my
site sometime. This is really not as complicated as I made it sound.
http://www.cs.wisc.edu/~ghost/redmon/

http://www.cs.wisc.edu/~ghost/

http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm

If you want more detailed instructions repost or email me and Ill give
them to you.....
tc******@gmail.com

Jun 20 '06 #2
Thank you very much tld.

A was afraid that the solution was something along the lines you
indicate. As you say it's not terribly difficult, but it's at least
inconvenient. That Distiller product has been around for such a long
time that it's a real shame they have not been able to provide a simple
mechanism to indicate an output filename. Worst, there was one (back to
versions 4-5) based on a registry variable, and they have removed it!

It's clear they want to force a solution based on using the distiller
API (or consequently similar open source solutions you are indicating).
If you are going to publish your experience, I think it will be useful
for many persons and I will be your first reader (please let me know
when you do).

Further, if you are willing to post here more details I will be very
grateful, and I think many others will benefit from your experience.

Thank you,

-tommaso

tld ha scritto:
to**************@uniroma1.it wrote:
Hi

I am creating a pdf by just printing on Acrobat Distiller. This is
fine.

I need to create a pdf which has a given prespecified name and I do not
wish that
Distiller prompts me for a name.

Does anyone know how to pass the output file name (thus avoiding that
Distiller open the open file dialog) ?

-tom


You may not want to dig this deep for this project but here is what I
did (I was too cheap to buy adobe)........

I had this same problem when I was trying to automate pdf creation. I
used GhostScript and Redmon. I created a custom vb application that
reads a text file for the file name and path and then creates a PDF
with that path and name. Pretty much you set up a postscript printer,
with a redirected port, you then set up the port to be redirected to
Redmon, from there you use a custom app that accepts a single command
line argument (you put the path to this custom app in the arugment
section for Redmon followed by a %1). This custom app will get the
path to the postscript document(in the windows temp folder) via the
argument passed from redmon, so then your custom app would call
Ghostscript to convert the postscript file to PDF to whatever name you
wanted. It sounds complicated but if you read the website and wrap
your head around actually what to do and what its doing it is pretty
simple. I have some instructions written up that I need to post on my
site sometime. This is really not as complicated as I made it sound.
http://www.cs.wisc.edu/~ghost/redmon/

http://www.cs.wisc.edu/~ghost/

http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm

If you want more detailed instructions repost or email me and Ill give
them to you.....
tc******@gmail.com


Jun 20 '06 #3
tld
I think its better to at least try to use "open source" solutions to
fit a need because its tends to foster understanding for what actually
is going on behind the scenes. The problem with depending on a
commercial product is that they are dependent on you getting "hooked"
on this product and therefore do not facilitate understanding. I won't
go on preaching but I have put together a few pdfs (flow chart and
instructions) and some source code that should describe in detail what
I did to fill this need. Its like 22 lines of code and 2 open source
programs to download. You could probably have this running in half a
day. Hope this helps...

http://cs1.mcm.edu/~chavanaa/AutoPDF.zip

P.S. I hosed my website when I updated it with this link so it looks
like crap! :(

Jun 20 '06 #4
Thanks! Very good Tony,

really nice. I would like to propose some slight changes which, I
believe, will make your already good solution more general. As it is,
for instance, I cannot easily adapt to my specific needs.

I would like to remove the manual port setting which does not fit well
in a general program. I cannot ask my user to setup a port.

The ideal solution is something that allows to create the pdf
completely programmatically.

I would think one could just print to a file using something which
could be a replacement of a color PS driver (an open source replacement
of Distiller) and then convert the PS file to PDF. This would be quite
easy to do with Distiller and its API. I am just wondering if you could
adapt your o.s. solution along these lines.

Actually if you also have other solutions they would be fine, provided
that everything is done programmatically under the scenes. perhaps you
could also create the port programmatically (probably not very elegant)
?

What do you think Tony?

-tom

tld ha scritto:
I think its better to at least try to use "open source" solutions to
fit a need because its tends to foster understanding for what actually
is going on behind the scenes. The problem with depending on a
commercial product is that they are dependent on you getting "hooked"
on this product and therefore do not facilitate understanding. I won't
go on preaching but I have put together a few pdfs (flow chart and
instructions) and some source code that should describe in detail what
I did to fill this need. Its like 22 lines of code and 2 open source
programs to download. You could probably have this running in half a
day. Hope this helps...

http://cs1.mcm.edu/~chavanaa/AutoPDF.zip

P.S. I hosed my website when I updated it with this link so it looks
like crap! :(


Jun 20 '06 #5
tld
Tom,

1) The manual port setting is something that can be done
programmatically. There is actually someone who sells a package (on
http://www.mast-computer.com/) that works in conjuction with
GhostScript and Redmon to accomplish the same goal I did. His
application which costs 13 dollars (which again I was too cheap to buy)
asks for the path to Redmon and Ghostscript and then creates the port
programmitcally to those specs, so this is can definitely be done.
Depending on the scope of your project, creating the port through code
may be well worth your time.

2) My printer can be used to print programmitically. It involves two
lines of code generally, first you write a line to the file that
contains the desired pdf name, then you simple use your code to print
the document to the already setup printer. We use this current
solution to print PDFs straight from MS Access. We had some ad hoc
reports that we generate for clients from Access and last week my boss
insisted we not send snapshot format. I use a macro and write a line
to pdf name file and then call print on the report. This puts the PDF
report where ever I specify based on the client. This loops through
each client putting each file on our SFTP location for client
retrieval. Any code you have that can print can be automated.

3) As for just printing to a file, I think this presents the same
problem as printing to PDF. You still would be required to manually
enter an output file name. I have printed to a postscript file on
Linux systems via one shell command never on XP though. It would be
nice if this kind of application was available then you could skip the
whole printer port issue which I agree would ease this whole process,
does Distiller API have to ability to print to postscript via command
line arguments or passed variables? From what I saw on the API
documenation it looked like it was just concerned with taking
postscript documents to PDF. (forgive me I am pretty ignorant when it
comes to Distiller)

The Adobe® Acrobat® Distiller® application converts PostScript
language page descriptions into Portable Document Format (PDF) files.

4) So far I use this on one PC that outputs PDF reports weekly for
clients. It runs on a scheduled task and therefore its all done
programmtically. This was the limitation I had to get around in the
Mast-Computer.com product because it could only print to a specific
file name and you couldnt change it dynamically through code like I
needed to for each client. I havent had the need to install this on
mulitple end users machines but if that is the case you I would say it
may be a pain to write the code to create the port but without it, it
will be a bigger pain :(. Definitely the best thing would be to find
something that gets you a PS file with one shell command then convert
it with Ghost!!!

So what are you trying to accomplish? What type of documents do you
want to print to PDF and what is the whole process you are looking at?
Are you wanting to build a full out installation exe? I am just trying
to get a picture of your specific needs?

-Tony

Jun 21 '06 #6
Dear Tony,

My scenario is quite simple I am printing drawing
on the print graphics object:

PrintDocument1.Print()

where:

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object,
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage

'Here I draw full color over e.Graphics ...

PageIndex += 1
If PageIndex= Me.PagesList.Count Then
e.HasMorePages = False
Else
e.HasMorePages = True
End If

End Sub
That's it. Ideally, what I would like to do is to be able to specify
just a pdf name
and then the print result (full color) should go into the pdf file.

(If possible, I would rather avoid port setting and alike)

I hope there is a simple o.s. solution to that.

PS ------------

The solution using Distiller would be as follows:
1. You print normally to a file using Distiller as print driver (this
generates a PS)
and it's done within VB.net only
2. You Distill the PS file using a single function provided by the
Distiller API
which takes the PDF name as argument

Note that for step 1 you can use *any* PS driver, provided it supports
full colors


tld ha scritto:
Tom,

1) The manual port setting is something that can be done
programmatically. There is actually someone who sells a package (on
http://www.mast-computer.com/) that works in conjuction with
GhostScript and Redmon to accomplish the same goal I did. His
application which costs 13 dollars (which again I was too cheap to buy)
asks for the path to Redmon and Ghostscript and then creates the port
programmitcally to those specs, so this is can definitely be done.
Depending on the scope of your project, creating the port through code
may be well worth your time.

2) My printer can be used to print programmitically. It involves two
lines of code generally, first you write a line to the file that
contains the desired pdf name, then you simple use your code to print
the document to the already setup printer. We use this current
solution to print PDFs straight from MS Access. We had some ad hoc
reports that we generate for clients from Access and last week my boss
insisted we not send snapshot format. I use a macro and write a line
to pdf name file and then call print on the report. This puts the PDF
report where ever I specify based on the client. This loops through
each client putting each file on our SFTP location for client
retrieval. Any code you have that can print can be automated.

3) As for just printing to a file, I think this presents the same
problem as printing to PDF. You still would be required to manually
enter an output file name. I have printed to a postscript file on
Linux systems via one shell command never on XP though. It would be
nice if this kind of application was available then you could skip the
whole printer port issue which I agree would ease this whole process,
does Distiller API have to ability to print to postscript via command
line arguments or passed variables? From what I saw on the API
documenation it looked like it was just concerned with taking
postscript documents to PDF. (forgive me I am pretty ignorant when it
comes to Distiller)

The Adobe® Acrobat® Distiller® application converts PostScript
language page descriptions into Portable Document Format (PDF) files.

4) So far I use this on one PC that outputs PDF reports weekly for
clients. It runs on a scheduled task and therefore its all done
programmtically. This was the limitation I had to get around in the
Mast-Computer.com product because it could only print to a specific
file name and you couldnt change it dynamically through code like I
needed to for each client. I havent had the need to install this on
mulitple end users machines but if that is the case you I would say it
may be a pain to write the code to create the port but without it, it
will be a bigger pain :(. Definitely the best thing would be to find
something that gets you a PS file with one shell command then convert
it with Ghost!!!

So what are you trying to accomplish? What type of documents do you
want to print to PDF and what is the whole process you are looking at?
Are you wanting to build a full out installation exe? I am just trying
to get a picture of your specific needs?

-Tony


Jun 21 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tuuska | last post by:
Hello! I have this problem, when fwrite() writes to the beginning of xyz.txt file, it overwrites the first line. Any ideas how to prevent this? I'm running PHP 4.3.3RC3 on Linux. <?php $fp =...
0
by: MC | last post by:
Hi, I'm developing an VB.NET app that converts TIFFs to PDFs using Office Imaging 2003 and Adobe Distiller 6.0 in the follwing way: 1. Using automation, I open the TIFF file with Office...
4
by: xzzy | last post by:
I have been tasked with changing the filename Adobe Distiller defaults to. My guess is I can't change it. Has anyone been able to use VBA to change that name? Thanks, John Bickmore...
1
by: Nicole | last post by:
Like many before me, I am tearing my hair out trying to get Acrobat 6.0 to work with VBA. I am getting close, and the error I am getting now seems like it should be easy to surmount. So why am I...
5
by: Filips Benoit | last post by:
Dear All, How to check if Acrobat Distiller is running and how to start it before output? Filip
0
by: John | last post by:
I'm busy converting a Visio vba procedure to VB.NET this morning. My latest problem is printing the document to Distiller (which worked fine in VBA). It's getting caught up on the following line...
12
by: Larry Bud | last post by:
I rarely crosspost, but this affects both ASP and Javascript REALLY odd bug that I ran across in ASP 3.0. I have an input type of file, user clicks browse, then places his cursor in the...
2
by: zensunni | last post by:
I'm looking to interface with distiller using adobe's API. This is the guide I'm using:...
1
by: ncsthbell | last post by:
I am looking for any help with calling 'Acrobat Distiller' using an API from within Access. I have searched on the Internet and it is so very confusing!! I have the product installed but am looking...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.