zend_pdf无法读取现有的pdf(zend_pdf can't read existing pdf)
我正在使用Zend_Pdf生成基于现有PDF模板的PDF文件。 问题是,我无法阅读任何模板 - 我得到的是“文件不是PDF”。 错误,因为文件中的前4个字符是“%???” 而不是“%PDF”(我用“头”来检查这个)。
这是一个字符编码问题吗? 我相信模板是ISO-8859-1,我必须在Zend_Pdf_Parser中设置一些来处理这个吗?
谢谢
I'm using Zend_Pdf to generate PDF files, based on existing PDF templates. The problem is, I can't read any of the templates - I get a "File is not a PDF." error because the first 4 characters in the file are "%???" instead of "%PDF" (I used "head" to check this).
Is this a character encoding problem? I believe the templates are in ISO-8859-1, must I set something in Zend_Pdf_Parser to handle this?
Thanks
原文:https://stackoverflow.com/questions/1941557
最满意答案
不,你不能合并它们 - 使用2个触发器映射到相同的工作。
使用Cron表达式,您可以定义事件(在此上下文中的作业)之间的时间间隔
“在每一天/接下来的日子里每运行X 小时/分钟/秒 ”
等等。
你周日的情况与你的周日时间表没有任何共同的标准。
No, you cannot combine them - use 2 triggers mapped to the same job for that.
Using Cron expression you define intervals between events (jobs in this context) like
"run every X hours/minutes/seconds etc on each day/the following days"
and so on.
And your Sunday's condition doesn't have any common criteria with you weekday schedule.
相关问答
更多-
在将来使用一个表达方式 使用org.quartz.CronExpression一些快速测试。 String exp = "0 0 0 1 1 ? 3000"; boolean valid = CronExpression.isValidExpression(exp); System.out.println(valid); if (valid) { CronExpression cronExpression = new CronExpression(exp); System.out.print ...
-
Java Quartz Cron触发器(Java Quartz Cron Trigger)[2022-09-06]
根据Quartz CronTrigger源代码 ,触发器会保留下一次应该触发的日期。 我想如果你在6:15:00启动服务器,Quartz会保留7:00:00作为下一次开机时间。 将服务器时间更改为5:55:45不会更新下一次开火时间,并且7:00:00将保留为下一次开火时间。 因此,事件不会在6:00:00开始,而是在7:00:00开始。 所以,时间不是直接保留的,但是保持开机时间,并且如果您更改系统时钟,则看起来不会更新。 According to Quartz CronTrigger source co ... -
我发现这实际上是Quartz.NET 2.0.1中的一个错误,但它已经在2.1.0中得到修复。 请参阅此答案了解详情。 I figured out that this actually is a bug in Quartz.NET 2.0.1, but it has already been fixed in 2.1.0. See this answer for details.
-
确保你的app.config没有quartz节点的配置.szite配置应该写入app.config或quartz.config文件,配置双方都不是permittd。 Make sure your app.config don't have quartz node config.The quartz config should write to app.config or quartz.config file,config both sides is not permittd.
-
可以使用ICronTrigger.CronExpressionString CronScheduleBuilder csb = CronScheduleBuilder .WeeklyOnDayAndHourAndMinute(DayOfWeek.Monday, 12, 0); ICronTrigger trigger = (ICronTrigger)TriggerBuilder .Create() .WithSchedule(csb) .Build(); string c ...
-
@ user1301587,希望你已经找到了前进的方法,但我注意到你的问题仍然在Google上显示得很高,所以我会继续添加一些伪代码来说明我将如何做到这一点: 从您的数据源获取计划(在您的情况下看起来像RDBMS数据库表) 遍历计划列表并使用计划构建CronScheduleBuilder实例: string cronExpression = string.Format(“{0} {1} {2} {3} {4} {5}”,secondPart,minutePart,hourPart,dayOfMonthPar ...
-
不,你不能合并它们 - 使用2个触发器映射到相同的工作。 使用Cron表达式,您可以定义事件(在此上下文中的作业)之间的时间间隔 “在每一天/接下来的日子里每运行X 小时/分钟/秒 ” 等等。 你周日的情况与你的周日时间表没有任何共同的标准。 No, you cannot combine them - use 2 triggers mapped to the same job for that. Using Cron expression you define intervals between event ...
-
Cron表达式验证器(Cron expression validator)[2024-04-19]
UNIX Cron表达式和Quartz表达式是不同的。 只是, 在Unix中 (分钟,小时,日,月,日_周,年) 在石英 (秒,分钟,小时,日,月,日_周,年) 您可以使用它来了解Cron表达式是否正确。 编辑:看看CronExpression.ValidateExpression方法。 UNIX Cron expressions and Quartz ones are differents. Simply, In Unix (minute, hour, day, month, day_of_week, y ... -
怎么样 Trigger[] triggers = sched.GetTriggersOfJob(id, groupid); foreach (SimpleTrigger simpleTrigger in triggers.OfType
()) { //extract simple trigger info } foreach (CronTrigger cronTrigger in triggers.OfType ()) { //extract ... -
您可能会混淆使用本地和UTC时间。 特别是如果你有Convert.ToDateTime("5/31/2014 4:30:00 PM") , DateTimeOffset.Now或date.DateTime 。 Quartz的一般规则是 UTC时间进入,UTC时间出来 。 以下是使用预期输出运行您的案例的示例(为简洁起见,使用非构建器API): var firstTrigger = new CronTriggerImpl(); firstTrigger.CronExpressionString = "0 0 ...