Submit an Issue
Knowledge Base
Server Product Support
Examples & How-Tos
Support Options
Support Policies
Annual Subscription
Extensions
Documentation
Resource Links
Home
Support
Knowledge Base
activePDF KB #10330 - OpenOutputFile and/or OpenInputFile generate a -1 when using relative paths to files
activePDF KB #10330 - OpenOutputFile and/or OpenInputFile generate a -1 when using relative paths to files
Problem: Configuration
Printer Version
|
Return to Search
OpenOutputFile and/or OpenInputFile generate a -1 when using relative paths to files
Product
Version
Toolkit Std
Toolkit Pro
3.5.2
4.0
4.0 SR1
Problem
When using a relative path to the file, OpenOutputFile and/or OpenInputFile generate a -1, such as:
X = tk.OpenOutputFile("/PDF/myfile.pdf")
Y = tk.OpenInputFile("/templates/template.pdf")
Cause
The path is being misinterpreted.
Resolution
To correctly use relative paths, insert a period (.) before the path as follows:
X = tk.OpenOutputFile("./PDF/myfile.pdf")
Y = tk.OpenInputFile("./templates/template.pdf")
A single period denotes the current directory.
A double period can be used to access a directory adjacent to the current directory via the parent:
X = tk.OpenOutputFile("../PDF2/myfile.pdf") will navigate up one directory to the parent and then back down to PDF2 to write the output file.
Last Updated 2005-09-28
Printer Version
|
Return to Search
Knowledge Base Article Feedback*
*KB article feedback
ONLY
(submit support issues
here
)
Quality of this article?
Poor
Excellent
1
2
3
4
5
6
7
8
9
10
Is this article helpful?
Yes
No
Maybe
Comments (Optional)
Email Address (Optional)
Please enter the word "PDF"
(without quotes)
The information in this article is for the use of activePDF Customers and Evaluation Users Only. No part of this document may be transmitted or reproduced without the express written consent of activePDF.
Copyright © 2005, activePDF, Inc. All Rights Reserved