-
Notifications
You must be signed in to change notification settings - Fork 41
Martin/svr 6891 enhance xliff rtl samples obj c python php ruby go #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mrmartinclark
wants to merge
6
commits into
master
Choose a base branch
from
martin/SVR-6891-enhance-xliff-rtl-samples-obj-c-python-php-ruby-go
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
08e606d
Added XLIFF2 import to TransPDFTests
mrmartinclark 680cfd8
Added Arabic samples for Go, Pythin, PHP and Ruby
mrmartinclark 5e22892
Added Samples hebrew translation.
mrmartinclark b6d4f62
Copilot suggested changes
mrmartinclark 698523c
More copilot changes.
mrmartinclark 136a2b0
Rename new samples to end in "Test"
mrmartinclark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en"> | ||
| <file id="f-1" original="../../TestFiles/find-replace-test.pdf"> | ||
| <unit id="A-a"> | ||
| <!-- | ||
| <fmt id="1-0" name="0" size="14.0" rise="0.0" scale="100" | ||
| colour="ffffff" colid="0" israwchars="1" fname="LatoBlack" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-1' state="initial"> | ||
| <source>2 </source> | ||
| <target>2 </target> | ||
| </segment> | ||
| </unit> | ||
| <unit id="A-LR"> | ||
| <!-- | ||
| <fmt id="2-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-2' state="initial"> | ||
| <source>You plan to embed PDF functionality into an application. But before you dive into the project, you must decide: do you go with a more expensive commercial PDF SDK — or a lower-cost alternative such as an open-source library or an open-source wrapper?</source> | ||
| <target>Vous envisagez d’intégrer des fonctionnalités PDF dans une application. Mais avant de vous lancer dans le projet, vous devez décider : optez-vous pour un SDK PDF commercial plus coûteux - ou une alternative moins coûteuse telle qu’une bibliothèque open source ou un wrapper open source ?</target> | ||
| </segment> | ||
|
|
||
| <!-- | ||
| <fmt id="3-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-3' state="initial"> | ||
| <source>There are non-trivial costs to switching later. Developers have to re-learn the new library, re-adjust the backend, customize the UI to match what users are accustomed to, as well as migrate documents, form data, annotations, and more. </source> | ||
| <target>Il y a des coûts non négligeables à changer plus tard. Les développeurs doivent réapprendre la nouvelle bibliothèque, réajuster le backend, personnaliser l’interface utilisateur pour qu’elle corresponde à ce à quoi les utilisateurs sont habitués, ainsi que migrer des documents, des données de formulaire, des annotations, etc. </target> | ||
| </segment> | ||
|
|
||
| <!-- | ||
| <fmt id="4-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| <fmt id="4-1" name="1" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" israwchars="1" fname="Lato" fweight="bold" fstyle="normal" | ||
| underline="1" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-4' state="initial"> | ||
| <source> | ||
| According to <pc id='4-1' type='fmt'>market research</pc> conducted by Stax Inc., the average Net Promoter Score (NPS) for the top five PDF SDK vendors is 35%. And 70% of customers express interest in switching despite the high costs. | ||
| </source> | ||
| <target>D’après une <pc id='4-1' type='fmt'>étude de marché</pc> menée par Stax Inc., le Net Promoter Score (NPS) moyen des cinq principaux fournisseurs de SDK PDF est de 35 %. Et 70 % des clients expriment leur intérêt à changer de client malgré les coûts élevés.</target> | ||
| </segment> | ||
|
|
||
| <!-- | ||
| <fmt id="5-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-5' state="initial"> | ||
| <source>This dissatisfaction implies that picking the right PDF SDK is a lot harder than it seems. And to help you avoid the same mistakes as past implementations, we’ve written this article.</source> | ||
| <target>Cette insatisfaction implique que choisir le bon SDK PDF est beaucoup plus difficile qu’il n’y paraît. Et pour vous aider à éviter les mêmes erreurs que les implémentations précédentes, nous avons rédigé cet article.</target> | ||
| </segment> | ||
|
|
||
| <!-- | ||
| <fmt id="6-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| <fmt id="6-1" name="1" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="1" israwchars="1" fname="Lato" fweight="bold" fstyle="normal" | ||
| underline="1" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-6' state="initial"> | ||
| <source> | ||
| (We also<pc id='6-1' type='fmt'> </pc><pc id='6-1' type='fmt'>recently surveyed 57</pc> unique organizations that switched from PDF.js to a commercial SDK. Read our<pc id='6-1' type='fmt'> </pc><pc id='6-1' type='fmt'>comprehensive guide to PDF.js</pc> to learn more.) | ||
| </source> | ||
| <target>(Nous avons également<pc id='6-1' type='fmt'> </pc><pc id='6-1' type='fmt'>récemment interrogé 57</pc> organisations uniques qui sont passées d’un PDF.js à un SDK commercial. Lisez notre<pc id='6-1' type='fmt'> </pc><pc id='6-1' type='fmt'>guide complet sur les PDF.js</pc> pour en savoir plus.) </target> | ||
| </segment> | ||
| </unit> | ||
| <unit id="A-b4"> | ||
| <!-- | ||
| <fmt id="7-0" name="0" size="30.0" rise="0.0" scale="100" | ||
| colour="0206a8" colid="2" israwchars="1" fname="LatoBlack" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <segment id='p1-7' state="initial"> | ||
| <source>Overview </source> | ||
| <target>Aperçu </target> | ||
| </segment> | ||
| </unit> | ||
| </file> | ||
| </xliff> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
| <file original="../../TestFiles/translation-test.pdf" source-language="en" datatype="x-pdf" product-name="InfixXLIFF"> | ||
| <header> | ||
| <tool tool-id="InfixXLIFF" tool-name="InfixXLIFF" tool-company="Apryse"/> | ||
| </header> | ||
| <body> | ||
| <!-- | ||
| <cstyle id="1-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <trans-unit id='p1-1' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>You plan to embed PDF functionality into an application. But before you dive into the project, you must decide: do you go with a more expensive commercial PDF SDK — or a lower-cost alternative such as an open-source library or an open-source wrapper?</source> | ||
| <target>تخطط لتضمين وظائف ملفات PDF في تطبيقك. ولكن قبل أن تبدأ المشروع، عليك أن تقرر: هل ستختار حزمة تطوير برامج PDF تجارية باهظة الثمن، أم بديلاً أقل تكلفة مثل مكتبة مفتوحة المصدر أو غلاف برمجي مفتوح المصدر؟</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="2-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <trans-unit id='p1-2' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>There are non-trivial costs to switching later. Developers have to re-learn the new library, re-adjust the backend, customize the UI to match what users are accustomed to, as well as migrate documents, form data, annotations, and more. </source> | ||
| <target>هناك تكاليف غير تافهة للتبديل لاحقًا. يجب على المطورين إعادة تعلم المكتبة الجديدة، وإعادة ضبط الخلفية، وتخصيص واجهة المستخدم لتتناسب مع ما اعتاد عليه المستخدمون، بالإضافة إلى ترحيل المستندات وبيانات النماذج والتعليقات التوضيحية والمزيد.</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="3-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
|
|
||
| <cstyle id="3-1" name="1" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" israwchars="1" fname="Lato" fweight="bold" fstyle="normal" | ||
| underline="1" strike="0" link=""/> | ||
| --> | ||
| <trans-unit id='p1-3' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>According to <g id='3-1' ctype='x-cstyle'>market research</g> conducted by Stax Inc., the average Net Promoter Score (NPS) for the top five PDF SDK vendors is 35%. And 70% of customers express interest in switching despite the high costs.</source> | ||
| <target>وفقًا لأبحاث السوق التي أجرتها شركة Stax Inc.، فإن متوسط درجة صافي المروجين (NPS) لأفضل خمسة بائعي SDK لملفات PDF هو 35%. ويعرب 70% من العملاء عن اهتمامهم بالتبديل على الرغم من التكاليف العالية.</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="4-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <trans-unit id='p1-4' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>This dissatisfaction implies that picking the right PDF SDK is a lot harder than it seems. And to help you avoid the same mistakes as past implementations, we’ve written this article.</source> | ||
| <target>يشير هذا الاستياء إلى أن اختيار حزمة تطوير برامج PDF المناسبة أصعب بكثير مما يبدو. وللمساعدة في تجنب ارتكاب نفس الأخطاء التي حدثت في التطبيقات السابقة، كتبنا هذا المقال.</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="5-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
|
|
||
| <cstyle id="5-1" name="1" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" israwchars="1" fname="Lato" fweight="bold" fstyle="normal" | ||
| underline="1" strike="0" link=""/> | ||
| --> | ||
| <trans-unit id='p1-5' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>(We also<g id='5-1' ctype='x-cstyle'> </g><g id='5-1' ctype='x-cstyle'>recently surveyed 57</g> unique organizations that switched from PDF.js to a commercial SDK. Read our<g id='5-1' ctype='x-cstyle'> </g><g id='5-1' ctype='x-cstyle'>comprehensive guide to PDF.js</g> to learn more.) </source> | ||
| <target>(لقد أجرينا أيضًا مؤخرًا مسحًا شمل 57 منظمة فريدة انتقلت من PDF.js إلى SDK تجاري. اقرأ دليلنا الشامل حول PDF.js لمعرفة المزيد.)</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="6-0" name="0" size="30.0" rise="0.0" scale="100" | ||
| colour="0206a8" colid="1" israwchars="1" fname="LatoBlack" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0" link=""/> | ||
| --> | ||
| <trans-unit id='p1-6' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>Overview </source> | ||
| <target>نظرة عامة</target> | ||
| </trans-unit> | ||
|
|
||
| </body> | ||
| </file> | ||
| </xliff> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
| <file original="../../TestFiles/translation-test.pdf" source-language="en" datatype="x-pdf" product-name="InfixXLIFF"> | ||
| <header> | ||
| <tool tool-id="InfixXLIFF" tool-name="InfixXLIFF" tool-company="Apryse"/> | ||
| </header> | ||
| <body> | ||
| <!-- | ||
| <cstyle id="1-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0"/> | ||
| --> | ||
| <trans-unit id='p1-1' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>You plan to embed PDF functionality into an application. But before you dive into the project, you must decide: do you go with a more expensive commercial PDF SDK — or a lower-cost alternative such as an open-source library or an open-source wrapper?</source> | ||
| <target>אתם מתכננים להטמיע פונקציונליות של PDF באפליקציה. אבל לפני שאתם צוללים לתוך הפרויקט, עליכם להחליט: האם אתם בוחרים ב-PDF SDK מסחרי יקר יותר - או בחלופה זולה יותר כמו ספריית קוד פתוח או עטיפת קוד פתוח?</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="2-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0"/> | ||
| --> | ||
| <trans-unit id='p1-2' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>There are non-trivial costs to switching later. Developers have to re-learn the new library, re-adjust the backend, customize the UI to match what users are accustomed to, as well as migrate documents, form data, annotations, and more. </source> | ||
| <target>ישנן עלויות לא טריוויאליות למעבר מאוחר יותר. מפתחים צריכים ללמוד מחדש את הספרייה החדשה, להתאים מחדש את ה-backend, להתאים אישית את ממשק המשתמש כך שיתאים למה שהמשתמשים רגילים אליו, וכן להעביר מסמכים, נתוני טפסים, הערות ועוד.</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="3-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0"/> | ||
|
|
||
| <cstyle id="3-1" name="1" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" israwchars="1" fname="Lato" fweight="bold" fstyle="normal" | ||
| underline="1" strike="0"/> | ||
| --> | ||
| <trans-unit id='p1-3' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>According to <g id='3-1' ctype='x-cstyle'>market research</g> conducted by Stax Inc., the average Net Promoter Score (NPS) for the top five PDF SDK vendors is 35%. And 70% of customers express interest in switching despite the high costs.</source> | ||
| <target>לפי מחקר שוק שערכה Stax Inc., ציון ה-Net Promoter Score (NPS) הממוצע עבור חמשת ספקי PDF SDK המובילים הוא 35%. ו-70% מהלקוחות מביעים עניין במעבר למרות העלויות הגבוהות.</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="4-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0"/> | ||
| --> | ||
| <trans-unit id='p1-4' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>This dissatisfaction implies that picking the right PDF SDK is a lot harder than it seems. And to help you avoid the same mistakes as past implementations, we’ve written this article.</source> | ||
| <target>חוסר שביעות רצון זה מרמז שבחירת ערכת פיתוח התוכנה (SDK) המתאימה ל-PDF קשה הרבה יותר ממה שנדמה. וכדי לעזור לכם להימנע מאותן טעויות כמו ביישומים קודמים, כתבנו מאמר זה.</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="5-0" name="0" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" fname="Lato" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0"/> | ||
|
|
||
| <cstyle id="5-1" name="1" size="12.0" rise="0.0" scale="100" | ||
| colour="1d446c" colid="0" israwchars="1" fname="Lato" fweight="bold" fstyle="normal" | ||
| underline="1" strike="0"/> | ||
| --> | ||
| <trans-unit id='p1-5' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>(We also<g id='5-1' ctype='x-cstyle'> </g><g id='5-1' ctype='x-cstyle'>recently surveyed 57</g> unique organizations that switched from PDF.js to a commercial SDK. Read our<g id='5-1' ctype='x-cstyle'> </g><g id='5-1' ctype='x-cstyle'>comprehensive guide to PDF.js</g> to learn more.) </source> | ||
| <target>(לאחרונה גם סקרנו 57 ארגונים ייחודיים שעברו מ-PDF.js ל-SDK מסחרי. קראו את המדריך המקיף שלנו ל-PDF.js למידע נוסף.)</target> | ||
| </trans-unit> | ||
|
|
||
| <!-- | ||
| <cstyle id="6-0" name="0" size="30.0" rise="0.0" scale="100" | ||
| colour="0206a8" colid="1" israwchars="1" fname="LatoBlack" fweight="normal" fstyle="normal" | ||
| underline="0" strike="0"/> | ||
| --> | ||
| <trans-unit id='p1-6' approved="yes" translate="yes" xml:space="default" datatype="plaintext"> | ||
| <source>Overview </source> | ||
| <target>סקירה כללית</target> | ||
| </trans-unit> | ||
|
|
||
| </body> | ||
| </file> | ||
| </xliff> |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| //--------------------------------------------------------------------------------------- | ||
| // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved. | ||
| // Consult LICENSE.txt regarding license information. | ||
| //--------------------------------------------------------------------------------------- | ||
|
|
||
| package main | ||
| import ( | ||
| "testing" | ||
| "flag" | ||
| . "github.com/pdftron/pdftron-go/v2" | ||
| ) | ||
|
|
||
| var licenseKey string | ||
| var modulePath string | ||
|
|
||
| func init() { | ||
| flag.StringVar(&licenseKey, "license", "", "License key for Apryse SDK") | ||
| flag.StringVar(&modulePath, "modulePath", "", "Path for downloaded modules") | ||
| } | ||
|
|
||
| //--------------------------------------------------------------------------------------- | ||
| // The following sample illustrates how to extract xlf from a PDF document for translation. | ||
| // It then applies a pre-prepared translated xlf file to the PDF to produce a translated PDF. | ||
| //--------------------------------------------------------------------------------------- | ||
|
|
||
| // Relative path to the folder containing test files. | ||
| var inputPath = "../TestFiles/" | ||
| var outputPath = "../TestFiles/Output/" | ||
|
|
||
| //--------------------------------------------------------------------------------------- | ||
|
|
||
| func TestTransPDFArabic(t *testing.T) { | ||
|
|
||
| // The first step in every application using PDFNet is to initialize the | ||
| // library and set the path to common PDF resources. The library is usually | ||
| // initialized only once, but calling Initialize() multiple times is also fine. | ||
| PDFNetInitialize(licenseKey) | ||
|
|
||
| // Open a PDF document to translate | ||
| doc := NewPDFDoc(inputPath + "translation-test.pdf") | ||
| options := NewTransPDFOptions() | ||
|
|
||
| // Set the source language in the options | ||
| options.SetSourceLanguage("en") | ||
|
|
||
| // Set the number of pages to process in each batch | ||
| options.SetBatchSize(20) | ||
|
|
||
| // Optionally, subset the pages to process | ||
| // This PDF only has a single page, but you can specify a subset of pages like this | ||
| // options.SetPages("-2,5-6,9,11-") | ||
|
|
||
| // Optionally, flip the text boxes, vector artwork and images on the to page top retain continuity. | ||
| // options.SetFlipPageContentsForBiDirectionalTranslations(true); | ||
|
|
||
| // Extract the xlf to file and field the PDF for translation | ||
| TransPDFExtractXLIFF(doc, outputPath + "translation-test-arabic.xlf", options) | ||
|
|
||
| // Save the fielded PDF | ||
| doc.Save(outputPath + "translation-test-arabic-fielded.pdf", uint(SDFDocE_linearized)) | ||
|
|
||
| // The extracted xlf can be translated in a system of your choice. | ||
| // In this sample a pre-prepared translated file is used - translation-test-(en_to_ar).xlf | ||
|
|
||
| // Perform the translation using the pre-prepared translated xliff | ||
| TransPDFApplyXLIFF(doc, inputPath + "translation-test-(en_to_ar).xlf", options) | ||
|
|
||
| // Save the translated PDF | ||
| doc.Save(outputPath + "translation-test-arabic.pdf", uint(SDFDocE_linearized)) | ||
| doc.Close() | ||
|
|
||
| PDFNetTerminate() | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| @echo off | ||
| setlocal | ||
| set TEST_NAME=TransPDFTestArabic | ||
| set PATH=..\..\..\PDFNetC\Lib;%PATH% | ||
| php.exe %TEST_NAME%.php | ||
| endlocal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/sh | ||
| TEST_NAME=TransPDFTestArabic | ||
| export LD_LIBRARY_PATH=../../../PDFNetC/Lib | ||
| php -d extension="../../../PDFNetC/Lib/PDFNetPHP.so" $TEST_NAME.php |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.