Bugs item #3042917, was opened at 2010-08-11 10:18
Message generated for change (Comment added) made by domseichter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=790130&aid=3042917&group_id=154028

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: herczeg3725 (herczeg3725)
Assigned to: Nobody/Anonymous (nobody)
Summary: PdfPage + PdfPainter: inserted texts rotated

Initial Comment:
Hello,

I try to edit a pdf document with the following code:
--------------------------------------------
size_t iPages = m_pDocument->GetPageCount();
PdfPainter painter;

PdfFont* pFont = m_pDocument->CreateFont( "Arial Unicode MS", new 
PdfIdentityEncoding(0, 0xffff, true));
pFont->SetFontSize(8.0);
painter.SetFont(pFont);
//pFont->SetFontSize(168.0);            //this size works for qtwebpage.pdf
//painter.SetColor( 1.0, 0.0, 0.0 );    //doesn't work

for(size_t iPage=0; iPage<iPages;iPage++)
{
        PdfPage* pPage  = m_pDocument->GetPage(iPage);
        PdfRect rect    = pPage->GetPageSize();
        //pPage->GetRotation() == 0
        painter.SetPage(pPage);
        QString s = "Page "+QString::number(iPage+1)+" von 
"+QString::number(iPages);
        painter.DrawText(11.0, 11.0, s.toLocal8Bit().data());
        painter.FinishPage();
}

m_pDocument->Write( filename.toLocal8Bit().data() );
--------------------------------------------

... and it works mostly, but not with the pdf-documents created by 
QPrinter(QPrinter::PdfFormat)!
See example:
in: http://home.arcor.de/cybergoth/share/qtwebpage.pdf
out:http://home.arcor.de/cybergoth/share/qtwebpage_out.pdf

What should I change in the code to be able to edit these pdf-files too?
Best Regards
George

----------------------------------------------------------------------

>Comment By: Dominik Seichter (domseichter)
Date: 2010-08-11 10:31

Message:
What does not work? Could you please be more specific.

I would suggest to take a look on the created PDF content stream with
PoDoFoBrowser. Maybe you need calls lile Save/Restore aroung your calls.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=790130&aid=3042917&group_id=154028

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to