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!
About the ContentStream |
Post Reply |
Author | |
nieguizhi
Beginner Joined: 12 Jan 16 Location: shanghai Status: Offline Points: 12 |
Post Options
Thanks(0)
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"); |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store