Wednesday, March 7, 2012

Creating PDF file

Hai

I tried to create pdf file using c#..I find out the way n get the pdf commands like this to display simple text

%PDF-1.1

1 0 obj

<< /Length 2 0 R >>

stream

0 G

1 i 0 J 0 j 1 w 10 M []0 d

0 0 m

0 90 l

S

0 g

90 72.08 72.08 90 50 90 c

27.92 90 10 72.08 10 50 c

10 27.92 27.92 10 50 10 c

72.08 10 90 27.92 90 50 c

BT

/F0 10 Tf

30 798 Td

10 TL

(Sample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample )Tj

(pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf fileSample pdf file)'

ET

endstream

endobj

2 0 obj

480

endobj

3 0 obj

<</Type/Page/Parent 4 0 R/Contents 1 0 R>>

endobj

4 0 obj

<</Type /Pages /Count 1

/Kids[

3 0 R

]

/Resources<</ProcSet[/PDF/Text]/Font<</F0 5 0 R>> >>

/MediaBox [ 0 0 594 828 ]

>>

endobj

5 0 obj

<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding/WinAnsiEncoding>>

endobj

6 0 obj

<</Type/Catalog/Pages 4 0 R>>

endobj

xref

0 7

0000000000 65535 f

0000000009 00000 n

0000000541 00000 n

0000000560 00000 n

0000000618 00000 n

0000000754 00000 n

0000000840 00000 n

trailer

<<

/Size 7

/Root 6 0 R

>>

startxref

885

%%EOF

This command is used to display the two line text in one page of pdf..

i need to draw table n show text in tables.how to draw table with format..i cant find pdf commands in net..please provide me ur suggestions...

Regards

Senthil

There should be better forums around to ask about writing PDF code directly.

I have worked on projects where we had to write output as PDF. We used a third party library.

There are some books available on the language.

HTH
-- Leah

No comments:

Post a Comment