Add translation in Python section (French)#534
Conversation
Add extensive French documentation pages for Aspose.PDF for Python via .NET (notably many advanced-operations sections such as accessibility-tagged-pdf, annotations, artifacts, attachments, navigation-and-interaction, securing-and-signing, working-with-*, parsing and converting pages). Update front-matter and metadata across several index files (linktitle normalization, lastmod, sitemap changefreq, add TechArticle/AlternativeHeadline/Abstract fields) and fix internal links to the python-net paths. These changes expand French coverage and improve SEO/metadata for the documentation site.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 93 out of 145 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fr/python-net/advanced-operations/accessibility-tagged-pdf/edit-tags/_index.md
Show resolved
Hide resolved
|
|
||
| for element in element_list: | ||
| if isinstance(element, ap.logicalstructure.StructureElement): | ||
| structure_element = cast(ap.logical_structure.StructureElement, element) |
There was a problem hiding this comment.
ap.logical_structure.StructureElement ne correspond pas au même namespace que ap.logicalstructure. Tel qu’écrit, ce décalage de nom de module est très susceptible de casser l’exemple (AttributeError). Harmoniser le namespace utilisé (par ex. utiliser ap.logicalstructure.StructureElement des deux côtés).
| structure_element = cast(ap.logical_structure.StructureElement, element) | |
| structure_element = cast(ap.logicalstructure.StructureElement, element) |
fr/python-net/advanced-operations/working-with-documents/split-pdf/_index.md
Outdated
Show resolved
Hide resolved
| page_number_stamp.text_state.font_style = ap.text.FontStyles.BOLD | ||
| page_number_stamp.text_state.font_style = ap.text.FontStyles.ITALIC |
There was a problem hiding this comment.
La propriété font_style est assignée deux fois ; la seconde ligne écrase la première et le style BOLD ne sera jamais appliqué. Si l’intention est d’avoir les deux styles, combiner les flags (selon l’API) ou choisir un seul style.
| page_number_stamp.text_state.font_style = ap.text.FontStyles.BOLD | |
| page_number_stamp.text_state.font_style = ap.text.FontStyles.ITALIC | |
| page_number_stamp.text_state.font_style = ( | |
| ap.text.FontStyles.BOLD | ap.text.FontStyles.ITALIC | |
| ) |
| ppath_infile = self.data_dir + infile | ||
| path_outfile = self.data_dir + outfile | ||
| path_pfxfile = self.data_dir + pfxfile | ||
|
|
||
| # Open PDF document | ||
| with ap.Document(path_infile) as document: | ||
| # Instantiate PdfFileSignature object |
There was a problem hiding this comment.
ppath_infile est défini mais jamais utilisé, tandis que path_infile est utilisé sans être défini dans cet extrait. Cela rend l’exemple non exécutable. Renommer ppath_infile en path_infile (ou utiliser ppath_infile dans ap.Document(...)).
| data_dir = "/path/to/your/pdf/files/" | ||
| path_infile = os.path.join(work_dir, infile) | ||
| path_outfile = os.path.join(work_dir, outfile) | ||
|
|
||
| # Open document | ||
| pdfDocument = ap.Document(path_infile) |
There was a problem hiding this comment.
os.path.join est utilisé sans import de os et work_dir n’est pas défini dans l’extrait. Pour éviter un exemple non exécutable, importer os et utiliser data_dir (ou définir explicitement work_dir).
| path_infile = self.data_dir + "DynamicXFAToAcroForm.pdf.pdf" | ||
| path_outfile = self.data_dir + "StandardAcroForm_out.pdf" |
There was a problem hiding this comment.
Le nom de fichier d’entrée contient une double extension .pdf.pdf, ce qui ressemble à une faute de frappe et risque de casser l’exemple si le fichier réel est DynamicXFAToAcroForm.pdf.
| } | ||
| </script> | ||
|
|
||
| **Aspose.PDF for Python via .NET** vous permet de travailler avec des tables dans les fichiers PDF de manière avancée. Cet outil parfait aide à surmonter la simplicité des PDF en extrayant les tables. Avec la ressource de la bibliothèque Python, vous pouvez facilement créer ou ajouter une table dans un document PDF existant, déterminer si la table se rupturera sur la page courante, extraire la table et supprimer des tables des PDF existants. |
There was a problem hiding this comment.
Le verbe « rupturera » est inadapté dans ce contexte (et sonne comme un faux-ami). Préférer une formulation comme « se scindera », « se fractionnera » ou « se cassera ».
| **Aspose.PDF for Python via .NET** vous permet de travailler avec des tables dans les fichiers PDF de manière avancée. Cet outil parfait aide à surmonter la simplicité des PDF en extrayant les tables. Avec la ressource de la bibliothèque Python, vous pouvez facilement créer ou ajouter une table dans un document PDF existant, déterminer si la table se rupturera sur la page courante, extraire la table et supprimer des tables des PDF existants. | |
| **Aspose.PDF for Python via .NET** vous permet de travailler avec des tables dans les fichiers PDF de manière avancée. Cet outil parfait aide à surmonter la simplicité des PDF en extrayant les tables. Avec la ressource de la bibliothèque Python, vous pouvez facilement créer ou ajouter une table dans un document PDF existant, déterminer si la table se fractionnera sur la page courante, extraire la table et supprimer des tables des PDF existants. |
| @@ -1,99 +1,47 @@ | |||
| --- | |||
| title: Extraire AcroForm - Extraire les données de formulaire d'un PDF en Python | |||
| title: Extract AcroForm - Extraire les données de formulaire PDF en Python | |||
There was a problem hiding this comment.
Le titre mélange anglais et français (« Extract AcroForm »). Pour une doc FR et une cohérence SEO, traduire la partie anglaise (ex. « Extraire AcroForm ») ou franciser entièrement le titre.
| title: Extract AcroForm - Extraire les données de formulaire PDF en Python | |
| title: Extraire AcroForm - Extraire les données de formulaire PDF en Python |
| import aspose.pdf as ap | ||
| from os import path | ||
|
|
||
| path_infile = path.join(self.dataDir, infile) | ||
| path_outfile = path.join(self.dataDir, outfile) | ||
|
|
||
| # Load the PDF document | ||
| document = ap.Document(path_infile) | ||
|
|
||
| # Get all annotations of type LINK on the first page | ||
| link_annotations = [ | ||
| a | ||
| for a in document.pages[1].annotations | ||
| if (a.annotation_type == ap.annotations.AnnotationType.LINK) | ||
| ] | ||
|
|
||
| # Loop through each link annotation and change its color to red | ||
| for la in link_annotations: | ||
| link_annotation = cast(ap.annotations.LinkAnnotation, la) | ||
| link_annotation.color = ap.Color.red # Highlight the link in red |
There was a problem hiding this comment.
L’extrait utilise cast(...) (et ailleurs is_assignable(...)) sans import correspondant, donc il ne peut pas s’exécuter tel quel. Ajouter l’import depuis aspose.pycore (par ex. from aspose.pycore import cast, is_assignable) ou éviter ces helpers si non nécessaires.
…-pdf/_index.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add extensive French documentation pages for Aspose.PDF for Python via .NET (notably many advanced-operations sections such as accessibility-tagged-pdf, annotations, artifacts, attachments, navigation-and-interaction, securing-and-signing, working-with-*, parsing and converting pages). Update front-matter and metadata across several index files (linktitle normalization, lastmod, sitemap changefreq, add TechArticle/AlternativeHeadline/Abstract fields) and fix internal links to the python-net paths. These changes expand French coverage and improve SEO/metadata for the documentation site.