Missing rotated text in PDF created via FPDF

Hi guys,
I have a weird problem which is preventing some rotated text to be viewed in adobe reader, while every other reader like foxit, google pdf viewer and scrib are doing just fine!
if you create a flyer using following link
http://www.erupert.ca/classifieds/create_flyer/ad/32_1306248214
the generated PDF displays just fine in google document viewer but if I download and open the same in Adobe reader the pull tab text (text rorated 90 degrees) vanish, again the PDF is just fine in foxit reader as well!
What am I doing wrong, any ideas would be much appriciated.
Also here is the code to rotate text I'm using by extending the FPDF class
function Rotate($angle,$x=-1,$y=-1)
if($x==-1) $x=$this->x;
        if($y==-1) $y=$this->y; //echo "{$this->x} - {$this->y}";die();
        if($angle!=0) $this->_out('Q');
        $angle=$angle;
        if($angle!=0)
$angle*=M_PI/180;
$c=cos($angle);
$s=sin($angle);
$cx=$x*$this->k;
$cy=($this->h-$y)*$this->k;
$this->_out(sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy));
OS: Windows Any ( >= XP)
Adobe version X (latest updates)
Thanks,
Anupam

Hello anupam,
I know this is a particularly old thread, however i thought i'd post the solution here for others who may have been searching around for a solution to this very same problem and come across this thread.
As George has correctly stated it is an issue with the unbalanced q and Q operators. I recognise the provided piece of code, it is of course a snippet from a generation class such as FPDF or TCPDF or HTML2PDF, the error occurs when the rotation is not returned to 0 before finalising the document.
i.e. You would have used something like $pdf -> Rotate(270,60,50) or $this -> Rotate(270,60,50) where 270=the degree of rotation , 60=the x coordinate , 50=the y coordinate.
Once you've completed writing all your text, lines, images, cells you need to make sure to reset the rotate i.e. $pdf -> Rotate(0) prior to Outputting the pdf to screen or saving it as a file.

Similar Messages

  • Randomly Missing Text in PDF Created from FrameMaker

    This problem relates to a structured FM document, but I suspect it might be a general issue and have posted it here in the general forum for that reason.
    I am generating PDFs that are missing text somewhat randomly throughout. I tried searching the forum for solutions, but none of the suggested fixes worked and none of the posts specifically addressed the issue I am experiencing.
    I am working in structured FM. The templates we use were originally created for FM8. We use both FM8 and FM10 in our work group. We are able to duplicate the same problem in both versions and on multiple computers.
    I thought I had narrowed the problem down to certain paragraph formatting, since it only ocurs in three or four paragraph formats (a bullet list, table text, etc.) Garden variety formatting. But in most places in the document, these formats appear perfectly. The strangest occurence is a single intance where the page number is missing from the footer.
    I thought it might be a font issue, as I've had similar issues in the past. I had a missing font warning in the console, but I am pretty sure that this has nothing to do with it, since they are fonts we are not using and all the other text from the same formats appears.
    I tried turning off "Remember Missing Font Names" in preferences. No help.
    I checked that the fonts are in the local directory and appear as embedded subsets in the PDF.
    I also tried checking and unchecking the "Rely on system fonts only; do not use document fonts" option in the PDF output settings. Also no help.
    The randomness of the missing fonts bewilders me and I've exhausted my own troubleshooting abilities. I would be happy to share a source file if anyone thinks they could help me that way.
    Thanks in advance,
    Douglas

    There is a known bug in Windows XP that causes random dropped text in
    PDF. The hotfix is here, though the link does not seem to be working at
    the moment:
    http://support.microsoft.com/?id=952909
    However, the above link directs you to a download link that is here:
    http://support.microsoft.com/Hotfix/KBHotfix.aspx?kbnum=952909&kbln=en-us <http://support.microsoft.com/Hotfix/KBHotfix.aspx?kbnum=952909&kbln=en-us

  • Q:  how to highlight PDF created via scanner?

    hi:
    1. i'm going to assume that this is a very basic question but i can't figure out how to highlight text in a PDF file that i created via flatbed scanner.
    2. i have no problem highlighting PDF files that i may have created via the web, but for some unclear reason, when i try to highlight stuff in a PDF file that was created via my scanner, nothing happens.
    thanks for any feedback / suggestions. harry

    >but for some unclear reason, when i try to highlight stuff in a PDF file that was created via my scanner, nothing happens.
    It's very clear. You're trying to highlight text that doesn't exist. It's just a picture of text.
    Google OCR or look for the same topic in the Acrobat help files. You "may" be able to convert it to text. Then you can highlight it.

  • Rotating text in PDF

    Hi there,
    For some of my work, I'm trying to create a bunch of diagrams and graphics of different kinds directly in PDF. I've written a little Python library to help me do this. The spec is very easy to read, kudos for that!
    However, I can't figure out how to get text rotation to work. Right now, I'm just playing with a simple file. Basically, this works as intended:
    BT
    200 200 Td
    /F1 12 Tf
    (Blah) Tj
    ET
    while this shows nothing at all in the document
    0.0 1.0 0.0 -1.0 0 0 cm
    BT
    200 200 Td
    /F1 12 Tf
    (Blah) Tj
    ET
    What am I doing wrong? This seems simple enough that I should be able to get it right. I hope I'm not being stupid.
    Cheers,
    Dirkjan

    0.0 1.0 0.0 -1.0 0 0 cm rotates the CTM by 90 degree around the
    origin. A good way to think of this is to stack two pieces of paper
    and put a drawing pin/thumbtack in the bottom left corner.
    The top page is the page you are painting on. The bottom page is the
    window you are viewing through.
    Rotate the top page by 90 degree. Now... how much of the top sheet
    overlaps the bottom sheet?
    This is what has happened to your data; you have rotated it out of
    sight. You always need to follow a rotation by a translation, to bring
    the information back onto the page.
    Aandi Inston

  • Problem selecting text in PDF created by MS Word for Mac 2011

    I'm viewing PDFs in Adobe Digital Editions 4.0, and when I try to select text, the text that actually gets selected is 1-2 lines BELOW where the cursor (I-bar) is located.  This makes highlighting text extremely difficult.  This only seems to happen with PDFs that were created in MS Word for Mac 2011 and viewed in Adobe Digital Editions.
    If I try opening the very same PDF file in Adobe Reader, the cursor highlights text just fine.  If I open it in Preview, it works fine too.  It just won't work when viewing the PDF in Adobe Digital Editions.
    System:  Mac OS 10.10 Yosemite
    I have not been able to find any info on this issue anywhere, and if anyone knows a fix or workaround, I would greatly appreciate the help.

    DHodges wrote:
    Thanks; this last reply came closest to 'solving' the issue. While I selected font sub, it at first had no affect on the document.
    I then went back to prefs and set the compatability dropdown from 'Custom' (where it had defaulted) to 'Word 2004-2007', assuming these docs were created from a recent past Windows.
    I 'Saved As' a Word for Mac " .docm "
    Whoa... the extensions mean something. Your original problem (document shows bold, italic, underline, but tables and other complex formatting are lost) sounds as though the document was being exported as a .RTF, a Rich Text Format file. If you save as a .DOCM, that's a Word Macro Enabled Document. Regular Word 2007, 2008, 2010 and 2011 docs are .DOCX. Regular Word 97 through 2004 docs are .DOC. You need to save that document as a .DOCX or a .DOC or you're gonna have problems later.
    - and the documents appear normal (though I had to switch one to 'Portrait' as it for some reason wanted to display in landsacpe.
    Normally you'd have to select page orientation.
    So, poor testing on my part. I have no idea which of the above steps fixed it but I'm guessing the 'Save As' to my version of Word.
    If so, it would appear the 'Compatability' feature was not working at least on these two documents.
    Word's compatibility feature is supposed to ensure that a document you produce is compatible with the target version of Word. If you turn the compatibility stuff on then you will be warned if you are using Word 2007 through 2011 and you use a feature that earlier versions of Word do not have. Microsoft shipped a translator which works with Office 2003 and 2004 and which allows Word 2003 or 2004 to read Word 2007, 2008, 2010, or 2011 documents (.DOCX) and to save them as Word 97 through 2004 documents (.DOC) _as long as they don't have any incompatible features_. Word's compatibility features doesn't do much for .RTFs or for .DOCMs.

  • Copying text from PDF created using print to PDF function in OS X

    I use a MacBook Pro with Mac OS X Lion, and Microsoft Word 2008 for Mac and Adobe Acrobat Pro.
    For some reason when I use the Print to PDF function to export a PDF of a Word document, then open it with Acrobat Reader or Acrobat Pro 9 and try to select text and copy it then paste it into a word processor (include Word 2008) the resulting text is gibberish. It looks like some sort of encoding issue, but I can't understand that, since it's all happening on the same Mac! I have also tried to do this with Preview as the PDF reader but I still get gibberish.
    The issue first started occuring with Snow Leopard, and all software is patched, but no dice.
    I've attempted to work around this by using all of the different PDF options under the print dialog, and by saving the doc as a PDF, but I still get the same thing.
    I've also tried copying and pasting the text int Pages, then saving it as PDF and trying to ready it .. again, no luck.  I was able to output the file directly from Pages to Preview and save it from there, but it really doesn't seem like this should be necessary, given that the functionality is build into the OS.
    Anybody else have experience with this? I have just one user that needs to copy and paste text from the doc, so it's a real pain to have to maintain separate PDF and Word versions.
    Thanks!
    D

    Rishi,
    Welcome to Apple Discussions.
    After reading your post, I tried to duplicate this problem. I opened a PDF, selected a sentence, then copied it to the clipboard. I then opened Pages, selected the blank template, then pasted in the text. It pasted perfectly.
    Does this problem happen with all text in a PDF? With different PDFs?
    -Dennis

  • Unicode text in PDF

    I have gone through some threads about japanese/chinease text in PDF.
    my application creates PDF files. In my application text is stored in UNICODE form. currently the text (for Tj) is convered to char* which is locale dependant. I need to store text in PDF which will be locale independant.
    I am using 'embedded' type 1 (TTF) font in above example. The result is, PDF created on Eng locale gives '?' for (each) *** text and PDF created on *** locale gives correct results (*How*).
    From PDF Ref 3.8.1 Text Strings, I understand that, the text can be stored in UTF-16BE. I tried it but boxes (default char) apears in Adobe Reader 6.0... means each byte is treated seperatly. But as I said before for PDF created on *** locale (eventhough 1 character is of 2 byte) characters are read correctly.
    This is a situation. Now I am confused about some aspects of speficications:
    - Do I have to use 'type 0' font object (even if I am embedding simple TTF) to display text beyond 256 char code?
    - why 2 bytes per character is read for text created on *** locale and not when I create text in UTF-16BE?
    Thanks for your help,
    Sameer

    >From PDF Ref 3.8.1 Text Strings, I understand that, the text can be stored in UTF-16BE.
    Many people have read this and made a big assumption that is not
    valid.
    Text strings are a particular type that is used in particular cases.
    For example, they are used for bookmarks, which can indeed be
    UTF-16BE. Nowhere does it say that this text string type works for
    page contents.
    >
    >- Do I have to use 'type 0' font object (even if I am embedding simple TTF) to display text beyond 256 char code?
    Absolutely. A /Type1 or /TrueType font is by definition a single byte
    font, and the rules for Encoding are followed exactly as described.
    There is no two byte escape.
    If you wanted to use only 256 characters FROM a large font this is
    possible; you could break your Japanese font down into multiple
    embedded subsets, each of less than 256 characters.
    >
    >- why 2 bytes per character is read for text created on *** locale and not when I create text in UTF-16BE?
    You mean this sometimes seems to work? Suggests a bug.
    Aandi Inston

  • Vertical text in PDF- XSL-FO

    Hi Guys,
    We are trying to display a vertical text is a column in a PDF file. ( 90 o rotation of horizontal test).
    Is it possible in XSL-FO transformation? Could you please throw some light on this?
    (As we have lot of columns we are not able to display the column headings horizontally. )
    Thanks in anticipation
    Regards
    Rajesh

    You have two questions here.
    1. Can you have rotated text in PDF?
    2. Is there an XSL-FO construct to produce that?
    3.
    three questions...
    3. There must be a third question here about Java Programming somewhere.

  • PDF created using Java iText package - Text not editable and not displaying font properties on Acrobat

    Hi,
    I have an issue in editing the text and viewing the font properties of a text region on a PDF created using Java iText package.
    I use Adobe Acrobat 9 Pro Extended and the option Tools -> Advanced Editing -> TouchUp Text Tool.
    The strange behaviour is that, I have 2 PDFs created out of the same base PDF and text added via Java iText package with the same Text, Font and other properties.
    One of the PDF has the text region editable on Acrobat but the other one has the text region which is not editable.
    But both the PDFs are editable via Adobe Illustrator.
    I have attached both the PDFs for your reference
    PDF_Editable.pdf - Editable on Acrobat
    PDF_Not Editable.pdf - Not Editable on Acrobat
    Any help or insight to find out the difference/issue with the PDF which is not editable via Acrobat would be appreciated.
    Thanks in advance.
    Regards,
    Madhusoodhan Henryraman

    You don't have direct control of the leading of a multiline text field. A common approach is to control the background color of the field with JavaScript since the lines are not really needed when the field is used in Reader/Acrobat. They may be useful when using the form by hand. For more information, see the posts by Max in this topic: http://acrobatusers.com/forum/forms-acrobat/how-do-i-use-multi-lined-text-fields-over-prin ted-line-area-existing-form

  • Generating rotated boilerplate text in PDF, HTML format

    Hi,
    I am trying to create rotated boilerplate text in Report 6i to PDF, HTML formats.
    Rotated text generates fine using Report 6i's own report generation (Previewer) but when it's generated to PDF or HTML format output the rotated text are mirrored (in PDF) or simply does not display (in HTML).
    thank you,
    Allan

    I tried to rotate boilerplate texts (45 degree clock wise and anti-clock wise), all works fine in PDF. HTML doesn't support rotated text natually, you can workaround this by create an image for the rotated text.

  • How to put more than 1200 characters in a text form within a pdf created in Adobe Acrobat

    I need to know how to put more than 1200 characters in a text form within a pdf created in Adobe Acrobat. I have a request from a customer to do so and after googling I have came up with nothing. Also the customer would like it if they could convert said pdf form to a microsoft word document with the text form.

    There's no limit on the number of characters you can enter into a text
    field, unless you set it as such.

  • I cannot edit text in a PDF created from scanning

    I am using Adobe XI, and I have created a PDF by scanning a document.
    When I do click on a paragraph to edit text, all the page appears selected, it seems to be an image. At that moment a message pops up saying: this page has not editable text or digitalized content. The editing tools are disabled, so I cannot edit text.
    If I do export a page to Excel or Word, I can edit text there, although there are some kind of data that is not converted properly (even when I have executed OCR).
    I have edited preferences, but I am not sure if I did it correctly.
    Thanks

    I am using Acrobat XI Pro on PC.
    Of course, I have done all the steps you mention,  but I wanted someone to confirm me if these setting values are correct in order to obtain the best results. I repeat the paragraph of my previous discussion that I want to clarify, just in case some of you can help me, mainly about optimization
    I digitalized the document from the scanner. This scanner is installed in the net, so I personalized the settings in Acrobat and I chose memory mode instead of native mode.
    Mode color: black on white
    Resolution: 600 ppp
    As you say in your mail, I understand I should choose ClearScan OCR not searchable just at this moment.
    Well, and what about the options of optimization?, JBIG2 (without lost)?, 4 CCITT?
    And filters?, I have: activated, low, activated, medium
    Are these values congruous or compatible?
    Thank you
    De: Phillip Jones [email protected]
    Enviado el: martes, 27 de noviembre de 2012 18:24
    Para: Suárez Suárez, Manuela
    Asunto: I cannot edit text in a PDF created from scanning
    Re: I cannot edit text in a PDF created from scanning
    created by Phillip Jones<http://forums.adobe.com/people/PhillipMJones> in Creating, Editing & Exporting PDFs - View the full discussion<http://forums.adobe.com/message/4877588#4877588

  • Editing text in PDFs - only the numbers are missing the font

    When editing text in a PDF (created in InDesign), I can edit all the text EXCEPT for any numbers. When I try to input a number, I get the message "The original font XXXX is not available or can't be used in editing. Acrobat is using the font Arial in its place". It then places other characters in its place - not sure what they are but they're not numbers. Anyone have any idea what is causing this?

    Sorry, I found my answer here:
    https://forums.adobe.com/thread/1582291?q=arabic%20numbers
    Apparently, the HINDI DIGITS checkbox under Preferences\Languages is by default checked. This ridiculous default resulted in Arabic numbers when editing the PDF in Acrobat. Editing text was fine, but whenever I would type in a number, it would appear as Arabic characters.

  • Issue while converting turkish text in PDF via SMARTFORMS

    Hello Experts ,
    We are currently involved in translating an application to Turkish. Though the translation is completely done, when we test the issue we find that the application is working perfectly with the Turkish text but the transfer of data from application to the PDF via SMARTFORM is not working correctly. We find that the issue is due to 3 characters in Turkish which are (Ğ,İ,ş), We found out that this issue can be resolved using the  OSS Note 625818.
    However we have another issue which has cropped up.
    Wherever certain characters are being printed the characters right after them are printing at the same location and thus overlapping.
    For eg:
    Whenever the character u201CIu201D is printed it is being overlapped by the character which is supposed to be printed after it instead of printing next to it.
    Should be - İN
    Currently -  both are overlapping
    Any idea on how can this be fixed?
    when I actually tried to copy the text from PDF and paste it in this email the character u201CIu201D is replaced by the character u201CÝu201D in this email text box.
    Please find below the actual text from the PDF. The u201C u201D is seen nowhere and is replaced by the u201CÝu201D.
    GÖREVÝN DEGERLENDÝRÝLMES
    we have found a solution for the same which is to give a tab space between the İ and N but this will lead to unnecessery space in the application.
    Thank You!
    Best Regards
    Bonny 

    Hi,
      We cannot print some characters as such, so try converting it to string or char then go for PDF.
    Check the below link and note:
    [Cannot extract the embedded font arial.Some char might not be displayed;
    Thanks,
    Renuka.

  • Create Oracle Text Index from Java via JDBC

    Hi, I have a question relevant to creation of the Text Index in Oracle Text via Java JDBC.
    In Java I create client application and I connect to remote Oracle server. (there is Oracle
    10g Enterprise Edition 10.2.0.3.0 on Debian Linux OS). In Java I create query:
    CREATE INDEX index_name ON source_tab(text) indextype is ctxsys.context
    parameters('datastore ctxsys.file_datastore filter ctxsys.null_filter');
    and I start it by:
    PreparedStatement stmt = db.prepareStatement(query);
    ResultSet rs = stmt.executeQuery();
    There is problem that Text Index is created empty and when I write out error log then:
    DRG-11513: unable to open or write to file "path"
    I have on my computer Oracle XE 10g (Windows XP OS) here this application in Java functions
    without problems. Without problems it´s with that same query in SQLPlus when I connect at
    this remote Oracle server via PuTTY.
    Do you know anybody where could be error? Or at worst case where find I more detailed
    manual about JDBC Oracle mainly possible errors and problems with compatibility?

    Does it work if you don't use "file_datastore"?
    Eg. try the following in sqlplus:
    create table t (text varchar2(2000));
    insert into t values ('hello world');
    create index ti on t(text) indextype is ctxsys.context;
    select * from t where contains (text, 'hello') > 0;
    Then drop the index ti and try the same "create index" through JDBC. Does that work?
    If so, then we have some kind of issue with the file_datastore. I assume you are aware that the file will be read by the SERVER, not from the client?
    So if your database resides on a Linux box, but you are calling from a Java program on a windows PC, the file names in source_tab(text) must be in Linux format, and must refer to files which are available on the Linux server (and readable by the owner of the Oracle database process).
    So /home/me/file.txt might work, but C:\Documents\file.txt will not.

Maybe you are looking for

  • Date and Time Format global for a database?

    Hallo, Config.: Oracle 9i Release 1 (Enterprise) How can I change persistent the standard format of the DATE data type? The default format is "dd-mon-yy". When I view data in Enterprise Manager Console or want to import data with SQL* Loader, I have

  • CAF  entity and application service

    hi           when we are importing RFC or Webservice  for  external service             can we use application service directly  instead of  entity service                is it possible to use only  external service and  without entity  service  .

  • How do I import and use the Keynote themes that I've downloaded?

    I'm sure this is a stupid question, but I searched this forum & didn't immediately find the answer I needed. I've downloaded some Keynote themes (they have a .kth extension). How do I import these into Keynote 08 so that Keynote will recognize and us

  • Working in a doc with inline tables uses 80% of my CPU

    Hi everyone, I'm using Pages 4.0.4, and typing (in table, around table, any where) slows to a crawl when I my document contains inline tables. Using Activity Monitor, I can see my CPU usage jump to 80% when I type in a Pages document with inline tabl

  • SQL Connectivity issue

    I am having 2 SQL 2005 Servers connected accross WAN. There are 2 SQL instances running on both the servers. The default instance is of WSUS. I am unable to connect to the second instance on the SQL server (OVCONSOLE) and receive the error message to