Hi Everyone, 

I am trying to annotate a PDF with text using Poppler, and I can get it to 
work, but the text is oriented up-down rather than left-right. Looking at the 
pdfinfo, I see that the sheet is rotated by 270. Short of rotating the source 
PDF to 0, adding the annotation, and then rotating back, is there a way to set 
the orientation of the text box? My code is below.

Thanks!
-Cory


  QString *annFileName = new QString (srcFileName);
  Poppler::Document* doc = Poppler::Document::load(*annFileName);
  Poppler::TextAnnotation *it = new 
Poppler::TextAnnotation(Poppler::TextAnnotation::InPlace);
  it->setInplaceText(QString("Bingo Bango Bongo"));
  it->setBoundary(QRectF(0.1,0.1,0.05,0.2));
  it->setTextFont( QFont( QString("Arial"), 25 ) );
  Poppler::Annotation::Style styleT;
  styleT.setColor(QColor(0, 255, 0));
  it->setStyle(styleT);
  pdfPage->addAnnotation(it);
  Poppler::PDFConverter *conv = doc->pdfConverter();
  conv->setOutputFileName(QString(destFileName));
  conv->setPDFOptions(conv->pdfOptions() | 
  Poppler::PDFConverter::WithChanges);
  conv->convert();
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to