Hi,

The use cases aren't really the same, the cause is. In that scenario we 
had to update a form field with an image, but when we did that with 
OpenOffice generated PDFs a gray rectangle (part of the form field's 
appearance) remained on the page. Looking through the syntax of the PDF, 
we noticed that OpenOffice put the gray rectangle in the content stream 
of the page and not in the appearance of the form field. I assume 
LibreOffice does the same thing.

The solution/workaround we used was to request the form field 
coordinates, remove the form field and overlay the gray rectangle with a 
white one (the background of the page was white) and then add the image 
at the correct coordinates. This is a workaround because the rectangle 
is still there, it's just hidden.

You can remove the rectangle from the content stream, but that's not an 
easy thing to do. I'd advise against using [Open/Libre]Office if 
possible. You could try the workaround.


Kind regards,
Michaël.


Op 21/10/2013 15:35, Dennis Lindeman schreef:
> Michaël
>
> Assuming this is the same problem, can you tell me what the problem was
> and how you solved it?
>
>
> On Fri, Oct 18, 2013 at 8:10 AM, Michael Demey
> <michael.de...@itextpdf.com <mailto:michael.de...@itextpdf.com>> wrote:
>
>     Hi,
>
>
>     Could you provide us with the PDF generated by LibreOffice? We recently
>     encountered an issue that is similar to yours but with OpenOffice PDFs
>     instead of LibreOffice PDFs. I suspect this is the same issue, but I
>     want to make sure.
>
>
>     Kind regards,
>     Michaël.
>
>
>     Op 16/10/2013 15:47, Dennis Lindeman schreef:
>      > I am creating pdf documents with BIRT and LibreOffice. The pdfs
>     created
>      > with BIRT allow me to add a watermark underlay that looks great. The
>      > pdfs created with LibreOffice and form filled by itext do not. The
>      > watermark is hidden in the areas where the form fields are even
>     though I
>      > flattened them.
>      >
>      > Here is the Goovy code that adds the watermark.
>      >
>      >          // Flatten all flagged fields
>      >          stamper.setFormFlattening(true)
>      >          if(params.watermark){
>      >              // Add Watermark
>      >              def watermarkFile = 'Not Valid Portrait'        //
>     default
>      >              if(params.watermarkFile){
>      >                  watermarkFile = params.watermarkFile
>      >              }
>      >              def watermarkReader =
>      > getPdfReader(docFileService.getTemplateFile(watermarkFile + '.pdf'))
>      >              PdfImportedPage page =
>      > stamper.getImportedPage(watermarkReader, 1)
>      >              int n = reader.getNumberOfPages()
>      >              PdfContentByte background
>      >              for (int i = 1; i <= n; i++){
>      >                  if(params.watermark.equals('under')){
>      >                      background = stamper.getUnderContent(i)
>      >                  } else {
>      >                      background = stamper.getOverContent(i)
>      >                  }
>      >                  background.addTemplate(page, 0, 0)
>      >              }
>      >          }
>      >          stamper.close()
>      >
>      > Any suggestions on how to make the form fields transparent will be
>      > appreciated.
>      >
>      > Thanks
>      > --
>      > Dennis Lindeman
>      > 4804 Dover Dr
>      > Ames  IA  50014
>      >
>      > 515 231 0303 <tel:515%20231%200303> (c)
>      > 515 292 9394 <tel:515%20292%209394> (h)
>      >
>      >
>      >
>     
> ------------------------------------------------------------------------------
>      > October Webinars: Code for Performance
>      > Free Intel webinars can help you accelerate application performance.
>      > Explore tips for MPI, OpenMP, advanced profiling, and more. Get
>     the most from
>      > the latest Intel processors and coprocessors. See abstracts and
>     register >
>      >
>     
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
>      >
>      >
>      >
>      > _______________________________________________
>      > iText-questions mailing list
>      > iText-questions@lists.sourceforge.net
>     <mailto: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
>      >
>
>
>     
> ------------------------------------------------------------------------------
>     October Webinars: Code for Performance
>     Free Intel webinars can help you accelerate application performance.
>     Explore tips for MPI, OpenMP, advanced profiling, and more. Get the
>     most from
>     the latest Intel processors and coprocessors. See abstracts and
>     register >
>     
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
>     _______________________________________________
>     iText-questions mailing list
>     iText-questions@lists.sourceforge.net
>     <mailto: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
>
>
>
>
> --
> Dennis Lindeman
> 4804 Dover Dr
> Ames  IA  50014
>
> 515 231 0303 (c)
> 515 292 9394 (h)
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> 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
>


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
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

Reply via email to