コード例 #1
0
ファイル: pagenumber.py プロジェクト: danielzuegner/PDFsuite
def createPDFDocumentFromPath(path):
    global verbose
    if verbose:
        print "Creating PDF document from file %s" % (path)
    return CG.CGPDFDocumentCreateWithURL(
        CG.CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, path,
                                                   len(path), False))
コード例 #2
0
ファイル: pagenumber.py プロジェクト: danielzuegner/PDFsuite
def createOutputContextWithPath(path):
    global verbose
    if verbose:
        print "Setting %s as the destination." % (path)
    return CG.CGPDFContextCreateWithURL(
        CG.CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, path,
                                                   len(path), False), None,
        None)
コード例 #3
0
def createOutputContextWithPath(path, dictarray):
    return Quartz.CGPDFContextCreateWithURL(
        Quartz.CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
                                                       path, len(path), False),
        None, dictarray)
コード例 #4
0
def createPDFDocumentFromPath(path):
    return Quartz.CGPDFDocumentCreateWithURL(
        Quartz.CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
                                                       path, len(path), False))