Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - About the ContentStream
  FAQ FAQ  Forum Search   Register Register  Login Login

About the ContentStream

 Post Reply Post Reply
Author
Message Reverse Sort Order
nieguizhi View Drop Down
Beginner
Beginner


Joined: 12 Jan 16
Location: shanghai
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote nieguizhi Quote  Post ReplyReply Direct Link To This Post Topic: About the ContentStream
    Posted: 12 Jan 16 at 2:30AM
Hi professional:

I find that the below two pieces of code get the same results when I open the pdf file by the software of  AI. why?  I also get one layer, what is the function NewOptionalContentGroup means?
thank you.  look forward to your reply.

int OCG1 = DPL.NewOptionalContentGroup(L"group1");

DPL.SelectPage(1);
DPL.SetOrigin(1);

int cs1 = DPL.NewContentStream();
DPL.SelectContentStream(cs1);
DPL.DrawText(100,100,L"CS1");
DPL.SetContentStreamOptional(OCG1);
DPL.SetOptionalContentGroupVisible(OCG1, 1);

int OCG2 = DPL.NewOptionalContentGroup(L"group2");

int cs2 = DPL.NewContentStream();
DPL.SelectContentStream(cs2);
DPL.DrawText(100, 200, L"CS2");
DPL.SetContentStreamOptional(OCG2);
DPL.SetOptionalContentGroupVisible(OCG2, 1);

DPL.SaveToFile(L"newLayer.pdf");



////////////////////////////////////////////////////////////////////////////////
int OCG1 = DPL.NewOptionalContentGroup(L"group1");

DPL.SelectPage(1);
DPL.SetOrigin(1);

int cs1 = DPL.NewContentStream();
DPL.SelectContentStream(cs1);
DPL.DrawText(100,100,L"CS1");
DPL.SetContentStreamOptional(OCG1);
DPL.SetOptionalContentGroupVisible(OCG1, 1);


int cs2 = DPL.NewContentStream();
DPL.SelectContentStream(cs2);
DPL.DrawText(100, 200, L"CS2");
DPL.SetContentStreamOptional(OCG1);
DPL.SetOptionalContentGroupVisible(OCG1, 1);

DPL.SaveToFile(L"newLayer.pdf");



Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store