Home>
In Visual Studio 2015 (C #), download a single PDF file.
I would like to make a pdf file divided by bookmarks. (use itextsharp)
A form (text box/radio button) exists in the PDF.
Open PDF after split output
⇒Select the text box and select the radio button and save
⇒ The radio button disappears when the PDF is opened again.
(The text box remains normal with the entered value.)
The radio button disappears from the PDF once saved.
I tried many things in programming, but I couldn't solve it, so I posted it here.
// Open the reference PDF file
rd = new PdfReader (txtInput.Text);
Document oDocument = new Document (rd.GetPageSizeWithRotation (1));
PdfCopy oPdfcopy = new PdfCopy (oDocument, new FileStream (txtOutput.Text + "\\ test.pdf", FileMode.Create));
//oPdfcopy.SetMergeFields ();
oDocument.Open ();
for (int p = iSectionStart [6];p<= iSectionEnd [6];p ++)
{
PdfImportedPage oPdfImportedPage = oPdfcopy.GetImportedPage (rd, p);
oPdfcopy.AddPage (oPdfImportedPage);
}
// PRAcroForm opracroform = rd.AcroForm;
// if (opracroform! = null)
// {
// oPdfcopy.CopyDocumentFields (rd.);
//}
oPdfcopy.Close ();
oDocument.Close ();
rd.Close ();
Change the output page and save destination, etc.
Supplemental information (FW/tool version etc.)Windows10
Visual Studio2015 (C #)
itextsharp (version: 5.5.13.1)
-
Answer # 1
Related articles
- c # aspnet radio button, dropdown list
- c # - get radio button value, set initial value
- c # - saving an excel file with closedxml corrupts the file
- javascript - i want to change the value of the radio button under certain conditions
- add update process in c # save button
- c # - if you create a button that transitions to the scene, make it prefab, and inherit it in each scene, 2 out of 4 will not wo
- c # - turn off the ui button
- c # - i want to play the animation by pressing the [unity] button
- c # - how to use the button itself generated by instantiate as an argument
- c # - [unity] i want to push the button attached to the dynamically generated prefab to destroy another dynamically generated pr
- c # - i want to enable/disable the "x" button at the top right of the xaml window
- python 3x - radio button settings: module'tkinter' has no attribute'intvar'
- python - tkinter radio button question
- javascript - i want to describe additional html by the radio button pressed in html
- aspnet - how to validate radio button and dropdown list on client side
- css - django radio button does not work
- c # - wait for input until unity button is pressed
- c # - location of button does not match location at runtime
- java - i want to create a radio button branch with the equals method
- how to get option button value in excel file with c #
Related questions
- c # - mstest library file name is too long and build error
- c # - the button of the external process cannot be clicked by the handle operation
- c # - what kind of method is there to clarify the cause of the exe file, which is neither good nor bad?
- c # - get variable values from aspnet code-behind
- i want to open by specifying the pdf page with process in visual studio 2019 c # form
- c # excel printing
- i want to dynamically set the where condition of linq in c # visual studio2019 ??
- c # - i want to fill the dto of the session from the controller with the mvc model and pass it to the view side
- c # - class name (non-instance) how to make property information available as an argument in property name
- cuda - i want to build darknet in visual studio
Instead of using PdfCopy, use PdfCopyFields,
At the time of output, read the original pdf
It was solved by specifying pages (SelectPages).
Enter the code below.