Start by getting a copy of ISO 32000-1:2008 (the PDF Standard) and start 
reading.

Then, obtain various programs that can write PDF files with various contents in 
them.

Next, get a good PDF "object viewer" such as RUPS, PoDoFo, Enfocus Browser, etc.

Then start making PDFs using the apps that already know how and look at what 
they wrote in the viewers and compare to the spec.

Anything else is just "hit and miss".

Leonard

From: New Developer <[email protected]<mailto:[email protected]>>
Reply-To: Post here 
<[email protected]<mailto:[email protected]>>
Date: Sun, 2 Oct 2011 07:18:46 -0700
To: Post here 
<[email protected]<mailto:[email protected]>>
Subject: Re: [iText-questions] Seeing guidance on PDF images

I would like to learn and do my own,  that is why.
Because one word processor exists , we should never write another one ?

I am asking here because obviously there are people here who have more 
knowledge and expertise than what I have right now.
and I still would like to learn, more

thanks

On 10/01/2011 09:57 PM, Leonard Rosenthol wrote:
Why would you want to write a completely new PDF library when there are 
NUMEROUS ones out there – including the iText library whose mailing list you 
posted on…

Leonard

From: New Developer <[email protected]<mailto:[email protected]>>
Reply-To: Post here 
<[email protected]<mailto:[email protected]>>
Date: Sat, 1 Oct 2011 08:16:17 -0700
To: Post here 
<[email protected]<mailto:[email protected]>>
Subject: [iText-questions] Seeing guidance on PDF images

I'm trying to develop a mini PDF library and I'm stuck on getting images into 
the PDF

using  to read just a simple  (camera generated picture)  jpg  file
        Bitmap  bmp;
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        bmp.compress(CompressFormat.JPEG, 100 , bos);


How do I get this into the PDF format ?

currently this is what I have

                  "<<  /Type  /XObject  \n" +
                      "   /Subtype /Image \n" +
                        "   /Width  "  + bmp.getWidth()  + " \n" +
                      "   /Height  " + bmp.getHeight() + " \n" +
                      "   /ColorSpace  /DeviceRGB  \n" +
                      "   /BitsPerComponent  8  \n" +
                      "   /Length " + bos.size() + " \n" +
                      "   /Filter  /ASCIIHexDecode  \n" +
                      ">> \n" +
                      "stream \n" +
                      bos.toString() +  "\n" +
                      "endstream \n" +
                      "endobj \n\n";

1)  I think my  /Filter  is wrong  not sure what to use   ?
2)  The test image is  341 x 256  =>  87296   bos.size() returns  84156  and 
yet when I count the number of bytes between stream and endstream in the 
generated  .pdf file  I get  78814 ?  What causes these changes ?
3)  What is the  /Filter  equivalence  for   CompressFormat.JPEG     and  
CompressFormat.PNG  ?


Please any help to get from the bitmap to a displayed image in the PDF file 
would be greatly appreciated.

Thanks in Advance




------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2



_______________________________________________
iText-questions mailing list
[email protected]<mailto:[email protected]>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

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
iText-questions mailing list
[email protected]
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

Reply via email to