mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-01 01:40:51 +00:00
better testing of V4
git-svn-id: svn+q:///qpdf/trunk@826 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
a8715c495b
commit
70ae58c035
5
TODO
5
TODO
|
@ -43,11 +43,6 @@
|
|||
(http://delphi.about.com). .. use at your own risk and for whatever
|
||||
the purpose you want .. no support provided. Sample code provided."
|
||||
|
||||
* R = 4, V = 4 encryption.
|
||||
|
||||
- Update C API for R4 encryption
|
||||
|
||||
|
||||
|
||||
2.2
|
||||
===
|
||||
|
|
|
@ -1078,6 +1078,23 @@ $td->runtest("make sure there is no xref stream",
|
|||
{$td->REGEXP => "\\s*0\\s*", $td->EXIT_STATUS => 0},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
# Look at some actual V4 files
|
||||
$n_tests += 8;
|
||||
foreach my $d (['--force-V4', 'V4'],
|
||||
['--cleartext-metadata', 'V4-clearmeta'],
|
||||
['--use-aes=y', 'V4-aes'],
|
||||
['--cleartext-metadata --use-aes=y', 'V4-aes-clearmeta'])
|
||||
{
|
||||
my ($args, $out) = @$d;
|
||||
$td->runtest("encrypt $args",
|
||||
{$td->COMMAND => "qpdf --static-aes-iv --static-id" .
|
||||
" --encrypt '' '' 128 $args -- enc-base.pdf a.pdf"},
|
||||
{$td->STRING => "", $td->EXIT_STATUS => 0});
|
||||
$td->runtest("check output",
|
||||
{$td->FILE => "a.pdf"},
|
||||
{$td->FILE => "$out.pdf"});
|
||||
}
|
||||
|
||||
show_ntests();
|
||||
# ----------
|
||||
$td->notify("--- Content Preservation Tests ---");
|
||||
|
|
417
qpdf/qtest/qpdf/V4-aes-clearmeta.pdf
Normal file
417
qpdf/qtest/qpdf/V4-aes-clearmeta.pdf
Normal file
|
@ -0,0 +1,417 @@
|
|||
%PDF-1.6
|
||||
%¿÷¢þ
|
||||
1 0 obj
|
||||
<< /Metadata 3 0 R /Outlines 4 0 R /PageLabels << /Nums [ 0 << /P <0e1c2a38465462707e8c9aa8b6c4d2e00f262aedded08d15ff2f51f65bab002f> >> 2 << /S /r /St 1 >> 7 << /P <0e1c2a38465462707e8c9aa8b6c4d2e00f262aedded08d15ff2f51f65bab002f> >> 9 << /S /r /St 6 >> 11 << /P <0e1c2a38465462707e8c9aa8b6c4d2e00f262aedded08d15ff2f51f65bab002f> >> 12 << /S /D /St 2 >> 15 << /S /D /St 6 >> 19 << /P <0e1c2a38465462707e8c9aa8b6c4d2e00f262aedded08d15ff2f51f65bab002f> >> 20 << /S /D /St 12 >> 22 << /S /D /St 16059 >> 23 << /S /r /St 50 >> 29 << /S /r /St 54 >> ] >> /PageMode /UseOutlines /Pages 5 0 R /Type /Catalog >>
|
||||
endobj
|
||||
2 0 obj
|
||||
<< /CreationDate <0e1c2a38465462707e8c9aa8b6c4d2e00921a6a7b0c133fb2f989c3da27b2ac814b1c32543f37411fd736a4671a646b7> /ModDate <0e1c2a38465462707e8c9aa8b6c4d2e00921a6a7b0c133fb2f989c3da27b2ac814b1c32543f37411fd736a4671a646b7> >>
|
||||
endobj
|
||||
3 0 obj
|
||||
<< /Subtype /XML /Type /Metadata /Length 770 >>
|
||||
stream
|
||||
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d' bytes='770'?>
|
||||
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
|
||||
xmlns:iX='http://ns.adobe.com/iX/1.0/'>
|
||||
|
||||
<rdf:Description about=''
|
||||
xmlns='http://ns.adobe.com/pdf/1.3/'
|
||||
xmlns:pdf='http://ns.adobe.com/pdf/1.3/'>
|
||||
<pdf:ModDate>2003-10-10T18:04:32-03:00</pdf:ModDate>
|
||||
<pdf:CreationDate>2003-10-10T18:04:32-03:00</pdf:CreationDate>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description about=''
|
||||
xmlns='http://ns.adobe.com/xap/1.0/'
|
||||
xmlns:xap='http://ns.adobe.com/xap/1.0/'>
|
||||
<xap:ModifyDate>2003-10-10T18:04:32-03:00</xap:ModifyDate>
|
||||
<xap:CreateDate>2003-10-10T18:04:32-03:00</xap:CreateDate>
|
||||
<xap:MetadataDate>2003-10-10T18:04:32-03:00</xap:MetadataDate>
|
||||
</rdf:Description>
|
||||
|
||||
</rdf:RDF>
|
||||
<?xpacket end='r'?>endstream
|
||||
endobj
|
||||
4 0 obj
|
||||
<< /Count 6 /First 6 0 R /Last 7 0 R /Type /Outlines >>
|
||||
endobj
|
||||
5 0 obj
|
||||
<< /Count 30 /Kids [ 8 0 R 9 0 R 10 0 R 11 0 R 12 0 R 13 0 R 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R 31 0 R 32 0 R 33 0 R 34 0 R 35 0 R 36 0 R 37 0 R ] /Type /Pages >>
|
||||
endobj
|
||||
6 0 obj
|
||||
<< /Count 4 /Dest [ 13 0 R /XYZ null null null ] /First 38 0 R /Last 39 0 R /Next 7 0 R /Parent 4 0 R /Title <0e1c2a38465462707e8c9aa8b6c4d2e0b238a868ad6ebb3fd7d78dc22672a04960be7d3e8245bea76dbe68c23e5f03de54c759f400d5dcbfdac739c9d936cf84> /Type /Outline >>
|
||||
endobj
|
||||
7 0 obj
|
||||
<< /Dest [ 23 0 R /XYZ 66 756 3 ] /Parent 4 0 R /Prev 6 0 R /Title <0e1c2a38465462707e8c9aa8b6c4d2e0ca5f0294db4ad20336e77370836f9058f3c825cbf836d07b61ebbfaa698ec301> /Type /Outline >>
|
||||
endobj
|
||||
8 0 obj
|
||||
<< /Contents 40 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
9 0 obj
|
||||
<< /Contents 43 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
10 0 obj
|
||||
<< /Contents 44 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
11 0 obj
|
||||
<< /Contents 45 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
12 0 obj
|
||||
<< /Contents 46 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
13 0 obj
|
||||
<< /Contents 47 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
14 0 obj
|
||||
<< /Contents 48 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
15 0 obj
|
||||
<< /Contents 49 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
16 0 obj
|
||||
<< /Contents 50 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
17 0 obj
|
||||
<< /Contents 51 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
18 0 obj
|
||||
<< /Contents 52 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
19 0 obj
|
||||
<< /Contents 53 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
20 0 obj
|
||||
<< /Contents 54 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
21 0 obj
|
||||
<< /Contents 55 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
22 0 obj
|
||||
<< /Contents 56 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
23 0 obj
|
||||
<< /Contents 57 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
24 0 obj
|
||||
<< /Contents 58 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
25 0 obj
|
||||
<< /Contents 59 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
26 0 obj
|
||||
<< /Contents 60 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
27 0 obj
|
||||
<< /Contents 61 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
28 0 obj
|
||||
<< /Contents 62 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
29 0 obj
|
||||
<< /Contents 63 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
30 0 obj
|
||||
<< /Contents 64 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
31 0 obj
|
||||
<< /Contents 65 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
32 0 obj
|
||||
<< /Contents 66 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
33 0 obj
|
||||
<< /Contents 67 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
34 0 obj
|
||||
<< /Contents 68 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
35 0 obj
|
||||
<< /Contents 69 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
36 0 obj
|
||||
<< /Contents 70 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
37 0 obj
|
||||
<< /Contents 71 0 R /CropBox [ 0 0 612 792 ] /MediaBox [ 0 0 612 792 ] /Parent 5 0 R /Resources << /Font << /F1 41 0 R >> /ProcSet 42 0 R >> /Rotate 0 /Type /Page >>
|
||||
endobj
|
||||
38 0 obj
|
||||
<< /Count -3 /Dest [ 19 0 R /Fit ] /First 72 0 R /Last 73 0 R /Next 39 0 R /Parent 6 0 R /Title <0e1c2a38465462707e8c9aa8b6c4d2e09ca6cded56239338246ee0f67eaedc7a5934c16efed6ab448a94b6aea5813c37> /Type /Outline >>
|
||||
endobj
|
||||
39 0 obj
|
||||
<< /Count 2 /Dest [ 21 0 R /FitH 792 ] /First 74 0 R /Last 75 0 R /Parent 6 0 R /Prev 38 0 R /Title <0e1c2a38465462707e8c9aa8b6c4d2e0a67a0507bb5990eb05f0e2d4963d3fe76e56d39f83b79788f140d31295a240f0> /Type /Outline >>
|
||||
endobj
|
||||
40 0 obj
|
||||
<< /Filter /FlateDecode /Length 80 >>
|
||||
stream
|
||||
*8FTbp~Œš¨¶ÄÒàˆs¥^‰||Æ÷m„]I·&œ‰Ä}Õ¾[Z^Oªãýrš¥<C5A1>¼Ev;c¤^Ð+$*0‘<30>ÿ˜Éמ{ûU=ªQ<C2AA>endstream
|
||||
endobj
|
||||
41 0 obj
|
||||
<< /BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font >>
|
||||
endobj
|
||||
42 0 obj
|
||||
[ /PDF /Text ]
|
||||
endobj
|
||||
43 0 obj
|
||||
<< /Filter /FlateDecode /Length 80 >>
|
||||
stream
|
||||
*8FTbp~Œš¨¶ÄÒà²Ó<C2B2>ÂDžâo®Ôä‚°æàž%û÷Ï@TÕ¼þ¿¬ÑçAêû5dÜÏ‘t°÷}dIÛÃ>†ûëuÅ_Í®•´²±íendstream
|
||||
endobj
|
||||
44 0 obj
|
||||
<< /Filter /FlateDecode /Length 80 >>
|
||||
stream
|
||||
*8FTbp~Œš¨¶ÄÒà¿<C3A0>‘‰aŽÎÔ~ƒ’ Ë̼QO…º‘?ØЮ–=¹™(!‡¬Î Tm |