pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkuehler <andr...@lehmi.de>
Subject Re: PDFBox markup printing on silent
Date Sat, 26 Jan 2013 06:48:23 GMT
Hi,

Am 26.01.2013 01:11, schrieb John Cashion:
> Hey Guys, I Hope I am sending this through the proper channels, but it
> seems the forum for pdfbox is down, so i figured I would try the mailing
> list.
There is no other official forum than our mailing lists! So finally you
found us, the PDFBox community. [1]
Be sure to subscribe yourself to the mailing list [2] otherwise you won't get
any answers.

> I've got a form that I've created and I'm stuck on trying to print
> the form with markups. I looked at the flags, but I am unsure if I'm on the
> right track. I can save the document with markup's just fine, but I cannot
> silently print them. Is there an annotation setting that I'm missing? here
> is my current code. Also, is there a new forum where this project is
> active. I like using PDFBox but the information on it is... sparse. Thanks
> for your time.
Did you get what you want using the PDFReader coming with PDFBox? Maybe
the feature you are looking for isn't yet supported

>
>          PDDocument doc = null;
>
>         try{
>              doc = PDDocument.load("resources/orderForm.pdf");
>              PDDocumentCatalog docCatalog = doc.getDocumentCatalog();
>              PDAcroForm acroForm = docCatalog.getAcroForm();
>              PDField field = acroForm.getField("Qty1");
>              field.setValue("JohnTest");
>              field.setFieldFlags(4);
>              //PDAnnotation.FLAG_PRINTED;
>
>          } catch (IOException ie){
>              System.out.println(ie);
>          }
>          //doc.addPage(new PDPage());
>          try{
>
>              doc.save("Empty PDF.pdf");
>              //doc.silentPrint();
>              doc.print();
>              doc.close();
>          } catch (Exception io){
>              System.out.println(io);
>          }
>
>      }
>
>
>
> thanks!
>
> John
>


BR
Andreas Lehmkühler
[1] http://pdfbox.apache.org
[2] http://pdfbox.apache.org/mail-lists.html

Mime
View raw message