Problem with reading in bytes.

See Below
Edited by: ElCid on Mar 28, 2008 2:01 PM

This year old off and on project is almost done, but I am just having problems reading back information from a serial port. The problem isnt with the port, but how I am getting the information and how it is coming across. I writing to the device, and then I ask it for it's configuration and I want to compare what I sent it to what it got, making an error checker.
Here is the code that is reading from the buffer:
case SerialPortEvent.DATA_AVAILABLE:
            byte[] readBuffer = new byte[30];
            try {
                while (inputStream.available() > 0)
                       int numBytes = inputStream.read(readBuffer);
                System.out.print(new String(readBuffer));
            } catch (IOException e) {}
            break;
        }Now, if I use System.out.print(new String(readBuffer)); (notice it
is just print) I get something like this:
oardna
autos
baudra
bootcmd
bootdelay=2
bootfilmips.ari
Nice and pretty. But if I use *System.out.println(new
String(readBuffer));* , which as I understand it is what the device is
sending me, I will get the following output:
boardna
me=Muscat
autos
tart=yes
baudra
de=9600
bootcmd=boot ap
boot
lay=2
bootfile=
mips.ari
Any ideas on how I can get the actual output to look like the first
example? That way I can verify the correct information is input for
error checking.
Edited by: ElCid on Mar 28, 2008 2:48 PM

Similar Messages

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Having problem with reading list in safari

    i am having problem with reading list in safari some time it work sometimes gets hang....

    Might be a cache issue ...
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.

  • Problem with reading config file

    Hello,
    I have problem with reading config file from the same dir as class is. Situation is:
    I have servlet which working with DB, and in confing file (config.pirms) are all info about connection (drivers, users, passw, etc.). Everything work fine if I hardcoded like:
    configFileName = "C:\\config.pirms";I need to avoid such hardcoding, I tryied to use:
    configFileName = Pirms.class.getClassLoader().getResourceAsStream ("/prj/config.pirms").toString();but it isn't work.
    My config file is in the same directory as Pirms.class (C:\apache-tomcat-5.5.17\webapps\ROOT\WEB-INF\classes\prj)
    Also I tryied BundledResources, it isn't work fo me also.
    Can anybody help me to solve this problem? with any examples or other stuff?
    Thanks in advance.
    Andrew

    Thanks, but I am getting error that "non-static method getServletConfig() cannot be referenced from a static context"
    Maybe is it possibility to use <init-param> into web.xml file like:
    <init-param>
      <param-name>configFile</param-name>
      <param-value>/prj/config.pirms</param-value>
    </init-param>If yes can anybody explain how to do that?
    I need to have that file for:
    FileReader readFile = new FileReader(configFile);Thanks in advance.

  • Problem with reading PNG metadata due to unicode strings

    Being new to the XMP SDK I have problems trying to dump the XMP data from a .png file because the data contains UTF-8 data.
    I have searched the forum for answers, but the answers I found do not help.
    The answer I found was to replace std::string with std::wstring. but that causes problems with the compile - btw, I am using MSVC 2010 C++ Express
    and XMP SDK-CC201306
    Changing the std:: line to:
    #define TXMP_STRING_TYPE std::wstring
    and all string definitions in my code to wstring, gives me a bunch of compile errors, such as:
    f:\pkg\c++\xmp-toolkit-sdk-cc201306\public\include\client-glue/TXMPMeta.incl_cpp(74): error C2664: 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::assign(const _Elem *,unsigned int)' : cannot convert parameter 1 from 'XMP_StringPtr' to 'const wchar_t *'
    1>          with
    1>          [
    1>              _Elem=wchar_t,
    1>              _Traits=std::char_traits<wchar_t>,
    1>              _Ax=std::allocator<wchar_t>
    1>          ]
    1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>          f:\pkg\c++\xmp-toolkit-sdk-cc201306\public\include\client-glue/TXMPMeta.incl_cpp(72) : while compiling class template member function 'void TXMPMeta<tStringObj>::SetClientString(void *,XMP_StringPtr,XMP_StringLen)'
    1>          with
    1>          [
    1>              tStringObj=std::wstring
    1>          ]
    1>          f:\pkg\c++\XMP-Toolkit-SDK-cc201306\public\include\XMP.incl_cpp(55) : see reference to class template instantiation 'TXMPMeta<tStringObj>' being compiled
    1>          with
    1>          [
    1>              tStringObj=std::wstring
    1>          ]
    Any help or pointers will be most welcome.
    TIA,
    DayWalker

    OK, I now understand the point you were driving at.
    To check out this idea, I have modified the code in the routine which dumps the output from the callback to a file as follows:
    (Though if you were to dump the file using the std:: stream - .i.e. using the utility as supplied, you should see the same problem - it is not at all dependent on my using the wxWidgets toolkit)
    XMP_Status DumpXMPToFile(void * WXUNUSED(refCon), XMP_StringPtr buffer, XMP_StringLen bufferSize )
        XMP_Status status = 0;
        wxString wsT;
        try
        wxString wsText( buffer, wxConvUTF8 );
        if( g_wfDumpFile.IsOpened() )
          wsT.Printf( _T("<%s> size(%d)"), wsText, bufferSize );
          g_wfDumpFile.SeekEnd();
          g_wfDumpFile.Write( wsT, wsT.Length() );
        else
          return -1;
        catch(XMP_Error & e)
    The output for the one line in question:
    <Iptc4xmpCore:CiAdrExtadr> size(24)< = "> size(4)<Leo-Saurer-Straße> size(15)<> size(1)<C3> size(2)<> size(1)<9F> size(2)<>> size(1)<e> size(1)<"> size(1)<
    > size(1)<   > size(3)<   > size(3)<   > size(3)
    The hex contents of the buffer I get in the callback is
    0x003908D0  4c 65 6f 2d 53 61 75 72 65 72 2d 53 74 72 61 c3 9f 65 00 cd cd cd cd  Leo-Saurer-Straße.ÍÍÍÍ
    0x003908E7  cd cd cd cd cd cd cd cd cd fd fd fd fd ab ab ab ab ab ab ab ab ee fe  ÍÍÍÍÍÍÍÍÍýýýý««««««««îþ
    As you can see, my conversion routines takes all the buffer contains and converts it to the appropriate UTF-8 string, even though the count passed to me is short and represents only the count up to the first non-ASCII character and all of the subsequent strings  - interpreted as hex values by the caller of the call back would not give me the correct characters, athough they are passed to me for display.
    The two fragments of one byte length are the ones I could not find in the actual output.
    The call stack at that point:
    >
    wxMeta.exe!DumpXMPToFile(void * __formal, const char * buffer, unsigned long bufferSize)  Line 110
    C++
    wxMeta.exe!TextOutputProcWrapper(void * refCon, const char * buffer, unsigned long bufferSize)  Line 60 + 0x18 bytes
    C++
    wxMeta.exe!DumpClearString(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & value, long (void *, const char *, unsigned long)* outProc, void * refCon)  Line 409 + 0x1c bytes
    C++
    wxMeta.exe!DumpPropertyTree(const XMP_Node * currNode, int indent, unsigned int itemIndex, long (void *, const char *, unsigned long)* outProc, void * refCon)  Line 161 + 0x14 bytes
    C++
    wxMeta.exe!DumpPropertyTree(const XMP_Node * currNode, int indent, unsigned int itemIndex, long (void *, const char *, unsigned long)* outProc, void * refCon)  Line 222 + 0x1f bytes
    C++
    wxMeta.exe!XMPMeta::DumpObject(long (void *, const char *, unsigned long)* outProc, void * refCon)  Line 1100 + 0x23 bytes
    C++
    wxMeta.exe!WXMPMeta_DumpObject_1(__XMPMeta__ * xmpObjRef, long (void *, const char *, unsigned long)* outProc, void * refCon, WXMP_Result * wResult)  Line 968
    C++
    wxMeta.exe!TXMPMeta<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::DumpObject(long (void *, const char *, unsigned long)* outProc, void * refCon)  Line 833 + 0x21 bytes
    C++
    wxMeta.exe!MyFrame::DisplayMetaData(wxString & wsrFilePathAndName)  Line 484
    C++
    Hoping this will help resolve the issue :-)

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • Log watcher, problems when read new bytes.

    Hello,
    My first post here.
    I want to monitorize Logs in real time.
    Actually I made a simple class with this steps:
    1º Get the file "target"
    2º OpenAsync in READ mode, and make a event listener, in this listener I get the totalbytes of the file, close the stream, and start a timer.
    3º The timer check every 10ms if the file "target" have changes in .modificationDate.getTime(). If the timer see a change, first compare totalbytes with the new bytes, if they are diferent, open a stream, put the stream.position in the diference of totalbytes and newbytes and read the changes, this "new bytes" go to a Text Area.
    Well, here is the problem.
    If the owner of the file "target" want to write new bytes at the same time I read the new bytes (fast process of writting in the log by the owner of file "target") I have a error in the app owner of the file "target", and my app crash.
    How can I read this new bytes without this problem? I think the problem are where I READ the newbytes, because my app lock this file in the same time or a bit until of app owner of file "target" want write new bytes.
    How can I solve this problem?
    Sorry for my poor English. if want I´m in googlechat [email protected]
    Regards.

    [SFWordprocesing?|http://discussions.apple.com/search.jspa?threadID=&q=sfwordpro cessing&objID=c188&dateRange=last90days&userID=&numResults=15&rankBy=10001]
    Notice the word [Million|http://discussions.apple.com/search.jspa?threadID=&q=million&objID=c18 8&dateRange=last90days&userID=&numResults=15&rankBy=10001]
    [The million dollar trick or how to fix iWeb in 10.6.2|http://iwebfaq.org/e-books/the-million-dollar-trick-or-how-to-fix-iweb-i n-10-6-2>

  • Help! Problem with reading objects from file

    I wrote a "Library" program for an assignment, and one of the requirements is that the library store all of its information to file upon exit, and reload this information from file when run.
    Well, the writing to file part is working. I'm using a FileOutputStream object and an ObjectOutputStream object. I can tell from the file size of the .dat file that information is going into it.
    But what I can't do is read from file. For that, I'm using a FileInputStream and an ObjectInputStream. I keep getting this exception:
    java.io.EOFException
         at java.io.DataInputStream.readInt(Unknown Source)
         at java.io.ObjectInputStream$BlockDataInputStream.readInt(Unknown Source)
         at java.io.ObjectInputStream.readInt(Unknown Source)
         at Library.readDataFromFile(Library.java:350)
         at Library.<init>(Library.java:63)
         at LibraryDriver.main(LibraryDriver.java:6)I looked this exception up and it says it's thrown when a data input stream unexpectedly ends....But I am instantiating the input streams just before I try to read from file:
                            fileInStream = new FileInputStream(libraryFile);
                   objInStream = new ObjectInputStream(fileInStream);
                   Object[] objectArray = new Object[objInStream.readInt()];Both input streams have methods that "return the number of bytes that can be read from this file input stream without blocking". Just for kicks, I tried writing that number to the console.
    For the FileInputStream, I get 404 bytes.
    For the ObjectInputStream, I get 0 bytes.
    So I guess it's a problem with the ObjectInputStream? Anyone have any suggestions as to how I can fix this, please?

    Yep, here's the relevant code from the writeToFile() method:
                          for (int i = 0; i < libraryAuthors.length; i++) {
                        currentAlphaAuthorList = libraryAuthors;
                        for (int j = 0; j < currentAlphaAuthorList.size(); j++) {
                             currentAuthor = (Author) currentAlphaAuthorList.get(j);
                             objOutStream.writeObject(currentAuthor);
                   objOutStream.flush();
                   objOutStream.close();

  • Socket problem with reading/writing - server app does not respond.

    Hello everyone,
    I'm having a strange problem with my application. In short: the goal of the program is to communicate between client and server (which includes exchange of messages and a binary file). The problem is, when I'm beginning to write to a stream on client side, server acts, like it's not listening. I'd appreciate your help and advice. Here I'm including the source:
    The server:
    import java.io.IOException;
    import java.net.ServerSocket;
    public class Server
        public static void main(String[] args)
            ServerSocket serwer;
            try
                serwer = new ServerSocket(4443);
                System.out.println("Server is running.");
                while(true)
                    ClientThread klient = new ClientThread(serwer.accept());
                    System.out.println("Received client request.");
                    Thread t = new Thread(klient);
                    t.start();
            catch(IOException e)
                System.out.print("An I/O exception occured: ");
                e.printStackTrace();
    }ClientThread:
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.net.Socket;
    import java.net.SocketException;
    public class ClientThread implements Runnable
        private Socket socket;
        private BufferedInputStream streamIn;
        private BufferedOutputStream streamOut;
        private StringBuffer filePath;
        ClientThread(Socket socket)
                this.socket = socket;     
        public void run()
            try
                 this.streamIn = new BufferedInputStream(socket.getInputStream());
                 this.streamOut = new BufferedOutputStream(socket.getOutputStream());
                int input;
                filePath = new StringBuffer();
                System.out.println("I'm reading...");
                while((input = streamIn.read()) != -1)
                     System.out.println((char)input);
                     filePath.append((char)input);
                this.streamOut.write("Given timestamp".toString().getBytes());
                ByteArrayOutputStream bufferingArray = new ByteArrayOutputStream();
                  while((input = streamIn.read()) != -1)
                       bufferingArray.write(input);
                  bufferingArray.close();
                OutputStream outputFileStream1 = new FileOutputStream("file_copy2.wav");
                  outputFileStream1.write(bufferingArray.toByteArray(), 0, bufferingArray.toByteArray().length);
                  outputFileStream1.close();
                this.CloseStream();
            catch (SocketException e)
                System.out.println("Client is disconnected.");
            catch (IOException e)
                System.out.print("An I/O exception occured:");
                e.printStackTrace();
        public void CloseStream()
            try
                this.streamOut.close();
                this.streamIn.close();
                this.socket.close();
            catch (IOException e)
                System.out.print("An I/O exception occured:");
                e.printStackTrace();
    }The client:
    import java.io.*;
    public class Client
         public static void main(String[] args) throws IOException
              int size;
              int input;
              //File, that I'm going to send
              StringBuffer filePath = new StringBuffer("C:\\WINDOWS\\Media\\chord.wav");
              StringBuffer fileName;
              InputStream fileStream = new FileInputStream(filePath.toString());
            Connect connection = new Connect("127.0.0.1", 4443);
            String response = new String();
            System.out.println("Client is running.");
              size = fileStream.available();
              System.out.println("Size of the file: " + size);
            fileName = new StringBuffer(filePath.substring(filePath.lastIndexOf("\\") + 1));
            System.out.println("Name of the file: " + fileName);
            connection.SendMessage(fileName.toString());
            response = connection.ReceiveMessage();
            System.out.println("Server responded -> " + response);
            ByteArrayOutputStream bufferingArray = new ByteArrayOutputStream();
              while((input = fileStream.read()) != -1)
                   bufferingArray.write(input);
              bufferingArray.close();
            FileOutputStream outputFileStream1 = new FileOutputStream("file_copy1.wav");
              outputFileStream1.write(bufferingArray.toByteArray(), 0, bufferingArray.toByteArray().length);
              outputFileStream1.close();
              byte[] array = bufferingArray.toByteArray();
              for (int i = 0; i < array.length; ++i)
                   connection.streamOut.write(array);
              response = connection.ReceiveMessage();
    System.out.println("Server responded -> " + response);
    connection.CloseStream();
    Connect class:import java.io.*;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class Connect
    public Socket socket;
    public BufferedInputStream streamIn;
    public BufferedOutputStream streamOut;
    Connect(String host, Integer port)
    try
    this.socket = new Socket(host, port);
    this.streamIn = new BufferedInputStream(this.socket.getInputStream());
    this.streamOut = new BufferedOutputStream(this.socket.getOutputStream());
    catch (UnknownHostException e)
    System.err.print("The Host you have specified is not valid.");
    e.getStackTrace();
    System.exit(1);
    catch (IOException e)
    System.err.print("An I/O exception occured.");
    e.getStackTrace();
    System.exit(1);
    public void SendMessage(String text) throws IOException
    this.streamOut.write(text.getBytes());
    System.out.println("Message send.");
    public void SendBytes(byte[] array) throws IOException
         this.streamOut.write(array, 0, array.length);
    public String ReceiveMessage() throws IOException
         StringBuffer elo = new StringBuffer();
         int input;
         while((input = streamIn.read()) != -1)
              elo.append((char)input);
         return elo.toString();
    public void CloseStream()
    try
    this.streamOut.close();
    this.streamIn.close();
    this.socket.close();
    catch (IOException e)
    System.err.print("An I/O exception occured: ");
    e.printStackTrace();

    The problem that was solved here was a different problem actually, concerning different source code, in which the solution I offered above doesn't arise. The solution I offered here applied to the source code you posted here.

  • Problem with Reader file when we try to save a pdf version of filled in file.

    We currently create fillable forms in Acrobat XI and enable them for fill-in with Acrobat Reader.  Our end users are able to key information and save it to the enabled pdf file with Reader, but they want to create a protected version of the form so nothing can be modified once they have approved it.  They have been creating "locked" pdf versions of the completed form using CutePdf software.  The PDF files they are creating open fine with Acrobat Pro XI or our free FoxIT reader, but when we try to open the files they created with CutePDF with Acrobat Reader, they are quite distorted.  According to users, this worked with older versions of Acrobat Reader.  Please let us know if you have any suggestions (other than switching from Acrobat Reader to the free FoxIT reader.
    Thanks for the help!!
    Ken K. - 2191

    Can't endorse FoxIt or CutePDF, since I don't use either of them, and Adobe doesn't like us endorsing thrid party products in their forums anyway. On top of that I know several people who had really bad adware experiences with FoxIt, so I'd say stay away from it.
    Most likely neither of these software developers has updated THIER software to work with Acrobat/Reader XI and the problem lies with them, since PDF is an Adobe format and they must follow the lead from here, not vice-versa.

  • Booklet printing problems with Reader XI (version 11.0.06)

    I created an 80 page 5.5" x 8.5" booklet using Word 2011 running under OSX 10.9.2 on a new 27" iMac.  I then "printed" it to a PDF file.  I then opened the PDF file in Reader XI and attempted to print it out using the "booklet" option as described at
    http://helpx.adobe.com/acrobat/kb/print-booklets-acrobat-reader.html#main1_Reader_and_Acro bat_X .
    I planned to manually duplex the booklet booklet since my HP Color Laserjet CP1518ni printer does not have automatic duplexing.  The first sign that something was wrong came when I selected "Back side only" from the Booklet Subset pop-up menu.  The numbers in the Sheets from boxes showed "Sheets from 1 to 10" when I obviously needed 20 sheets to print the booklet.  Repeated attempts to manually change it to "Sheets from 1 to 20" failed.  Each time I changed "10" to "20", it would flip back to "10" when I clicked the "Print" button.
    I set the Booklet Subset to print only the even pages and checked the "Reverse" box as I have done to successfuly print thousands of manually duplexed pages before.
    The printer only printed ten sheets.  The first sheet (what should be the booklet's centerfold) had page 40 on the left side as it should, but 42 on the right (it should have been 41).  The last of the ten sheets printed had page 4 on the left side (instead of the expected  2) and 78 on the right side (instead of the expected  79).  Even though these were obviously messed up, I went on to print the front side of these sheets, selecting "normal".  It printed Page 1 on the right side as expected, but printed page 79 (instead of the correct page 80) on the left.
    Folding the ten sheets into a booklet revealed the really bizarre nature of the printing snafu. Page 1 was, as expected, on the front.  Turning the first page open revealed pages 4 and 5.  Turning the second page revealed Pabes 8 (left) and 9 (right).  This pattern continued, printing two pages, then skipping two pages, right into the centerfold pages 40 (left) and 42 (right).  The first page turn after the centerfold revealed pages 43 (left) and 46 (right).  The next revealed 47 (left) and 50 (right).
    I am at a complete loss of how to determine where the printing process went afoul.  Printing the PDF file normally (one page per sheet one-sided) resulted in all pages being printed normally. 
    The really frustrating part of this entire experience is that I could find no place to report this "bug" to Adobe.  If anyone can help me solve this printing dilemma, or put me in touch with someone at Adobe who could help, it would be greatly appreciated.
    The booklet is due at the printer's tomorrow and the inability to print a proof is a real pain.  Hope the printer can print this file as a booklet.  I would be happy to send this file (125 Mb) to anyone who might help.

    I arrived here looking for a solution!  And while reading your post the penny dropped that I didn't have a serious problem.  I have a booklet of 112 pages and all I needed to do was re-order the pages as printed so that 1 is followed by a sheet with 2 on the under-face but same side and so on.  The pages had printed back to front and needed flipping.  But then I have a duplex printer and maybe that makes a difference.  Is it to do with your manual duplexing and the order that the second pass is presented to the printer.  As my duplex sheets effectively needed flipping over each one I'm wondering if you can solve your problem with a little experimentation and re-ordering before your second pass.

  • ALV GRID Problem with reading contents

    Hi there! I'm quite new with ABAP and I have some problems with the syntax of it. Maybe I should first describe my aim and then I'll show you my code.
    1. I read contents from two database tables, called 'zbc_dan_registry' and 'zbc_dan_category'.
    'zbc_dan_registry' has 2 columns: name, value.
    zbc_dan_category' has 1 column: category.
    Now I want to have an ALV Grid, that displays the contents of 'zbc_dan_registry' and one additional column with dropdown fields, where the user can select a category for each row. This is, what my code already does.
    Now I want to save the contents of the whole table in a new table 'zbc_dan_registrz' (you see: 'registrz', not 'registry'!) with 3 columns:
    name, category, value.
    My problem is, how can I read the contents of the ALV Grid, with the user selected category for each row, and save them in an internal table? I've tried to adapt the code of "BCALV_EDIT_04", but I don't get it running.
    Some detailled help would be great, you know, I'm really working hard to understand ABAP, but it's really hard for me. Thanks for your support and help!!
    Here's my code so far:
    *& Report  ZBC400_DAN_TESTNO4
    REPORT  ZBC400_DAN_TESTNO4.
    DATA: lt_registrz TYPE TABLE OF zbc_dan_regstrz WITH HEADER LINE,
          lt_category TYPE TABLE OF zbc_dan_category WITH HEADER LINE,
          ls_category TYPE zbc_dan_category, "Struktur Kategorie
          ok_code LIKE sy-ucomm,
          container_r TYPE REF TO cl_gui_custom_container,
          grid_r TYPE REF TO cl_gui_alv_grid,
          gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_REG',
          fieldcat_r TYPE lvc_t_fcat,
          layout_r TYPE lvc_s_layo,
          lt_ddval TYPE lvc_t_drop,
          ls_ddval TYPE lvc_s_drop,
          c TYPE i.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
      DATA g_verifier TYPE REF TO lcl_event_receiver.
      DATA: BEGIN OF gt_outtab OCCURS 0.
        INCLUDE STRUCTURE zbc_dan_regstrz.
        DATA: celltab TYPE lvc_t_styl.
      DATA: END OF gt_outtab.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
      TYPES: BEGIN OF lt_registrz_key.         "Struktur mit den Schlüsseln der Tabelle 'Registry'
        TYPES:  name TYPE zbc_dan_name,
                value TYPE zbc_dan_value,
                category TYPE zbc_dan_cat.
      TYPES: END OF lt_registrz_key.
      TYPES:  ls_registrz_keys TYPE STANDARD TABLE OF lt_registrz_key,
              ls_registrz_table TYPE STANDARD TABLE OF zbc_dan_regstrz.
      METHODS: get_inserted_rows EXPORTING inserted_rows TYPE ls_registrz_keys.
      METHODS: refresh_delta_tables.
      METHODS: handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    *  METHODS: get_inserted_rows EXPORTING inserted_rows TYPE registrz_keys.
    *  METHODS: refresh_delta_tables.
      PRIVATE SECTION.
      DATA: inserted_rows TYPE ls_registrz_keys.
      DATA: error_in_data TYPE c.
      METHODS: get_cell_values IMPORTING row_id TYPE int4 pr_data_changed TYPE REF TO cl_alv_changed_data_protocol EXPORTING key TYPE lt_registrz_key.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi,
              ls_new TYPE lvc_s_moce.
        error_in_data = space.
        IF error_in_data = 'X'.
          CALL METHOD er_data_changed->display_protocol.
        ENDIF.
      ENDMETHOD.
      METHOD get_cell_values.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'NAME'
            IMPORTING e_value = key-name.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'VALUE'
            IMPORTING e_value = key-value.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'CATEGORY'
            IMPORTING e_value = key-category.
      ENDMETHOD.
      METHOD get_inserted_rows.
        inserted_rows = me->inserted_rows.
      ENDMETHOD.
      METHOD refresh_delta_tables.
        clear me->inserted_rows[].
      ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
        SELECT client name value
          INTO CORRESPONDING FIELDS OF TABLE lt_registrz FROM zbc_dan_regstry.
        SELECT category INTO CORRESPONDING FIELDS OF TABLE lt_category FROM zbc_dan_category.
    CALL SCREEN 0100.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          SET SCREEN 0.
          MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
        WHEN 'SAVE'.
          PERFORM save_data.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'DYNPRO100'.
      SET TITLEBAR 'D0100'.
    ENDMODULE.
    MODULE display_alv OUTPUT.
      PERFORM display_alv.
    ENDMODULE.
    FORM display_alv.
    IF grid_r IS INITIAL.
    *----Creating custom container instance
      CREATE OBJECT container_r
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid_r
        EXPORTING
          i_parent = container_r
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          CREATE OBJECT g_verifier.
          SET HANDLER g_verifier->handle_data_changed FOR grid_r.
    *----Preparing field catalog.
          PERFORM prepare_field_catalog CHANGING fieldcat_r.
    *----Preparing layout structure
          PERFORM prepare_layout CHANGING layout_r.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
          CALL METHOD grid_r->set_table_for_first_display
          EXPORTING
    * I_BUFFER_ACTIVE =
    * I_CONSISTENCY_CHECK =
    * I_STRUCTURE_NAME =
    * IS_VARIANT =
    * I_SAVE =
    * I_DEFAULT = 'X'
            is_layout = layout_r
    * IS_PRINT =
    * IT_SPECIAL_GROUPS =
    * IT_TOOLBAR_EXCLUDING =
    * IT_HYPERLINK =
          CHANGING
            it_outtab = lt_registrz[]
            it_fieldcatalog = fieldcat_r
    * IT_SORT =
    * IT_FILTER =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
            OTHERS = 4.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          ELSE.
            CALL METHOD grid_r->refresh_table_display
    * EXPORTING
    * IS_STABLE =
    * I_SOFT_REFRESH =
          EXCEPTIONS
            finished = 1
            OTHERS = 2.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
        ENDIF.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDFORM.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = 'ZBC_DAN_REGSTR2'
      CHANGING
        ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
      IF sy-subrc <> 0.
    *--Exception handling
      ENDIF.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'NAME'.
            ls_fcat-coltext = 'Name'.
            ls_fcat-outputlen = '40'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'VALUE'.
            ls_fcat-coltext = 'Wert'.
            ls_fcat-outputlen = '30'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CATEGORY'.
              LOOP AT lt_category into ls_category.
                ls_ddval-handle = 1.
                ls_ddval-value = ls_category-category.
    *            ls_ddval-style = cl_gui_alv_grid=>mc_style_enabled.
                APPEND ls_ddval TO lt_ddval.
             ENDLOOP.
             CALL METHOD grid_r->set_drop_down_table
                EXPORTING it_drop_down = lt_ddval.
            ls_fcat-edit = 'X'.
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-coltext = 'Kategorie'.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X'.
      ps_layout-grid_title = 'Kategorie zur Registry hinzufügen'.
      ps_layout-smalltitle = 'X'.
    ENDFORM.
    FORM save_data.
      DATA: ls_ins_keys TYPE g_verifier->ls_registrz_keys,
            ls_ins_key TYPE g_verifier->lt_registrz_key,
            ls_registrz TYPE zbc_dan_regstrz,
            ls_outtab LIKE LINE OF gt_outtab,
            lt_instab TYPE TABLE OF zbc_dan_regstrz.
      CALL METHOD g_verifier->get_inserted_rows IMPORTING inserted_rows = ls_ins_keys.
      LOOP AT ls_ins_keys INTO ls_ins_key.
        READ TABLE gt_outtab INTO ls_outtab
        WITH KEY  name = ls_ins_key-name
                  value = ls_ins_key-value
                  category = ls_ins_key-category.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING ls_outtab TO ls_registrz.
          APPEND ls_registrz TO lt_instab.
        ENDIF.
      ENDLOOP.
      INSERT zbc_dan_regstrz FROM TABLE lt_instab.
      CALL METHOD g_verifier->refresh_delta_tables.
      ENDFORM.

    Hi Hans,
    You raised the Question in the Webdynpro ABAP forum. Here its very diffcult to get the answer from this forum. Please close it here and raise the same question in ABAP General Forum there you will get faster and so many anwsers.
    Please close the question here.
    Warm Regards,
    Vijay

  • Font problem with Reader 9.3

    We have a problem with unusual font displayed for a PDF file created on a Mac with Microsoft
    Office.  It displays properly on Windows with Adobe Reader 9.3 and on Linux (Fedora 12 and
    Red Hat Enterprise Linux 5.4) with kpdf and evince.  However, on both Fedora 12
    and RHEL 5.4 with Reader 9.3, the fonts used are different from what is expected.
    Is there a known issue with fonts in Reader 9.3?

    We have a problem with unusual font displayed for a PDF file created on a Mac with Microsoft
    Office.  It displays properly on Windows with Adobe Reader 9.3 and on Linux (Fedora 12 and
    Red Hat Enterprise Linux 5.4) with kpdf and evince.  However, on both Fedora 12
    and RHEL 5.4 with Reader 9.3, the fonts used are different from what is expected.
    Is there a known issue with fonts in Reader 9.3?

  • Display and Print Problem with Reader 9.1.x

    hallo
    an external software produced pdf-documents. all of this pdf´s will work with all reader-versions 7 and 8. but with 9.x we have the problem, that the view is not korrekt. letters are not comlpete. this view will also be printed. this error is not on alle text-lines, but some lines show uncompleted letters. the manufacturer say, that is all standard and it is sure that the reader will have the problem :-)  yes surely.
    but maybe the reader is the problem. some ideas?
    the attch file shows the error. it is a label and in the middel of the label: Tamaris-TREND     or with reader 9.x T.......-TREND.
    thanks
    markus

    testing and testing and testing
    here the newest info
    it is not the letter size. small or caps letters.
    i added a new pdf. here under the bold number you must see "581*LAVENDER". but with reader 9.x it looks like the printer cardridge goes empty.
    i´ll go crazy with this sh... :-)
    thanks
    markus

Maybe you are looking for

  • I can no longer connect to my pc home sharing

    I have been using my itunes on my HTPC as my media server for my atv2 for months without issue, but after a power outage i can no longer connect to my HTPC.  It shows up under "computers" but it will not connect.  I didn't change any firewall setting

  • Philips HDMI to DVI connection....is this possible?

    Hi, I just recently got a 32" Philips LCD with VGA and HDMI capabilities. I want to run my 12" G4 PB to it. I have a HDMI to DVI cable that I am connecting via the mini-DVI cable that came with the G4 but I get no signal. I called philips and they ha

  • Select_list_from_query function null value

    How does one remove the null value when using the select_list_query function? So if I have the following: SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,id,'SELECT id FROM emp') FROM emp It currently adds the extra null '%' value. Where would I plug in

  • File saving issues in CS6

    I have recently upgraded from CS4 to CS6.  After editing a jpeg, I try the Save As command and recieve this message...."could not complete the Save As command because there is not enough memory RAM" I also notice that all my images are at 72 dpi, is

  • How can i take itunes & usb cable icons off from black screen ??

    Thanks !