Hi,
Thank for your help, i can't use the most recent version, because need to
create work copy dynamically, but use the itextsharp 5.0.6 need me to put
the password, the itextsharp 4.0.3 is not need. So could you tell me which
method i can use to get the content by using the itextsharp 5.0.6, I don't
know the meaning of "XObject" in the mail content?
---------- 已转发邮件 ----------
发件人: 1T3XT BVBA <i...@1t3xt.info>
日期: 2011年5月25日 下午4:45
主题: Re: [iText-questions] Help Needed-Can't get the PDF page content and
resources ues the itextsharp 4.0.3 when the PDF type is distiller
收件人: chen jun <alexni...@gmail.com>
On 25/05/2011 10:38, chen jun wrote:
> I have used the itextsharp 5.0.6 and can get the PDF page content and
> reources, the pdf name is:1571es.pdf.
> Whether the itextsharp 4.0.3 can support to get the PDF page content
> when the pdf name is:1571es.pdf, I saw the iText in Action(First
> Editon) and can't find the mothod, thanks!
Hi,
I can't get the PDF page content and resources ues the itextsharp 4.0.3 when
the PDF type is distiller.
The pdf name is:1571es.pdf
Download address is:
http://www.fda.gov/downloads/AboutFDA/ReportsManualsForms/Forms/UCM083533.pdf
I have tracked the itextsharp source code found the contents Is Stream, the
code as below:"
if (contents.IsStream()) {
return GetStreamBytes((PRStream)contents, file);", I call this method only
return 78 bytes contents, not all of the page content and resources; but
another PDF the type is still distiller, the pdf name is:356HesCA2LOD8P.pdf,
download address is :
http://www.fda.gov/downloads/AboutFDA/ReportsManualsForms/Forms/UCM082348.pdf,
i found this PDF contents Is Array, the code as below:"
else if (contents.IsArray()) {
PdfArray array = (PdfArray)contents;
bout = new MemoryStream();
for (int k = 0; k < array.Size; ++k) {
PdfObject item = GetPdfObjectRelease(array[k]);
if (item == null || !item.IsStream())
continue;
byte[] b = GetStreamBytes((PRStream)item, file);
bout.Write(b, 0, b.Length);
if (k != array.Size - 1)
bout.WriteByte((byte)'\n');
}
return bout.ToArray();
}", I call this method can get all of the page content and resources.
So could you help me how to get the 1571es.pdf page content and resources,
i'm looking forward to your reply, thanks!
Op 20/05/2011 9:50, chen jun schreef:
> return GetStreamBytes((PRStream)contents, file);", I call this method
> only return 78 bytes contents, not all of the page content and resources;
This is what I found on page 1 after decrypting the file:
q
1 0 0 1 17 772.6000061 cm
/RelativeColorimetric ri
/GS0 gs
/Fm0 Do
Q
If you read and understand this syntax, you know that the actual content
can be found in the XObject with name /Fm0:
/CS0 CS 0.51 0.51 0.51 SCN
1 i 0.012 w 10 M 0 j 0 J []0 d
/RelativeColorimetric ri
/GS0 gs
15.84 -536.606 539.41 -60.998 re
S
/CS0 cs 0.714 0.714 0.714 scn
15.846 -597.599 539.398 60.986 re
f
0 G
0.72 w
15.845 -81.599 m
555.852 -81.599 l
S
0.36 w
15.845 -260.6 m
555.852 -260.6 l
15.845 -107.599 m
555.852 -107.599 l
15.845 -229.6 m
555.852 -229.6 l
367.85 -9.6 m
367.85 -190.601 l
15.845 -340.601 m
555.852 -340.601 l
S
0.72 w
15.845 -526.602 m
555.852 -526.602 l
S
0.36 w
15.845 -536.602 m
555.852 -536.602 l
367.848 -41.598 m
555.847 -41.598 l
15.845 -158.599 m
555.852 -158.599 l
15.845 -190.599 m
555.852 -190.599 l
S
0.25 w
427.848 -249.6 m
547.85 -249.6 l
S
0.36 w
507.849 -381.601 m
518.798 -381.601 l
S
1.25 w
15.84 -9.602 540 -726.005 re
S
0.36 w
456.85 -340.598 m
456.85 -389.45 l
493.849 -381.601 m
504.798 -381.601 l
521.849 -381.601 m
532.798 -381.601 l
15.845 -389.601 m
555.852 -389.601 l
15.84 -609.605 m
555.847 -609.605 l
S
0.72 w
15.84 -597.605 m
555.847 -597.605 l
S
0.36 w
403.848 -609.607 m
403.848 -735.456 l
194.846 -609.607 m
194.846 -735.47 l
403.843 -672.605 m
555.346 -672.605 l
349.848 -505.602 m
545.061 -505.602 l
S
0.25 w
390.848 -240.6 9 -9 re
243.847 -240.6 9 -9 re
276.847 -482.602 9 -9 re
375.848 -446.601 9 -9 re
375.848 -434.601 9 -9 re
303.847 -498.602 9 -9 re
169.846 -567.602 9 -9 re
21.845 -567.602 9 -9 re
21.845 -434.601 9 -9 re
347.848 -567.602 9 -9 re
21.845 -498.602 9 -9 re
74.846 -400.601 9 -9 re
180.846 -434.601 9 -9 re
387.848 -482.602 9 -9 re
340.848 -400.601 9 -9 re
180.846 -458.602 9 -9 re
180.846 -446.601 9 -9 re
21.845 -482.602 9 -9 re
21.845 -458.602 9 -9 re
21.845 -446.601 9 -9 re
292.847 -240.6 9 -9 re
341.848 -240.6 9 -9 re
S
0.36 w
479.849 -381.601 m
490.798 -381.601 l
S
0 g
BT
/T1_0 1 Tf
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 6 0 0 6 238 -743 Tm
(PREVIOUS EDITION IS OBSOLETE.)Tj
/T1_1 1 Tf
8 0 0 8 438 -744 Tm
(PAGE 1 OF 2)Tj
/T1_2 1 Tf
-8.375 90.5 Td
[(Form)-292(Approved:)]TJ
/T1_0 1 Tf
7.75 0 Td
[(OMB)-347(No.)-319(0910-0014.)]TJ
/T1_2 1 Tf
-7.75 -1.125 Td
[(Expiration)-304(Date:)]TJ
/TT0 1 Tf
( )Tj
/TT1 1 Tf
(May 31, 2009)Tj
/T1_2 1 Tf
0 -1.125 TD
[(See)-346(OMB)-222(Statement)-317(on)-263(Reverse.)]TJ
7 0 0 7 474 -257 Tm
(\(Specify\))Tj
/T1_0 1 Tf
0.571 -14.714 Td
(SERIAL NUMBER)Tj
/T1_1 1 Tf
8 0 0 8 374 -55 Tm
(NOTE:)Tj
/T1_0 1 Tf
4.125 0 Td
[(No)-597(drug)-749(may)-611(be)-763(shipped)-623(or)-611(clinical)]TJ
-4.125 -1.125 Td
[(investigation)-1067(begun)-970(until)-1041(an)-888(IND)-1028(for)-958(that)]TJ
T*
[(investigation)-317(is)-278(in)-347(effect)-304(\(21)-305(CFR)-195(312.40\).)]TJ
7 0 0 7 19 -116 Tm
[(3.)-880(ADDRESS)]TJ
/T1_2 1 Tf
6.857 0 Td
[(\(Number,)-261(Street,)-197(City,)-286(State)-236(and)-332(Zip)-325(Code\))]TJ
/T1_0 1 Tf
43.429 0 Td
[(4.)-880(TELEPHONE)-229(NUMBER)]TJ
/T1_2 1 Tf
1.714 -1.286 Td
[(\(Include)-300(Area)-174(Code\))]TJ
/T1_0 1 Tf
-52 -10.571 Td
[(7.)-880(INDICATION\(S\))]TJ
/T1_2 1 Tf
9 0 Td
[(\(Covered)-316(by)-230(this)-301(submission\))]TJ
/T1_0 1 Tf
-9 4.571 Td
[(5.)-880(NAME\(S\))-206(OF)-325(DRUG)]TJ
/T1_2 1 Tf
11.143 0 Td
[(\(Include)-157(all)-286(available)-340(names:)-292(Trade,)-253(Generic,)-221(Chemical,)-412(Code\))]TJ
/T1_1 1 Tf
9 0 0 9 81 -25 Tm
(DEPARTMENT OF HEALTH AND HUMAN SERVICES)Tj
/T1_0 1 Tf
8 0 0 8 123 -37 Tm
(FOOD AND DRUG ADMINISTRATION)Tj
/T1_1 1 Tf
12 0 0 12 44 -61 Tm
(INVESTIGATIONAL NEW DRUG APPLICATION \(IND\))Tj
/T1_3 1 Tf
9 0 0 9 55 -73 Tm
(\(TITLE 21, CODE OF FEDERAL REGULATIONS \(CFR\) PART 312\))Tj
/T1_4 1 Tf
0.0001 Tc -0.0001 Tw 5 0 0 5 476 -752 Tm
(PSC Media Arts \(301\) 443-1090)Tj
/T1_0 1 Tf
0 Tc 0 Tw 7 0 0 7 371 -167 Tm
[(6.)-880(IND)-278(NUMBER)]TJ
/T1_2 1 Tf
8.286 0 Td
[(\(If)-254(previously)-356(assigned\))]TJ
/T1_0 1 Tf
-58.571 11 Td
[(1.)-880(NAME)-254(OF)-325(SPONSOR)]TJ
50.286 0 Td
[(2.)-595(DATE)-190(OF)-325(SUBMISSION)]TJ
-50.286 -21.143 Td
[(8.)-880(PHASE\(S\))-277(OF)-182(CLINICAL)-356(INVESTIGATION)-276(TO)-325(BE)-237(CONDUCTED:)]TJ
0 -15.857 TD
(10.)Tj
/T1_3 1 Tf
9 0 0 9 34 -349 Tm
[(IND)-722(submission)-665(should)-611(be)-722(consecutively)-608(numbered.)-999(The)-666(initial)-721(IND)-611(should)-722(be)-722(numbered)]TJ
0 -1 TD
[("Serial)-691(number:)-556(0000.")-691(The)-666(next)-611(submission)-665(\(e.g.,)-666(amendment,)-666(report,)-611(or)-667(correspondence\))]TJ
T*
[(should)-1167(be)-1166(numbered)-1277("Serial)-1135(Number:)-1222(0001.")-1135(Subsequent)-1277(submissions)-1109(should)-1167(be)]TJ
T*
[(numbered)-277(consecutively)-164(in)-333(the)-278(order)-222(in)-333(which)-277(they)-277(are)-277(submitted.)]TJ
/T1_0 1 Tf
7 0 0 7 19 -269 Tm
[(9.)-880(LIST)-888(NUMBERS)-1000(OF)-1040(ALL)-935(INVESTIGATIONAL)-910(NEW)-1095(DRUG)-913(APPLICATIONS)-1006(\(21)-984(CFR)-945(Part)-880(312\),)-1007(NEW)-953(DRUG)-1056(OR)-929(ANTIBIOTIC)-959(APPLICATIONS)]TJ
/T1_2 1 Tf
1.714 -1.286 Td
[(\(21)-841(CFR)-802(Part)-880(314\))]TJ
/T1_0 1 Tf
9.857 0 Td
[(,)-865(DRUG)-770(MASTER)-833(FILES)]TJ
/T1_2 1 Tf
13.571 0 Td
[(\(21)-841(CFR)-802(Part)-880(314.420\))]TJ
/T1_0 1 Tf
11.714 0 Td
[(,)-865(AND)-889(PRODUCT)-913(LICENSE)-721(APPLICATIONS)-863(\(21)-841(CFR)-945(Part)-737(601\))-856(REFERRED)]TJ
-35.143 -1.286 Td
[(TO)-325(IN)-143(THIS)-293(APPLICATION.)]TJ
-1.714 -16 Td
[(11.)-1039(THIS)-293(SUBMISSION)-292(CONTAINS)-261(THE)-286(FOLLOWING:)]TJ
/T1_2 1 Tf
25.857 0 Td
[(\(Check)-261(all)-286(that)-332(apply\))]TJ
/T1_0 1 Tf
-16 -1.286 Td
[(INITIAL)-181(INVESTIGATIONAL)-339(NEW)-524(DRUG)-342(APPLICATION)-244(\(IND\))-9755(RESPONSE)-300(TO)-325(CLINICAL)-213(HOLD)]TJ
-9.857 -2.571 Td
[(PROTOCOL)-388(AMENDMENT\(S\):)-8659(INFORMATION)-286(AMENDMENT\(S\):)-11945(IND)-278(SAFETY)-253(REPORT\(S\):)]TJ
2.286 -2.286 Td
[(NEW)-238(PROTOCOL)-14816(CHEMISTRY/MICROBIOLOGY)-13712(INITIAL)-324(WRITTEN)-302(REPORT)]TJ
0 -1.714 TD
[(CHANGE)-293(IN)-286(PROTOCOL)-11531(PHARMACOLOGY/TOXICOLOGY)-12266(FOLLOW-UP)-341(TO)-182(A)-333(WRITTEN)-302(REPORT)]TJ
T*
[(NEW)-238(INVESTIGATOR)-12982(CLINICAL)]TJ
0 -3.429 TD
[(RESPONSE)-300(TO)-182(FDA)-286(REQUEST)-309(FOR)-317(INFORMATION)-12000(ANNUAL)-372(REPORT)-7404(GENERAL)-221(CORRESPONDENCE)]TJ
53.143 -18.286 Td
[(DIVISION)-324(ASSIGNMENT:)]TJ
/T1_1 1 Tf
8 0 0 8 247 -607 Tm
(FOR FDA USE ONLY)Tj
-28.5 7 Td
[(JUSTIFICATION)-319(STATEMENT)-264(MUST)-292(BE)-236(SUBMITTED)-292(WITH)-320(APPLICATION)-222(FOR)-264(ANY)-389(CHECKED)-181(BELOW.)-625(REFER)-236(TO)-236(THE)-250(CITED)-375(CFR)]TJ
0 -1 TD
[(SECTION)-305(FOR)-264(FURTHER)-348(INFORMATION.)]TJ
7.5 0 0 7.5 33 -575 Tm
[(TREATMENT)-234(IND)-278(21)-221(CFR)-345(312.35\(b\))-3798(TREATMENT)-234(PROTOCOL)-333(21)-221(CFR)-345(312.35\(a\))-2787(CHARGE)-200(REQUEST/NOTIFICATION)-310(21)-355(CFR312.7\(d\))]TJ
8 0 0 8 228 -535 Tm
(CHECK ONLY IF APPLICABLE)Tj
/T1_0 1 Tf
7 0 0 7 35 -506 Tm
[(REQUEST)-309(FOR)-175(REINSTATEMENT)-269(OF)-325(IND)-278(THAT)-246(IS)-341(WITHDRAWN,)-9818(OTHER)]TJ
0 -1.143 TD
[(INACTIVATED,)-253(TERMINATED)-214(OR)-357(DISCONTINUED)]TJ
23.286 -14.857 Td
[(DDR)-405(RECEIPT)-237(STAMP)]TJ
29.857 -9 Td
[(IND)-278(NUMBER)-381(ASSIGNED:)]TJ
/T1_2 1 Tf
3.857 24 Td
(\(Specify\))Tj
/T1_0 1 Tf
-4.429 37.857 Td
(OTHER)Tj
-21 0 Td
[(PHASE)-324(1)-2730(PHASE)-324(2)-2730(PHASE)-324(3)]TJ
/T1_4 1 Tf
6 0 0 6 549 -752 Tm
(EF)Tj
/T1_1 1 Tf
8 0 0 8 16 -744 Tm
(FORM FDA 1571 \()Tj
/TT2 1 Tf
(4)Tj
/T1_1 1 Tf
(/0)Tj
/TT2 1 Tf
(6)Tj
/T1_1 1 Tf
(\))Tj
/T1_0 1 Tf
7 0 0 7 19 -618 Tm
[(CDR/DBIND/DGD)-373(RECEIPT)-237(STAMP)]TJ
ET
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php