use of org.omegat.filters2.pdf.PdfFilter in project omegat by omegat-org.
the class PdfFilterTest method testLoad.
@Test
public void testLoad() throws Exception {
String f = "test/data/filters/pdf/file-PdfFilter.pdf";
IProject.FileInfo fi = loadSourceFiles(new PdfFilter(), f);
checkMultiStart(fi, f);
checkMulti("This is some text. This is also some text.", null, null, null, null, null);
checkMultiEnd();
}
use of org.omegat.filters2.pdf.PdfFilter in project omegat by omegat-org.
the class PdfFilterTest method testPasswordProtected.
@Test
public void testPasswordProtected() throws Exception {
String f = "test/data/filters/pdf/file-PdfFilter-password.pdf";
try {
loadSourceFiles(new PdfFilter(), f);
fail("Password-protected PDFs are not supported");
} catch (TranslationException ex) {
// OK
}
}
use of org.omegat.filters2.pdf.PdfFilter in project omegat by omegat-org.
the class PdfFilterTest method testTranslate.
@Test
public void testTranslate() throws Exception {
translate(new PdfFilter(), "test/data/filters/pdf/file-PdfFilter.pdf", Collections.emptyMap());
compareBinary(new File("test/data/filters/pdf/file-PdfFilter-gold.txt"), outFile);
}
use of org.omegat.filters2.pdf.PdfFilter in project omegat by omegat-org.
the class PdfFilterTest method testParse.
@Test
public void testParse() throws Exception {
List<ParsedEntry> lines = parse3(new PdfFilter(), "test/data/filters/pdf/file-PdfFilter.pdf", null);
assertEquals("This is some text. This is also some text. ", lines.get(0).source);
}
Aggregations