ITEXT protect the content from pdf

Hi
All
I run this jsp it show me a pdf, but i got a problem i can edit that pdf and change the content, Is there one way to protect it ?
How ?
Thanks
<%@
page import="java.io.*,
                com.lowagie.text.*,
                com.lowagie.text.pdf.*,
              java.awt.Color,
               java.net.MalformedURLException,
             java.net.URL,
                com.lowagie.text.*,
                com.lowagie.text.pdf.*,
                java.io.FileOutputStream,
                com.lowagie.text.pdf.PdfWriter,
                com.lowagie.text.rtf.RtfWriter2,
                com.lowagie.text.pdf.codec.TiffImage,
                com.lowagie.text.pdf.codec.GifImage,
                com.lowagie.text.Image"
%><%               
%><%
          // Template JSP file for iText
          // by Tal Liron
          response.setContentType( "application/pdf" );
          // step 1: creation of a document-object
          Document document = new Document();
        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        PdfWriter writer = PdfWriter.getInstance( document, buffer );
         document.open();
         //Configurar saida como array buffer
         //Configurar criptografia do conteudo em 128 bits
        PdfContentByte cb = writer.getDirectContent();
        PdfContentByte cb2 = writer.getDirectContent();
       //Tipo de Fonte
        BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA_BOLD, BaseFont.CP1252, BaseFont.NOT_EMBEDDED );
        cb.stroke();
        cb.setColorFill(Color.blue);
            cb.stroke();
            cb.beginText();
            cb.setFontAndSize(bf, 12);
            cb.setColorFill(Color.darkGray);                       
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 591, 0);
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 577, 0);           
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 240, 562, 0);           
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 548, 0);  
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 532, 0);
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 517, 0);
            cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 208, 502, 0);
            cb.endText();
          document.close();
          DataOutput output = new DataOutputStream( response.getOutputStream() );
          byte[] bytes = buffer.toByteArray();
          response.setContentLength(bytes.length);
          for( int i = 0; i < bytes.length; i++ ) { output.writeByte( bytes[i] ); }
%>Edited by: silvaneto on Jun 26, 2009 8:03 AM

Here's the Bullet.fx file
import java.lang.Math;
import javafx.scene.CustomNode;
import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
public class Bullet extends CustomNode {
    def GRAVITY : Number = 0.0002;
    def WALL_HARDNESS = .90;
    public var x : Number;
    public var y : Number;
    public var radius : Number = 5;
    public var color : Color = Color.RED;
    public var velocity_x : Number;
    public var velocity_y : Number;
    var offScreen: Boolean = false;
    public function collide( invader : Invader ): Boolean {
        var dx : Number = invader.x - x;
        var dy : Number = invader.y - y;
        var distance : Number = Math.sqrt( dx * dx + dy * dy );
        var minDist : Number = invader.radius + radius;
        return ( distance < minDist )
    public function move( delta_time: Number, width : Number, height : Number ): Boolean {
        velocity_y += GRAVITY * delta_time;
        y += velocity_y * delta_time;
        x += velocity_x * delta_time;
        if( x + radius > width ) {
            offScreen = true;
        } else
        if( x - radius < 0 ) {
            offScreen = true;
        if( y + radius > height ) {
            offScreen = true;
        } else
        if( y - radius < 0 ) {
            offScreen = true;
        return offScreen;
    public override function create(): Node {
        return Circle {
            centerX: bind x,
            centerY: bind y,
            radius: bind radius
            fill: bind color
}

Similar Messages

  • Copy Paste content from PDF shows a missing character

    Our website, a4academics provides a platform for sharing academic projects and seminar reports in PDF for Students. We are getting a complaint from students, that when they copy and paste the content from PDF, the word " F " is not getting copied in some reports. What might be the reason ? Is it because of the issue with the software which created the PDF report. Its happening in few PDF files only.

    Currently to download the PDF FB like is needed. That why i asked your mail id. If you dont want to give FB like, please send the mail id.
    PDF is attached at the bottom of the link  given below
    http://a4academics.com/final-year-be-project/12-be-ece-electronics-and-communication-proje ct/503-home-based-wireless-health-monitoring-system
    I had copy pasted a part of the report to notepad++. Its appears as shown below. F is missing in defining
    "de ning the "Einthoven triangle" - an equilateral triangle with the heart at the centre."

  • Reading content from PDF to XI

    Hi All,
    Can I know about, is XI capable of reading the content from PDF. As I came to know that we can achieve this with the adapter module can you please ignite me how to do for this or is there any other option other than this way or show me if already any threads or articles are existed?

    Hi,
    Please find some links on Convertion agent which not only convert the PDF documents. it is used to convert PDF, Word Document, HL7 and more...
    pdf files *
    SAP Network Blog: XI: Read data from PDF file in Sender Adapter
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    SAP Network Blog: XI: Generate PDF file out of file adapter
    /people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/43/6d95e0ac846fcbe10000000a1553f6/CMGetStart.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm
    Regards,
    Phani

  • Get the content from the PDF file IN WD ABAP View

    Hi all,
    I have a offline interactive form with data filled in that and save in my desktop. I want to upload the PDF content ( data ) into Web dynpro view.
    Currently i have the view designed with all the input box bound with the respective fields in the context and these fields are same as Adobe form fields.
    I have a UI element to browse and pick the file from the desktop. I have the upload button to upload the data into it.
    When i click the upload button it goes for dump. " No Enough Information for processing or Output"
    *Get the content from the file
      WD_CONTEXT->GET_ATTRIBUTE( EXPORTING NAME = 'PDFSOURCE'  IMPORTING VALUE = CONTENT ).
    In the above statement CONTENT is initial.  Hence dump. I have take this source from SDN Blog.
    Kindly help me where i went wrong.
    Thanks in advance.I

    Hi,
    try my solution (reading dunamic table, but you can read any data from pdf xml) described here:
    Dynamic Table data cannot be Read.
    Regards Jiri

  • Method to pass the content of pdf through offline(without internet connection)

    Hi All,
    Is there any method available to pass the content of the pdf field from client machine having no internet connection?
    Barcode is the one way to pass the content of pdf field but my data is large and barcode capacity is not more than 1800 characters.
    Please suggest me the way i can send the data to server environment.
    I would like to know the if any data compression technique is available with which i can reduce the data size.
    Thanks in advance
    Regards
    Abhishek

    Hi Steve,
    Thanks for your quick reply.
    offline means no internet connection
    I have following 2 problems while form designing
    1. I want to update the databarcode by the clicking on the button but everytime i need to write a code in calculate event of the script of paper barcode as "this.rawValue = "Abhishek"".i dont want to have any script for any events in barcode. i want to update the barcode through click event of button as form.page.paperformBarcode.rawValue="Abhishek". Barcode is not getting updated when i am clicking on the button. I have attached sample PDF for better understanding.
    2. I want to store xml file in the barcode and retrive the same in server environment. I dont know how to do it?
    I am not getting an option to attach the files to post. will you please help?
    Please forward me a test mail to provide you the sample pdf.
    Regards
    Abhishek
    Email-id --- [email protected]

  • How do you protect the content in a chm?

    Hello,
    I know some users have thought of some creative techniques for preventing content from being copied from a chm, spefically Pete Lee's JavaScript methods. However, I was wondering if anyone knew how to append a copyright statement when the content is copied over?
    For example, let's say a user copies the content from the chm. When they paste the content, it adds a copyright statement to it at the bottom. Is this possible?
    Thanks in advance.

    Hi there
    I think a while back I saw Pete Lees post a script that would handle appending a Copyright.
    Keep in mind, however, that this only takes you so far. After the paste occurs, there is nothing preventing the user from simply stripping away the added information. So if you are intent on thwarting copying of material, this may not be sufficient.
    I happened across some software the other day that I'm still in the process of evaluating. This software purports to protect CHM files. Maybe you want to investigate it as well?
    Click here to visit the site
    Hopefully this helps... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Does Acrobat Pro read the content in pdf file and transforms it?

    Does Acrobat Pro read the content in pdf file and transforms it to xls file without the need for much changes or manual work?

    Acrobat X (Standard and Pro) will save tabular data to XLS or XLSX format, provided it can recognize the table as being a table. If the PDF has missing or incorrect structure tags, Acrobat will try to guess the table layout by the position of text and lines on the page - this works well for basic formatting but if the table has complex styling, spanned cells etc. it can lead to problems.
    Acrobat X will even attempt to export a table within a scanned document, by applying OCR during the export stage - though again this relies on the table being visually identified.
    See http://www.adobe.com/products/acrobatpro/pdf-to-word-excel-converter.html and this article on how to extract one table from a larger document.

  • How do you transfer the content from an iPhone to a PC? I have to use a PC for a while and don't know how to put my stuff on to there from my phone

    How do you transfer the content from an iPhone to a PC? I have to use a PC for a while and don't know how to put my stuff on to there from my phone

    If you're talking about music and movies an i-device was not designed for unique storage of media. It is not a backup device and media transfer was planned with you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing music and movies is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchases which can be transferred from a device to a computer.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only purchases from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software.  See this document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991

  • How to read the content from a External Content Type with out creating External List in Sharepoint 2013?

    Hi,
    I have a requirement to read the External Content Type and storing the Data in a Session Variable. The Reading of the content from External Content Type with out creating a External List.
    Please help I am trying to find the solution, but unable to do that.
    Thanks,
    Pradeep

    Hi,
    Firstly an external content type designed to work with SharePoint list and there is no way to read apart from this.
    If you are looking the solution out of the " Business Connectivity" then find that data source has been exposed through WCF and  Web Service ?
    So you can use REST API and CSOM to consume those data in SharePoint.
    You can also leverage the ADO.NET option if the datasources based on MS technologies.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • How to display the content from a file  stored in database

    when i am trying to display the content from a file which stored in database on oracle report 10g
    data are displaying as following. please help me to display the data in readable format
    <HTML LANG="en-US" DIR="LTR">
    <!-- Generated: 1/11/2006, postxslt.pl [1012] v1
    Source: amsug304286.xml
    File: amsug304286.htm
    Context: nil
    Tiers: ALWAYS
    Pretrans: YES
    Label: Release 12 -->
    <HEAD>
    <!-- $Header: amsug304286.htm 120.4 2006/11/01 20:57:29 appldev noship $ -->
    <!--BOLOC ug1_OMPO1010302_TTL--><TITLE>Product Overview (ORACLE MARKETING)</TITLE><!--EOLOC ug1_OMPO1010302_TTL-->
    <LINK REL="stylesheet" HREF="../fnd/iHelp.css">
    </HEAD>
    <BODY BGCOLOR="#F8F8F8">
    <A NAME="T304286"></A><A NAME="ProdOve"></A>
    <CENTER><H2><!--BOLOC ug1_OMPO1010302--><B>Product Overview</B><!--EOLOC ug1_OMPO1010302--></H2></CENTER>
    <p><!--BOLOC ug1_OMPO1010304-->Oracle Marketing drives profit, not just responses, by intelligently marketing to the total customer/prospect base. By leveraging a single repository of customer information, you can better target and personalize your campaigns, and refine them in real time with powerful analytical tools.<!--EOLOC ug1_OMPO1010304--></p>
    <p><!--BOLOC ug1_OMPO1006611-->With tools necessary to automate the planning, budgeting, execution, and tracking of your marketing initiatives, Oracle Marketing provides you with:<!--EOLOC ug1_OMPO1006611--></p>
    <ul>
    <li>
    <p><!--BOLOC ug1_OMPO1006612--><B>Customer Insight</B> - With sophisticated customer management and list generation, Oracle Marketing enables you to quickly generate target lists and segments using an intuitive user interface. The easy to use Natural Query Language Builder (NLQB) lets you query for customers or prospects using a natural language while hiding data complexity; fatigue management ensures that you do not over-contact the same customers with marketing messages; and predictive analytics helps you predict customer behavior that you can leverage to produce significant increases in marketing return on investments (ROI).<!--EOLOC ug1_OMPO1006612--></p>
    </li>
    <li>
    ls.<!--EOLOC ug1_OMPO1010304--></p>
    <p><!--BOLOC ug1_OMPO1006611-->With tools necessary to automate the planning, budgeting, execution, and tracking of your marketing initiatives, Oracle Marketing provides you with:<!--EOLOC ug1_OMPO1006611--></p>
    <ul>
    <li>
    <p><!--BOLOC ug1_OMPO1006612--><B>Customer Insight</B> - With sophisticated customer management and list generation, Oracle Marketing enables you to quickly generate target lists and segments using an intuitive user interface. The easy to use Natural Query Language Builder (NLQB) lets you query for customers or prospects using a natural language while hiding data complexity; fatigue management ensures that you do not over-contact the same customers with marketing messages; and predictive analytics helps you predict customer behavior that you can leverage to produce significant increases in marketing return on investments (ROI).<!--EOLOC ug1_OMPO1006612--></p>
    </li>
    <li>
    <p><!--BOLOC ug1_OMPO1006613--><B>Sales Alignment</B> - Oracle Marketing's leads management helps you compile and distribute viable leads so that sales professionals can follow up valuable opportunities and not just contact interactions. Additionally, support for distributing proposals and marketing material drive speedy and consistent setups and collaboration of best practices.<!--EOLOC ug1_OMPO1006613--></p>
    </li>
    <li>
    <p><!--BOLOC ug1_OMPO1006614--><B>Marketing Insight</B> - While Oracle Marketing Home page reports and Daily Business Intelligence (DBI) for Marketing and Sales provide aggregated management level information in almost real time, operational metrics help in tracking the effectiveness of individual marketing activities.<!--EOLOC ug1_OMPO1006614--></p>
    </li></ul>
    </BODY>
    </HTML>
    <!-- Q6z5Ntkiuhw&JhsLdhtX.cg&Zp4q0b3A9f.&RQwJ4twK3pA (signum appsdocopis 1162406236 2673 Wed Nov 1 10:37:16 2006) -->

    Hi,
    you can try to use the:
    <b>ConsumerTreeListPreview</b>
    layout for KM navigation ivew (or customize to your own).
    This layout shows a folder tree on the left, a document list on the right. When you click on a document from the list it shows the contents of the file on the bottom of the iview.
    Hope this helps,
    Romano

  • I paid for the convertion from pdf to word and its not letting me???

    I paid for the convertion from PDF to word i received a confirmation number, but it is not converting, Why?????????

    Hi Rosa,
    I'd like to assist! Are you receiving a particular error message? I see you have verified your subscription...
    There is also this handy 'getting started' guide that may help.
    Looking forward to hearing back from you!
    Regards, Stacy

  • My old computer died just after I transferred iTunes via external HD.  When I transferred the content from the HD to the new computer, most songs won't play.  Message is "Can't identify source".  Sharing was on in the old computer when it died.

    My old computer died just after I transferred iTunes via external HD.  When I transferred the content from the HD to the new computer, most songs won't play.  Message is "Can't identify source".  Sharing was on in the old computer when it died.

    Is there no ANSWER TO THIS PROBLEM?

  • Changing the setting from PDF file to a  JPEG file.

    Is there a way I can change the scan setting on my printer. It is a HP Deskjet F4480. I want to change the setting from PDF file to a JPEG file. I want to scan them so I can see them on my screen saver.

    This has nothing to do with Acrobat. See the documentation for the scanner software that came with your scanner.

  • How can I add the content from a iPod Nano to a new iTunes account

    how can I add the content from a iPod Nano to a new iTunes account

    On the computer in iTunes log into her Apple ID and then see if recent purchases are shown by clicking on her name in iTunes, entering her password and then selecting the option. If there is nothing there then she bought that music with a different Apple ID.
    You can use TouchCopy to move all the songs on the iPod to the computer. Then try to play one of the purchase songs and it should show the account used to purchase it and ask for the password.

  • How to Retrive the content from Archive folder ???

    Hi,
    1. I was working on the archiving of the documents and was able to archive the docs into a local archive folder.
    Then I had to test a scenario where when the user wants to search for a document with a specific ContentId, if the ContentId was not present in the content repository, then the content manager has to search for the same in the archived documents. Is this achievable?
    While testing the above, the UCM server had stopped indexing and started giving a Interrupted exception for indexing. While we do a normal checkin also the documents are in DONE status and are not getting published. Tried restarting the indexer also but in vain. How can we restart the indexing so as to publish the docs?
    2. indexing not working even for normal checkin the content.its showing error "indexing aborted" ? content never gets released after checkedin the content ? its struch in done status ?
    while importing the content to ucm serverl, i have deleted "testarchive " (which was exported from contentserver) from Archive folder in UCM install directory.. then many contents were in done status at contentmanagement-> workin progress. Errors showing in content server ...
    Indexing aborted. Error: Directory 'C:/UCM/archives/testacrchive' does not exist. Directory 'C:/UCM/archives/testacrchive' does not exist. [ Details ]
    An error has occurred. The stack trace below shows more information.
    !csIndexerAbortedMsg!syGeneralError!syFileUtilsDirNotFound,C:/UCM/archives/testacrchive!syFileUtilsDirNotFound,C:/UCM/archives/testacrchive
    intradoc.common.ServiceException: !syGeneralError
         at intradoc.common.FileUtils.testFileSystem(FileUtils.java:452)
         at intradoc.server.archive.ArchiveUtils.readFileEx(ArchiveUtils.java:215)
         at intradoc.server.archive.ArchiveUtils.readFile(ArchiveUtils.java:193)
         at intradoc.server.archive.ArchiveUtils.readArchiveFile(ArchiveUtils.java:158)
         at intradoc.server.IndexerReplication.readArchiveProperties(IndexerReplication.java:279)
         at intradoc.server.IndexerReplication.doReplication(IndexerReplication.java:156)
         at intradoc.server.IndexerReplication.doWork(IndexerReplication.java:92)
         at intradoc.indexer.Indexer.doIndexing(Indexer.java:431)
         at intradoc.indexer.Indexer.buildIndex(Indexer.java:340)
         at intradoc.server.IndexerMonitor.doIndexing(IndexerMonitor.java:1012)
         at intradoc.server.IndexerMonitor$4.run(IndexerMonitor.java:832)
    Caused by: intradoc.common.ServiceException: !syFileUtilsDirNotFound,C:/UCM/archives/testacrchive!syFileUtilsDirNotFound,C:/UCM/archives/testacrchive
         at intradoc.common.FileUtils.validatePath(FileUtils.java:801)
         at intradoc.common.FileUtils.validateDirectory(FileUtils.java:781)
         at intradoc.common.FileUtils.testFileSystem(FileUtils.java:437)
         ... 10 more
    Error showing in Archive logs
    Instance idc with archive testAcrchive is no longer being exported. Exception type is 'java.lang.Throwable'. [ Details ]
    An error has occurred. The stack trace below shows more information.
    !csReplicationInstanceRemoved,idc,testAcrchive!syExceptionType,java.lang.Throwable
    java.lang.Throwable
         at intradoc.common.IdcLogWriter.doMessageAppend(IdcLogWriter.java:81)
         at intradoc.common.Log.addMessage(Log.java:268)
         at intradoc.common.Log.errorEx2(Log.java:216)
         at intradoc.common.LoggingUtils.logMessage(LoggingUtils.java:97)
         at intradoc.common.SystemUtils.reportErrorEx(SystemUtils.java:462)
         at intradoc.common.SystemUtils.errEx(SystemUtils.java:547)
         at intradoc.server.IndexerReplication.doExport(IndexerReplication.java:196)
         at intradoc.server.IndexerReplication.doReplication(IndexerReplication.java:169)
         at intradoc.server.IndexerReplication.doWork(IndexerReplication.java:92)
         at intradoc.indexer.Indexer.doIndexing(Indexer.java:431)
         at intradoc.indexer.Indexer.buildIndex(Indexer.java:340)
         at intradoc.server.IndexerMonitor.doIndexing(IndexerMonitor.java:1012)
         at intradoc.server.IndexerMonitor$4.run(IndexerMonitor.java:832)
    Please resove the above issues,
    Please helpme out... this is pretty urgent as i am strucked at my work ? how to get relase the content ?
    thanks inadvance.
    Thanks,
    yt
    Edited by: 792821 on Oct 28, 2010 12:17 PM

    hi,
    We wanted to achieve the following.
    1) Data which is older more than 2 months should be sent and stored in a different storage device[ example: SAN storage / oracle storage etc ].
    2) When user requests for the contentId and if its older more than 2 months, the request has to search / retrieve the secondary storage system and get the documents.
    As of now, we need not required archival things, we just need retrive documents from out side devices. it can be SAS or any other storage device/unit.
    i just need to retrive the content based on metadata from other storage device.
    lets say one example , we have large amount data which is stored in one device or hard disc
    it can be SAS or any storge unit, using UCM, i need to retrive to the content from storage device/unit.
    how to retrive document from out side device ? how i need to configure for other storge unit ? is it possible through provider for providing other system information in UCM server ? is there any other alternate way ???
    how it be achived ? how to config to other storage device using ucm ?
    this requirement is very very urgent and we need proper soluation, so could please let me know soluation with a in detail description.
    thanks in advance

Maybe you are looking for

  • Upgrade cucm from 8.5 to 9.1 : Security issue (CTL Files)

    Hello All, I am in the process of performing a P2V upgrade from CUCM 8.5 to CUCM 9.1. The same IP address and Hostname on the new cluster will be kept. Could you please advise on what are the right steps to do this operation, knowing that I have depl

  • "created by" in SAP transactions and CE BPM

    Dear all, In most of the transaction e.g. create Purchase Order - "created by" is field available in BAPI. In case of Investment approval processes "created by" is popultaed by the ID assigned to logical destination "BASIC" authorisation. How is this

  • Unable to backup - icloud

    I got a new Iphone 6 plus and now I trying to make new backup on my old iphone (5S). the problem is stuck in "estimating time remaining.." and nothing happened.. I did all the solutions that I found in the forums  : hard reset, delete old backup. sig

  • My Adobe Premiere Elements was working a little while ago -- nothing has changed on my PC -- now I get error 150:30

    My Adobe Premiere Elements was working a little while ago -- nothing has changed on my PC -- now I get error 150:30

  • Lenovo G550 - no WIFI

    WIFI in my Lenovo G550 has stopped working. At beginning I thought that system (Windows 7) overwrite wrong version of drivers, but I checked it and I am sure that drivers are correct. Then I found something interesting: when I click Fn + F5 - I saw t