Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
JohnLeeM Absent Member.
Absent Member.
734 views

set the path where a PDF file will be written

Using Acu 10.1.1 -- can anyone tell me how, if it is possible, to set the path where a PDF file will be written taking the decision out of the users control; example "C:\A2\Reports\pdffilename.pdf".  Any help would be greatly appreciated.  Thanks

6 Replies
GeorgeK Absent Member.
Absent Member.

RE: set the path where a PDF file will be written

In the SELECT clause you may use the full path name hardcoded or using a variable name; the pdf will be LINE SEQUENTIAL file type just like the csv's , xml, and sql files you generate in the acucobol.
0 Likes
JohnLeeM Absent Member.
Absent Member.

RE: set the path where a PDF file will be written

Thanks for your help but what I am doing (below)

select file-output
assign to "C:\A2\Reports\PDFTest.PDF"
organization is line sequential
file status is printpdf-status.

isn't working. When I try to open the file PDFTest with Adobe i get message 'could not open because not supported file type or because file has been damaged.

Am I missing something?

Any further suggestions would be greatly appreciated.

Thanks.
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: set the path where a PDF file will be written

select file-output assign to print -- then in the runtime configuration file
file-output -P PDF "C:\A2\Reports\PDFTest.PDF"
0 Likes
JohnLeeM Absent Member.
Absent Member.

RE: set the path where a PDF file will be written

Thanks for your help.

What I got with your example is that the printer opened as PDF which is great.

The save as dialog box still came up with the last path used and wanting a file name.

I have multiple users creating multiple print documents several times a day. I need the program
to dictate a different, unique file name each time.

This is very easy writing a sequential (flat) file that can be opened with notepad as an example.

Is there anyway this can be done?

I have read everything I can find on this. It seems that years ago some people purchased
a product "cutepdf.com/.../pdfwriter.asp".

Others said "PDF995 - virtual printer" was the solution.

If anyone has any advice I would very much appreciate it.

Thank you in advance.
0 Likes
ruudh
New Member.

RE: set the path where a PDF file will be written

Hi JohnLeeM,
I think you made a mistake in the namegiving of the PDF.
If you define the print-file like this:
select prn assign to print pdf-file-id
organization line sequential
access mode sequential
lock mode exclusive
file status prn-status.
And in the working storage: 01 pdf-file-id pic x(150).
In the Procedure you set something like:
move "-p PDF T:\data\tstpdf\Test01.pdf" to pdf-file-id
before you open the print-file, then you won't be prompted for a name.
Be aware that you'll have to set the margins also and graphics cannot yet be used until Version 10.2
Hope this helps.
Best regards,
Ruud
JohnLeeM Absent Member.
Absent Member.

RE: set the path where a PDF file will be written

This worked! Thanks, really appreciate your help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.