Click here to Skip to main content
15,916,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionregarding pdf Pin
Tara1421-Aug-06 3:52
Tara1421-Aug-06 3:52 
AnswerRe: regarding pdf Pin
benjymous21-Aug-06 4:04
benjymous21-Aug-06 4:04 
GeneralRe: regarding pdf Pin
Tara1421-Aug-06 4:12
Tara1421-Aug-06 4:12 
GeneralRe: regarding pdf Pin
bob1697221-Aug-06 8:11
bob1697221-Aug-06 8:11 
GeneralRe: regarding pdf Pin
Tara1410-Sep-06 8:22
Tara1410-Sep-06 8:22 
GeneralRe: regarding pdf Pin
bob1697210-Sep-06 17:04
bob1697210-Sep-06 17:04 
GeneralRe: regarding pdf Pin
Tara1410-Sep-06 19:21
Tara1410-Sep-06 19:21 
GeneralRe: regarding pdf Pin
bob1697211-Sep-06 4:32
bob1697211-Sep-06 4:32 
Tara14 wrote:
I am a bit confused here. /F is the font type, right?


That is the resource name. A good example of this is on page 270 (292 of 1236) of the PDF Specification 1.6

Tara14 wrote:
Whatever font is being used must be described earlier in the font dictionary, right?


PDF is written to be read somewhat backward but I believe you will see many different ways of laying the file out. The rules are very confusing and complex in my opinion. My implementation ends up declaring the font descriptor objects toward the front but the resource names get associated with the font descriptors in my Pages object which happens to be toward the end of my file slightly before the Cross Reference and the Trailer. However, you can lay your file out in any way that does not violate the rules in the specification so it would be wrong for me to say yes or no to this question.

Tara14 wrote:
Is (Text) the entire text that is being written to pdf?


Yes (Except for the parenthesis of course). Don't forget to apply PDF escape sequences as described on page 30 (52 of 1236) of PDF Specification 1.6 to prevent string literal characters from conflicting with the PDF file.

Tara14 wrote:
Suppose the text is something from a doc file.

If yes, how does the pdf know which part of the text uses which font and which color?


It is up to you to tell PDF what to render and how to render it. If you don't know how to parse the doc file, you will be unable to tell PDF what to draw and where and with what color etc...

My documents are described in XML so I parse the information that describes the action of drawing each graphics primitive (lines, bezier curves, rectangles, and Text) and then I translate it to a GDI/GDI+ graphics primitive command if drawing to the screen or printing or to PDF postscript that corresponds to the equivalent PDF graphics primitive command if exporting to PDF. If you do not have the information necessary to parse the doc file, you will have to resort to a print driver strategy like some vendors but I'm afraid I have no experience there and would be of little help.

Tara14 wrote:
You mentiond that "Also, PDF will keep track of its graphics state. This means you only need to change the...."
I do not understand this. Please can you elaborate a little.


For example...
If you set the Stroke color to red, all subsequent graphics commands will use red for the stroke color until the graphics state goes out of scope (as described in the specification) or until the Stroke color is explicitly set/changed by you. If the Fill color is set to blue all subsequent graphics commands that use a fill color will use blue until the graphics state goes out of scope or until the fill color is explicitely set/changed by you. etc...

I hope that helps
GeneralRe: regarding pdf Pin
Tara1411-Sep-06 5:17
Tara1411-Sep-06 5:17 
GeneralRe: regarding pdf Pin
Tara1412-Sep-06 22:14
Tara1412-Sep-06 22:14 
GeneralRe: regarding pdf Pin
bob1697213-Sep-06 17:48
bob1697213-Sep-06 17:48 
QuestionSystem Sutdown and Start time Pin
Kiran Pinjala21-Aug-06 3:10
Kiran Pinjala21-Aug-06 3:10 
AnswerRe: System Sutdown and Start time Pin
David Crow21-Aug-06 3:41
David Crow21-Aug-06 3:41 
AnswerRe: System Sutdown and Start time Pin
G_S21-Aug-06 3:43
G_S21-Aug-06 3:43 
AnswerRe: System Sutdown and Start time Pin
ThatsAlok21-Aug-06 19:06
ThatsAlok21-Aug-06 19:06 
QuestionHow to create a table in the database using mfc Pin
vc++_fragrance21-Aug-06 2:29
vc++_fragrance21-Aug-06 2:29 
AnswerRe: How to create a table in the database using mfc Pin
Rage21-Aug-06 2:32
professionalRage21-Aug-06 2:32 
AnswerRe: How to create a table in the database using mfc Pin
_AnsHUMAN_ 21-Aug-06 2:46
_AnsHUMAN_ 21-Aug-06 2:46 
AnswerRe: How to create a table in the database using mfc Pin
Hamid_RT21-Aug-06 3:04
Hamid_RT21-Aug-06 3:04 
AnswerRe: How to create a table in the database using mfc Pin
David Crow21-Aug-06 3:37
David Crow21-Aug-06 3:37 
AnswerRe: How to create a table in the database using mfc Pin
vc++_fragrance21-Aug-06 22:53
vc++_fragrance21-Aug-06 22:53 
Question2d array problem in standard C Pin
bouli21-Aug-06 2:25
bouli21-Aug-06 2:25 
AnswerRe: 2d array problem in standard C Pin
toxcct21-Aug-06 2:37
toxcct21-Aug-06 2:37 
GeneralRe: 2d array problem in standard C Pin
bouli21-Aug-06 2:43
bouli21-Aug-06 2:43 
AnswerRe: 2d array problem in standard C Pin
prasad_som21-Aug-06 2:37
prasad_som21-Aug-06 2:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.