Για την ηλεκτρονική υπογραφή ενός τοπογραφικού διαγράμματος είναι απαραίτητο να δημιουργηθεί ένα αρχείο PDF που περιέχει το hash code από το DXF. Σε παλαιότερο άρθρο έχουμε δει και άλλα παραδείγματα για την εξαγωγή του hash code .
Συνέχεια ανάγνωσης «Python κώδικας για την εξαγωγή hash code από DXF σε PDF»Κατηγορία: SCRIPTS
Python Code to Convert a list of Images to PDF
In this post a python code is presented to get a list of images from a directory and convert them to a PDF.
The code utilizes the os and the fpdf library. PyFPDF is a library for PDF document generation under Python, ported from PHP.
The code gets the file names of images in the current directory and then creates a PDF of constant width.
import os
from fpdf import FPDF
pdf = FPDF()
pdf.set_auto_page_break(0)
files = os.listdir()
for file in files:
if file.endswith(('.jpg', '.png', 'jpeg')):
pdf.add_page()
pdf.image(file, x = None, y = None, w = 180, h = 0, type = '', link = '')
pdf.output('image2pdf.pdf', 'F')
Python Code to Create a DXF from 3D Points
In this post we present a script written in python to create a DXF from a text file with ID and X Y Z points.
Συνέχεια ανάγνωσης «Python Code to Create a DXF from 3D Points»Python Code to Convert Shapefile to DXF
In this post we present a script written in python to convert a shapefile to DXF.
Συνέχεια ανάγνωσης «Python Code to Convert Shapefile to DXF»