69 lines
1.7 KiB
PowerShell
69 lines
1.7 KiB
PowerShell
$sourceDir = "C:\Users\furqa\pdfium-build\checkout\pdfium\testing\resources"
|
|
$destDir = "$PSScriptRoot\..\corpus"
|
|
|
|
if (-not (Test-Path $sourceDir)) {
|
|
Write-Error "PDFium resources directory not found at: $sourceDir"
|
|
exit 1
|
|
}
|
|
|
|
$basic = @(
|
|
"about_blank.pdf",
|
|
"black.pdf",
|
|
"clip_path.pdf",
|
|
"dashed_lines.pdf",
|
|
"hello_world.pdf",
|
|
"hello_world_2_pages.pdf",
|
|
"many_rectangles.pdf",
|
|
"rectangles.pdf",
|
|
"rectangles_multi_pages.pdf",
|
|
"whitespace.pdf"
|
|
)
|
|
|
|
$fonts = @(
|
|
"latin_extended.pdf",
|
|
"rotated_text.pdf",
|
|
"rotated_text_90.pdf",
|
|
"text_font.pdf",
|
|
"utf-8.pdf",
|
|
"vertical_text.pdf",
|
|
"hebrew_mirrored.pdf"
|
|
)
|
|
|
|
$edgeCases = @(
|
|
"annots.pdf",
|
|
"bookmarks.pdf",
|
|
"combobox_form.pdf",
|
|
"embedded_attachments.pdf",
|
|
"empty_xref.pdf",
|
|
"encrypted.pdf",
|
|
"linearized.pdf",
|
|
"listbox_form.pdf",
|
|
"no_page_count.pdf",
|
|
"page_labels.pdf",
|
|
"text_form.pdf",
|
|
"unsupported_feature.pdf",
|
|
"zero_length_stream.pdf"
|
|
)
|
|
|
|
Write-Host "Ensuring corpus directory structure..."
|
|
$null = New-Item -ItemType Directory -Force -Path "$destDir\basic"
|
|
$null = New-Item -ItemType Directory -Force -Path "$destDir\fonts"
|
|
$null = New-Item -ItemType Directory -Force -Path "$destDir\edge-cases"
|
|
|
|
Write-Host "Copying basic files..."
|
|
foreach ($f in $basic) {
|
|
Copy-Item "$sourceDir\$f" "$destDir\basic\$f" -Force
|
|
}
|
|
|
|
Write-Host "Copying font files..."
|
|
foreach ($f in $fonts) {
|
|
Copy-Item "$sourceDir\$f" "$destDir\fonts\$f" -Force
|
|
}
|
|
|
|
Write-Host "Copying edge-case files..."
|
|
foreach ($f in $edgeCases) {
|
|
Copy-Item "$sourceDir\$f" "$destDir\edge-cases\$f" -Force
|
|
}
|
|
|
|
Write-Host "Test corpus (30 files) populated successfully under $destDir"
|