Hello,
There are a couple of things happening in Creator that don't seem to be right.
First of all, say I want to set the active page to the second page so that I can draw graphics on page 2. I use the following code in vb.net: PDF1.ObjectAttributeStr("text1", "Page", 2).
However, this doesn't seem to work, since when I have the line: PDF1.ObjectAttributeStr("text1", "Text", "hello")
The text gets printed on the first page, no matter what. I've found a workaround: I add a new page to the document right before the page which I want to edit and then delete it right after, and for some reason this sets the active page to the right one, but I wouldn't like to do this if I don't have to.
My second problem has to do with the drawing of text. I want to create a dashmark at the left hand side of the page, which is actually just two underscores side by side ("__"). However, for some reason the dashmarks on the page get cut off on some pages, so I only see a portion of the dashmark. Also, there are some pages that aren't affected by the problem, even though the code of writing to that page is identical.
Any help is greatly appreciated. Thanks.
Jeremy
Wierd things happening in Creator (Demo)
Hello,
Below is a code snippet which illustrates how to go to a specific page and change the text property of a particular object.
With oPDFCreator
'This usually done on a form_load
.SetLicenseKey(strLicenseTo, strActivationCode)
'Open file to rotate
.Open("c:\\temp\\sample.pdf", "")
‘Go to the page where you want to change the object property
.CurrentPage = 1
'Change report state
.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateDesign
With .GetObjectByName("text1")
.Attribute("Text") = "New text added"
End With
'Change report state
.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateRun
'save document
.Save("c:\temp\test_sample.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
End With
In reference to your other question, are you placing the text object in the same location? Can you post a code snippet?
Thanks
Below is a code snippet which illustrates how to go to a specific page and change the text property of a particular object.
With oPDFCreator
'This usually done on a form_load
.SetLicenseKey(strLicenseTo, strActivationCode)
'Open file to rotate
.Open("c:\\temp\\sample.pdf", "")
‘Go to the page where you want to change the object property
.CurrentPage = 1
'Change report state
.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateDesign
With .GetObjectByName("text1")
.Attribute("Text") = "New text added"
End With
'Change report state
.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateRun
'save document
.Save("c:\temp\test_sample.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
End With
In reference to your other question, are you placing the text object in the same location? Can you post a code snippet?
Thanks