New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OverWrite(): does not handle CRLF documents correctly #626
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Example Attached. The PDF was generated with Windows "Print to PDF" and then the {{test}} parameters were inserted using NitroPDF. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It seems OverWrite has a problem with PDF files using CRLF line endings. I tried to edit failing regexes but to no avail (resulting files were empty). Leaving open. |
I couldn't figure out how to save a PDF in Word 2016 (office 365) that didn't end up with CRLF rather than LF in newline, and I assume that the Finally I went ahead and converted it with |
Is there already a solution for this? |
If it were, the issue would be closed. |
Is this going to be resolved? |
any temporary workaround or successful tool that can fix the original PDF to work with this function? the "dirty" way for me around this for now is with manually placing text based on position, but no need to explain why this is really dirty ;)
|
@studioramix As I mentioned in my post I successfully used |
I tried creating a pdf with Adobe Acrobat with the Create->pdf from clipboard -option. On the clipboard I had two lines of text copied from Notepad++ with EOL characters converted to LF only. Even that did not work. Is there a working example of a pdf file that can be used for testing? |
This comment has been minimized.
This comment has been minimized.
solved ? |
closed ? |
@h2ooooooo what command did You use? I got 4 errors:
but after replacing When I print_r $m variable from line 26824 (
I don't know if this is a good road, but I'd like to have this fided. P.S. can Maybe at start we can check if the line end is @finwe I see that You already tried fixing regex'es, but without any luck. What do You think about replacing CRLF with LF in PDF? |
I also noticed that in some PDF's the regex must be different. In first PDF (version 1.3) I have this:
but in second (version 1.5) I have this: so the above regex won't match. |
I have a very simple PDF saved using Word.
but when I print
as You can see there is no
so |
Is the issue solved? I have been facing same issue with following code
|
No,
Nothing I tried, helped. I decided to use a html page template, do the replacing there and create a pdf after that, instead of trying to manipulate the pdf document.
|
See #626 (comment) |
I found this bug / would like to have this new functionality
Undefined Offset: 1 - mPDF.php Line 29198
This is mPDF and PHP version and environment (fpm/cli etc) I am using
mPDF 7.0.0
PHP 5.6.31 (also tried PHP 7.0.23 & PHP 7.1.9)
Apache 2.4.27
Symfony 3.2.13
(WAMPSERVER 3.1.0 - 64-bit)
This is a PHP code snippet I use
The text was updated successfully, but these errors were encountered: