Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Create an empty PDF 3 years 2 months ago #15411

  • simone.p
  • simone.p's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 16
  • Thank you received: 0
How do I create an empty PDF in A4 format?

Please Log in or Create an account to join the conversation.

Create an empty PDF 3 years 2 months ago #15414

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
Document doc = new Document();
doc.Create("/sdcard/test.pdf");
Page page = doc.NewPage(210 * 72 / 25.4f, 297 * 72 / 25.4f);
page.ObjsStart();

PageContent content = new PageContent()
//draw elements on content, and add resources to page object.
//...
page.AddContent(content);
page.Close();
doc.Save();
doc.Close();
for more helps, you can visit:
www.radaeetz.com/help/java/gnew.html
and
www.radaeetz.com/help/java/gopen.html
The following user(s) said Thank You: simone.p

Please Log in or Create an account to join the conversation.

Last edit: by radaee.
  • Page:
  • 1
Powered by Kunena Forum